summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2015-08-14 18:00:10 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2015-08-14 18:01:09 +1000
commita0b221e1761cfc2fcd9691fe213c55482e4ddc58 (patch)
tree581b98b12363177902ada1fc9e6956d108d33cac
parentcb4caa42d70568d3be52a61ff531c4180f5fae8b (diff)
Revert "mm: hugetlb: proc: add HugetlbPages field to /proc/PID/status"
This reverts commit 04f4eaa950828ccd332f69e09649629a8a74aa5e.
-rw-r--r--Documentation/filesystems/proc.txt3
-rw-r--r--fs/proc/task_mmu.c1
-rw-r--r--include/linux/hugetlb.h20
-rw-r--r--include/linux/mm_types.h10
-rw-r--r--mm/hugetlb.c27
-rw-r--r--mm/rmap.c4
6 files changed, 1 insertions, 64 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index bf3a6b40f33f..fe93b47e33df 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -174,7 +174,6 @@ read the file /proc/PID/status:
VmLib: 1412 kB
VmPTE: 20 kb
VmSwap: 0 kB
- HugetlbPages: 0 kB (0x2048kB)
Threads: 1
SigQ: 0/28578
SigPnd: 0000000000000000
@@ -238,8 +237,6 @@ Table 1-2: Contents of the status files (as of 4.1)
VmPTE size of page table entries
VmPMD size of second level page tables
VmSwap size of swap usage (the number of referred swapents)
- HugetlbPages size of hugetlb memory portions (with additional info
- about number of mapped hugepages for each page size)
Threads number of threads
SigQ number of signals queued/max. number for queue
SigPnd bitmap of pending signals for the thread
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 66954f5d753c..dde9cf886853 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -70,7 +70,6 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
ptes >> 10,
pmds >> 10,
swap << (PAGE_SHIFT-10));
- hugetlb_report_usage(m, mm);
}
unsigned long task_vsize(struct mm_struct *mm)
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 40ec3ee260bd..5e35379f58a5 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -483,18 +483,6 @@ static inline spinlock_t *huge_pte_lockptr(struct hstate *h,
#define hugepages_supported() (HPAGE_SHIFT != 0)
#endif
-void hugetlb_report_usage(struct seq_file *m, struct mm_struct *mm);
-
-static inline void inc_hugetlb_count(struct mm_struct *mm, struct hstate *h)
-{
- atomic_long_inc(&mm->hugetlb_usage.count[hstate_index(h)]);
-}
-
-static inline void dec_hugetlb_count(struct mm_struct *mm, struct hstate *h)
-{
- atomic_long_dec(&mm->hugetlb_usage.count[hstate_index(h)]);
-}
-
#else /* CONFIG_HUGETLB_PAGE */
struct hstate {};
#define alloc_huge_page(v, a, r) NULL
@@ -531,14 +519,6 @@ static inline spinlock_t *huge_pte_lockptr(struct hstate *h,
{
return &mm->page_table_lock;
}
-
-static inline void hugetlb_report_usage(struct seq_file *f, struct mm_struct *m)
-{
-}
-
-static inline void dec_hugetlb_count(struct mm_struct *mm, struct hstate *h)
-{
-}
#endif /* CONFIG_HUGETLB_PAGE */
static inline spinlock_t *huge_pte_lock(struct hstate *h,
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 778fd128a9f8..3d6baa7d4534 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -366,12 +366,6 @@ struct mm_rss_stat {
atomic_long_t count[NR_MM_COUNTERS];
};
-#ifdef CONFIG_HUGETLB_PAGE
-struct hugetlb_usage {
- atomic_long_t count[HUGE_MAX_HSTATE];
-};
-#endif
-
struct kioctx_table;
struct mm_struct {
struct vm_area_struct *mmap; /* list of VMAs */
@@ -492,10 +486,6 @@ struct mm_struct {
/* address of the bounds directory */
void __user *bd_addr;
#endif
-
-#ifdef CONFIG_HUGETLB_PAGE
- struct hugetlb_usage hugetlb_usage;
-#endif
};
static inline void mm_init_cpumask(struct mm_struct *mm)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 12c48ef58993..e83fce5b8d63 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2790,30 +2790,6 @@ void hugetlb_show_meminfo(void)
1UL << (huge_page_order(h) + PAGE_SHIFT - 10));
}
-void hugetlb_report_usage(struct seq_file *m, struct mm_struct *mm)
-{
- int i;
- unsigned long total_usage = 0;
-
- for (i = 0; i < HUGE_MAX_HSTATE; i++) {
- total_usage += atomic_long_read(&mm->hugetlb_usage.count[i]) *
- (huge_page_size(&hstates[i]) >> 10);
- }
-
- seq_printf(m, "HugetlbPages:\t%8lu kB (", total_usage);
- for (i = 0; i < HUGE_MAX_HSTATE; i++) {
- if (huge_page_order(&hstates[i]) == 0)
- break;
- if (i > 0)
- seq_puts(m, " ");
-
- seq_printf(m, "%ldx%dkB",
- atomic_long_read(&mm->hugetlb_usage.count[i]),
- huge_page_size(&hstates[i]) >> 10);
- }
- seq_puts(m, ")\n");
-}
-
/* Return the number pages of memory we physically have, in PAGE_SIZE units. */
unsigned long hugetlb_total_pages(void)
{
@@ -3049,7 +3025,6 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
get_page(ptepage);
page_dup_rmap(ptepage);
set_huge_pte_at(dst, addr, dst_pte, entry);
- inc_hugetlb_count(dst, h);
}
spin_unlock(src_ptl);
spin_unlock(dst_ptl);
@@ -3130,7 +3105,6 @@ again:
if (huge_pte_dirty(pte))
set_page_dirty(page);
- dec_hugetlb_count(mm, h);
page_remove_rmap(page);
force_flush = !__tlb_remove_page(tlb, page);
if (force_flush) {
@@ -3527,7 +3501,6 @@ retry:
&& (vma->vm_flags & VM_SHARED)));
set_huge_pte_at(mm, address, ptep, new_pte);
- inc_hugetlb_count(mm, h);
if ((flags & FAULT_FLAG_WRITE) && !(vma->vm_flags & VM_SHARED)) {
/* Optimization, do the COW without a second fault */
ret = hugetlb_cow(mm, vma, address, ptep, new_pte, page, ptl);
diff --git a/mm/rmap.c b/mm/rmap.c
index dbda882920a0..dcaad464aab0 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1382,9 +1382,7 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
update_hiwater_rss(mm);
if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) {
- if (PageHuge(page)) {
- dec_hugetlb_count(mm, page_hstate(page));
- } else {
+ if (!PageHuge(page)) {
if (PageAnon(page))
dec_mm_counter(mm, MM_ANONPAGES);
else