Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753046AbbLKBlo (ORCPT ); Thu, 10 Dec 2015 20:41:44 -0500 Received: from [69.252.207.40] ([69.252.207.40]:56652 "EHLO resqmta-ch2-08v.sys.comcast.net" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752935AbbLKBla (ORCPT ); Thu, 10 Dec 2015 20:41:30 -0500 Date: Thu, 10 Dec 2015 19:41:08 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Andrew Morton cc: Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, hannes@cmpxchg.org, penguin-kernel@I-love.SAKURA.ne.jp Subject: Re: vmstat: make vmstat_updater deferrable again and shut down on idle In-Reply-To: <20151210153118.4f39d6a4f04c96189ce015c9@linux-foundation.org> Message-ID: References: <20151210153118.4f39d6a4f04c96189ce015c9@linux-foundation.org> Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 952 Lines: 27 On Thu, 10 Dec 2015, Andrew Morton wrote: > > /* > > + * Switch off vmstat processing and then fold all the remaining differentials > > + * until the diffs stay at zero. The function is used by NOHZ and can only be > > + * invoked when tick processing is not active. > > + */ > > +void quiet_vmstat(void) > > +{ > > + do { > > + if (!cpumask_test_and_set_cpu(smp_processor_id(), cpu_stat_off)) > > + cancel_delayed_work(this_cpu_ptr(&vmstat_work)); > > + > > + } while (refresh_cpu_vm_stats(false)); > > +} > > How do we know this will terminate in a reasonable amount of time if > other CPUs are pounding away? This is only dealing with the differentials of the local cpu. Other cpus do not matter. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/