linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/3] Add shared RSS accounting
@ 2006-12-29 10:08 Balbir Singh
  2006-12-29 10:08 ` [RFC][PATCH 1/3] Add back rmap lock Balbir Singh
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Balbir Singh @ 2006-12-29 10:08 UTC (permalink / raw)
  To: hugh, akpm, andyw; +Cc: linux-mm, Balbir Singh

This patch adds accounting of shared pages. A page is considered shared when
it is mapped in by two or more mm_struct's.

The advantage of being able to track shared pages is that

(1) It can serve as a framework on top of which rss limits can be implemented
(2) A memory resource control framework would need to track shared pages
    for resource control
(3) The private pages give an idea about how many pages will be freed if
    the process is killed

The patches apply against 2.6.20-rc2

Shared accounting can be turned on enabling CONFIG_SHARED_PAGE_ACCOUNTING.
This ensures that for configurations not interested in shared page accounting
there is no overhead.

TODO:

1. Post benchmark numbers

Comments, criticism, suggested improvements, better ways to achieve the
same functionality are welcome. Tested on UML and powerpc (compared the
results seen from /proc/pid/statm against /proc/pid/smaps)

Andy Whitcroft helped with the patches by discussing an earlier version of
the patch and it's need in detail.

Signed-off-by: Balbir Singh <balbir@in.ibm.com>

series
======
add-page-map-lock.patch
move-accounting-to-rmap.patch
add-shared-accounting.patch

An additional patch ([PATCH 2.6.20-rc2] Fix set_pte_at arguments in
page_mkclean_one) might be required to get the kernel to compile.
See http://lkml.org/lkml/2006/12/28/258.

PS: While testing the code on a i386 box with highmem and CONFIG_HIGHPTE
set, I see a BUG() in kmap_atomic(). I think this is a known issue and
is being discussed on lkml (see http://lkml.org/lkml/2006/12/28/255)

-- 

	Balbir Singh,
	Linux Technology Center,
	IBM Software Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-12-29 22:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-29 10:08 [RFC][PATCH 0/3] Add shared RSS accounting Balbir Singh
2006-12-29 10:08 ` [RFC][PATCH 1/3] Add back rmap lock Balbir Singh
2006-12-29 10:09 ` [RFC][PATCH 2/3] Move RSS accounting to page_xxxx_rmap() functions Balbir Singh
2006-12-29 10:09 ` [RFC][PATCH 3/3] Add shared page accounting Balbir Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox