From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx160.postini.com [74.125.245.160]) by kanga.kvack.org (Postfix) with SMTP id CDEFC6B0044 for ; Mon, 7 May 2012 11:29:21 -0400 (EDT) Date: Mon, 7 May 2012 10:29:16 -0500 (CDT) From: Christoph Lameter Subject: Re: [PATCH v1 5/6] mm: make vmstat_update periodic run conditional In-Reply-To: <1336056962-10465-6-git-send-email-gilad@benyossef.com> Message-ID: References: <1336056962-10465-1-git-send-email-gilad@benyossef.com> <1336056962-10465-6-git-send-email-gilad@benyossef.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Gilad Ben-Yossef Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Tejun Heo , John Stultz , Andrew Morton , KOSAKI Motohiro , Mel Gorman , Mike Frysinger , David Rientjes , Hugh Dickins , Minchan Kim , Konstantin Khlebnikov , Chris Metcalf , Hakan Akkan , Max Krasnyansky , Frederic Weisbecker , linux-mm@kvack.org On Thu, 3 May 2012, Gilad Ben-Yossef wrote: > vmstat_update runs every second from the work queue to update statistics > and drain per cpu pages back into the global page allocator. Looks good. - vmstat_off_cpus is a bit strange. Could we have a cpumask that has a bit set if vmstat is active? Rename to "vmstat_cpus"? - Start out with vmstat_cpus cleared? Cpus only need vmstat if they do something and if a cpu is idle on boot then it will not need vmstat enabled until the cpu does something useful. > @@ -1204,8 +1265,14 @@ static int __init setup_vmstat(void) > > register_cpu_notifier(&vmstat_notifier); > > + INIT_DELAYED_WORK_DEFERRABLE(&vmstat_monitor_work, > + vmstat_update_monitor); > + queue_delayed_work(system_unbound_wq, > + &vmstat_monitor_work, > + round_jiffies_relative(HZ)); > + > for_each_online_cpu(cpu) > - start_cpu_timer(cpu); > + setup_cpu_timer(cpu); > #endif > #ifdef CONFIG_PROC_FS > proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations); So the monitoring thread just bounces around the system? Hope that the scheduler does the right thing to keep it on processors that do some other work. -- 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: email@kvack.org