From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932935AbcBAOSD (ORCPT ); Mon, 1 Feb 2016 09:18:03 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:36185 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932418AbcBAOSA (ORCPT ); Mon, 1 Feb 2016 09:18:00 -0500 Date: Mon, 1 Feb 2016 14:17:58 +0000 From: Matt Fleming To: Mel Gorman Cc: Peter Zijlstra , Ingo Molnar , Mike Galbraith , LKML Subject: Re: [PATCH 1/1] sched: Make schedstats a runtime tunable that is disabled by default v3 Message-ID: <20160201141758.GA27318@codeblueprint.co.uk> References: <1454319426-2658-1-git-send-email-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454319426-2658-1-git-send-email-mgorman@techsingularity.net> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 01 Feb, at 09:37:06AM, Mel Gorman wrote: > Changelog since V2 > o Print stats that are not related to schedstat > o Reintroduce a static inline for update_stats_dequeue > > Changelog since V1 > o Introduce schedstat_enabled and address Ingo's feedback > o More schedstat-only paths eliminated, particularly ttwu_stat > > schedstats is very useful during debugging and performance tuning but it > incurs overhead. As such, even though it can be disabled at build time, > it is often enabled as the information is useful. This patch adds a > kernel command-line and sysctl tunable to enable or disable schedstats on > demand. It is disabled by default as someone who knows they need it can > also learn to enable it when necessary. > > The benefits are workload-dependent but when it gets down to it, the > difference will be whether cache misses are incurred updating the shared > stats or not. These measurements were taken from a 48-core 2-socket machine > with Xeon(R) E5-2670 v3 cpus although they were also tested on a single > socket machine 8-core machine with Intel i7-3770 processors. [...] > The gain is small but it'll depend on the CPU and the workload whether > this patch makes a different. However, it stands to reason that doing > less work in the scheduler is a good thing. The downside is that the > lack of schedstats and tracepoints will be surprising to experts doing > performance analysis until they find the existance of the schedstats= > parameter or schedstats sysctl. > > Signed-off-by: Mel Gorman > --- > Documentation/kernel-parameters.txt | 5 ++ > Documentation/sysctl/kernel.txt | 8 +++ > include/linux/sched/sysctl.h | 4 ++ > kernel/sched/core.c | 62 +++++++++++++++++++++- > kernel/sched/debug.c | 102 +++++++++++++++++++----------------- > kernel/sched/fair.c | 90 +++++++++++++++++++------------ > kernel/sched/sched.h | 1 + > kernel/sched/stats.h | 8 +-- > kernel/sysctl.c | 11 ++++ > 9 files changed, 204 insertions(+), 87 deletions(-) Reviewed-by: Matt Fleming