RFC Add shared RSS accounting
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | Add back rmap lockinclude/ include/ include/ +6 more | +169 | 0 replies | |
| 2/3 | Move RSS accounting to page_xxxx_rmap() functionsfs/ include/ mm/ +5 more | +31 | 0 replies | |
| 3/3 | Add shared page accountingfs/ fs/ include/ +9 more | +335 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC][PATCH 0/3] Add shared RSS accounting
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.
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)
Signature · 9 lines
Balbir Singh, Linux Technology Center, IBM Software Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>