From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932800AbcFGNsF (ORCPT ); Tue, 7 Jun 2016 09:48:05 -0400 Received: from outbound-smtp07.blacknight.com ([46.22.139.12]:55275 "EHLO outbound-smtp07.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755111AbcFGNsB (ORCPT ); Tue, 7 Jun 2016 09:48:01 -0400 Date: Tue, 7 Jun 2016 14:47:57 +0100 From: Mel Gorman To: Josh Poimboeuf Cc: Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, Matt Fleming , Srikar Dronamraju Subject: Re: [PATCH v2 1/2] sched/debug: fix /proc/sched_debug regression Message-ID: <20160607134757.GC2527@techsingularity.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: 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 On Fri, Jun 03, 2016 at 05:58:40PM -0500, Josh Poimboeuf wrote: > Commit cb2517653fcc ("sched/debug: Make schedstats a runtime tunable > that is disabled by default") introduced a bug when CONFIG_SCHEDSTATS is > enabled and the runtime tunable is disabled (which is the default). The > wait-time, sum-exec, and sum-sleep fields are missing from the > /proc/sched_debug file in the runnable_tasks section. > I take it that this breaks userspace parsing? > Fix it with a new schedstat_val() macro which returns the field value > when schedstats is enabled and zero otherwise. The macro works with > both SCHEDSTATS and !SCHEDSTATS. I put the macro in stats.h since it > might end up being useful in other places. > > Fixes: cb2517653fcc ("sched/debug: Make schedstats a runtime tunable that is disabled by default") > Cc: stable@vger.kernel.org > Signed-off-by: Josh Poimboeuf Acked-by: Mel Gorman -- Mel Gorman SUSE Labs