linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@in.ibm.com>
To: hugh@veritas.com, akpm@osdl.org, andyw@uk.ibm.com
Cc: linux-mm@kvack.org, Balbir Singh <balbir@in.ibm.com>
Subject: [RFC][PATCH 0/3] Add shared RSS accounting
Date: Fri, 29 Dec 2006 15:38:39 +0530	[thread overview]
Message-ID: <20061229100839.13860.15525.sendpatchset@balbir.in.ibm.com> (raw)

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>

             reply	other threads:[~2006-12-29 22:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-29 10:08 Balbir Singh [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061229100839.13860.15525.sendpatchset@balbir.in.ibm.com \
    --to=balbir@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=andyw@uk.ibm.com \
    --cc=hugh@veritas.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox