From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932118AbcAZINm (ORCPT ); Tue, 26 Jan 2016 03:13:42 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34955 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752924AbcAZINj (ORCPT ); Tue, 26 Jan 2016 03:13:39 -0500 Date: Tue, 26 Jan 2016 09:13:35 +0100 From: Ingo Molnar To: Mel Gorman Cc: Peter Zijlstra , Matt Fleming , Mike Galbraith , LKML , Thomas Gleixner Subject: Re: [PATCH] sched: Make schedstats a runtime tunable that is disabled by default Message-ID: <20160126081335.GA8534@gmail.com> References: <1453716331-21029-1-git-send-email-mgorman@techsingularity.net> <20160125112606.GV6357@twins.programming.kicks-ass.net> <20160125133944.GE3162@techsingularity.net> <20160125145944.GZ6357@twins.programming.kicks-ass.net> <20160125154635.GB4031@gmail.com> <20160125170716.GI3162@techsingularity.net> <20160125184000.GA6249@gmail.com> <20160125201142.GJ3162@techsingularity.net> <20160125204518.GK3162@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160125204518.GK3162@techsingularity.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Mel Gorman wrote: > - ttwu_stat(p, smp_processor_id(), 0); > + if (schedstat_enabled()) > + ttwu_stat(p, smp_processor_id(), 0); Yeah. I actually like this for the cleanup factor as well: your patch makes it a _lot_ more obvious what is a statistics slowpath and what is not. We tried to achieve that effect via the _stat() naming, but in hindsight that was a failure. Thanks, Ingo