linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* MAP_NOZERO revisited
@ 2012-01-05  0:37 Arun Sharma
  2012-01-05  7:23 ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 5+ messages in thread
From: Arun Sharma @ 2012-01-05  0:37 UTC (permalink / raw)
  To: linux-mm; +Cc: Davide Libenzi, Johannes Weiner, Balbir Singh


A few years ago, Davide posted patches to address clear_page() showing 
up high in the kernel profiles.

http://thread.gmane.org/gmane.linux.kernel/548928

With malloc implementations that try to conserve the RSS by madvising 
away unused pages that are dirty (i.e. faulted in), we pay a high cost 
in clear_page() if that page is needed later by the same process.

Now that we have memcgs with their own LRU lists, I was thinking of a 
MAP_NOZERO implementation that tries to avoid zero'ing the page if it's 
coming from the same memcg.

This will probably need an extra PCG_* flag maintaining state about 
whether the page was moved between memcgs since last use.

Security implications: this is not as good as the UID based checks in 
Davide's implementation, so should probably be an opt-in instead of 
being enabled by default.

Comments?

  -Arun

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2012-01-12 18:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-05  0:37 MAP_NOZERO revisited Arun Sharma
2012-01-05  7:23 ` KAMEZAWA Hiroyuki
2012-01-11 18:50   ` MAP_UNINITIALIZED (Was Re: MAP_NOZERO revisited) Arun Sharma
2012-01-12  5:10     ` Balbir Singh
2012-01-12 18:16       ` Arun Sharma

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