Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1304971
| From | Matthew Wilcox <matthew.r.wilcox@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 4/8] mincore: Add support for PUDs |
| Date | 2016-01-08 21:00 +0100 |
| Message-ID | <qOLmz-32e-41@gated-at.bofh.it> (permalink) |
| References | <qOLmy-32e-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Matthew Wilcox <willy@linux.intel.com>
We don't actually care about the contents of the PUD, as long as it's
present (which is checked by the pagewalk code), so just set the bits
to indicate presence and return.
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
---
mm/mincore.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/mm/mincore.c b/mm/mincore.c
index 2a565ed..8e6ce12 100644
--- a/mm/mincore.c
+++ b/mm/mincore.c
@@ -108,6 +108,18 @@ static int mincore_unmapped_range(unsigned long addr, unsigned long end,
return 0;
}
+static int mincore_pud_range(pud_t *pud, unsigned long addr, unsigned long end,
+ struct mm_walk *walk)
+{
+ unsigned char *vec = walk->private;
+ int nr = (end - addr) >> PAGE_SHIFT;
+
+ memset(vec, 1, nr);
+ walk->private += nr;
+
+ return 0;
+}
+
static int mincore_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
struct mm_walk *walk)
{
@@ -176,6 +188,7 @@ static long do_mincore(unsigned long addr, unsigned long pages, unsigned char *v
unsigned long end;
int err;
struct mm_walk mincore_walk = {
+ .pud_entry = mincore_pud_range,
.pmd_entry = mincore_pte_range,
.pte_hole = mincore_unmapped_range,
.hugetlb_entry = mincore_hugetlb,
--
2.6.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/8] Support for transparent PUD pages for DAX files Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-08 21:00 +0100 [PATCH v3 7/8] dax: Support for transparent PUD pages Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-08 21:00 +0100 [PATCH v3 8/8] ext4: Support for PUD-sized transparent huge pages Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-08 21:00 +0100 [PATCH v3 4/8] mincore: Add support for PUDs Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-08 21:00 +0100 [PATCH v3 2/8] mm,fs,dax: Change ->pmd_fault to ->huge_fault Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-08 21:00 +0100 [PATCH v3 5/8] procfs: Add support for PUDs to smaps, clear_refs and pagemap Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-08 21:00 +0100 [PATCH v3 6/8] x86: Add support for PUD-sized transparent hugepages Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-08 21:00 +0100 [PATCH v3 3/8] mm: Add support for PUD-sized transparent hugepages Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-08 21:00 +0100
csiph-web