From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A4B7C2BBCD for ; Fri, 4 Dec 2020 09:41:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10318227BF for ; Fri, 4 Dec 2020 09:41:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729748AbgLDJlG (ORCPT ); Fri, 4 Dec 2020 04:41:06 -0500 Received: from mx2.suse.de ([195.135.220.15]:33622 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729553AbgLDJlF (ORCPT ); Fri, 4 Dec 2020 04:41:05 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 25451AD2B; Fri, 4 Dec 2020 09:40:24 +0000 (UTC) Date: Fri, 4 Dec 2020 09:40:21 +0000 From: Mel Gorman To: Yunfeng Ye Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, linux-kernel@vger.kernel.org, Shiyuan Hu , Hewenliang Subject: Re: [PATCH 2/2] sched: Split the function show_schedstat() Message-ID: <20201204094021.GG3306@suse.de> References: <66f73a23-a273-7dff-4202-adc61c3152c8@huawei.com> <20201203094237.GD3306@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 04, 2020 at 09:22:34AM +0800, Yunfeng Ye wrote: > > > On 2020/12/3 17:42, Mel Gorman wrote: > > On Thu, Dec 03, 2020 at 02:47:14PM +0800, Yunfeng Ye wrote: > >> The schedstat include runqueue-specific stats and domain-specific stats, > >> so split it into two functions, show_rqstat() and show_domainstat(). > >> > >> No functional changes. > >> > >> Signed-off-by: Yunfeng Ye > > > > Why? > > > > I could understand if there was a follow-up patch that adjusted some > > subset or there was a difference in checking for schedstat_enabled, > > locking or inserting new schedstat information. This can happen in the > > general case when the end result is easier to review here it seems to be > > just moving code around. > > > The rqstat and domainstat is independent state information. so I think > split it into two individual function is clearer. > The comments and the names of the structures being accessesd is sufficient to make it clear. -- Mel Gorman SUSE Labs