The patch titled procfs: use proper units for noMMU statm has been added to the -mm tree. Its filename is procfs-use-proper-units-for-nommu-statm.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: procfs: use proper units for noMMU statm From: Steven J. Magnani <steve@xxxxxxxxxxxxxxx> On no-MMU systems, sizes reported in /proc/n/statm have units of bytes. Per Documentation/filesystems/proc.txt, these values should be in pages. Signed-off-by: Steven J. Magnani <steve@xxxxxxxxxxxxxxx> Cc: Greg Ungerer <gerg@xxxxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/proc/task_nommu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff -puN fs/proc/task_nommu.c~procfs-use-proper-units-for-nommu-statm fs/proc/task_nommu.c --- a/fs/proc/task_nommu.c~procfs-use-proper-units-for-nommu-statm +++ a/fs/proc/task_nommu.c @@ -110,8 +110,11 @@ int task_statm(struct mm_struct *mm, int } } - size += (*text = mm->end_code - mm->start_code); - size += (*data = mm->start_stack - mm->start_data); + size >>= PAGE_SHIFT; + *text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) + >> PAGE_SHIFT; + *data = (mm->start_stack - mm->start_data) >> PAGE_SHIFT; + size += *text + *data; up_read(&mm->mmap_sem); *resident = size; return size; _ Patches currently in -mm which might be from steve@xxxxxxxxxxxxxxx are microblaze-fix-pfn_valid-for-nommu.patch procfs-use-proper-units-for-nommu-statm.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html