[lkml]   [2011]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Reduce vm_stat cacheline contention in __vm_enough_memory
Andrew Morton wrote:

> Yes, the global vm_stat[] array is a problem - I'm surprised it's hung
> around for this long. Altering the sysctl_overcommit_memory mode will
> hide the problem, but that's no good.
> I think we've discussed switching vm_stat[] to a contention-avoiding
> counter scheme. Simply using <percpu_counter.h> would be the simplest
> approach. They'll introduce inaccuracies but hopefully any problems
> from that will be minor for the global page counters.
> otoh, I think we've been round this loop before and I don't recall why
> nothing happened.

Yeah, we have had this discussion on vm_enough_memory before.

The current version of per cpu counter was not really suitable because
the batch size is not appropriate. I've tried to use per cpu counter
with batch size adjusted in my attempt. Andrew has suggested having an
elastic batch size that's proportional to the size of the central
counter but I haven't gotten around to try that out.


 \ /
  Last update: 2011-10-13 02:09    [W:0.067 / U:4.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site