On Wed, Nov 2, 2011 at 10:53 AM, Christoph Lameter <cl@xxxxxxxxxx> wrote: > On Sat, 29 Oct 2011, Gilad Ben-Yossef wrote: > >> >> +/* Which CPUs have per cpu pages */ >> >> +cpumask_var_t cpus_with_pcp; >> >> +static DEFINE_PER_CPU(unsigned long, total_cpu_pcp_count); >> > >> > Does the flushing happen so frequently that it is worth keeping this >> > state on a per-cpu basis, or would it be better to check each CPU's >> > pcp info and assemble a cpumask at flush time like done in patch 5? >> > >> >> No, I don't believe it is frequent at all. I will try to re-work the >> patch as suggested. > > The draining of the pcp pages is done from the vmstat callback which > occurs every second. Only if there is something to clean in the caches > will the flush happen. > Right, I wasn't accurate with my answer - I meant to say that the code to IPI all CPUs asking to flush their pcp pages is infrequent, so doing more work in that code path is not unthinkable. Thanks for pointing it out. As Christoph pointed out flushing on each CPU is also done by the vmstat workqueue every second, in addition to the IPI path. Since the changes I need wish to do involve the code that sends the IPI and not the flush code itself, I believe it is correct to say it is not a frequent activity. Having said that, trying to come up with a way with avoiding waking up each CPU once per second to do the vmstat work is also on my todo list, but this is another patch and another story altogether... :-) Thanks! Gilad -- Gilad Ben-Yossef Chief Coffee Drinker gilad@xxxxxxxxxxxxx Israel Cell: +972-52-8260388 US Cell: +1-973-8260388 http://benyossef.com "Unfortunately, cache misses are an equal opportunity pain provider." -- Mike Galbraith, LKML -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. 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