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, NICE_REPLY_A,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 8228AC433FE for ; Sat, 5 Dec 2020 02:33:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4BFF522D6F for ; Sat, 5 Dec 2020 02:33:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727566AbgLECcu (ORCPT ); Fri, 4 Dec 2020 21:32:50 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:9383 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbgLECcu (ORCPT ); Fri, 4 Dec 2020 21:32:50 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Cntqv0w79z78mM; Sat, 5 Dec 2020 10:31:39 +0800 (CST) Received: from [10.174.176.199] (10.174.176.199) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Sat, 5 Dec 2020 10:31:58 +0800 Subject: Re: [PATCH 2/2] sched: Split the function show_schedstat() To: Mel Gorman CC: , , , , , , , , , Shiyuan Hu , Hewenliang References: <66f73a23-a273-7dff-4202-adc61c3152c8@huawei.com> <20201203094237.GD3306@suse.de> <20201204094021.GG3306@suse.de> From: Yunfeng Ye Message-ID: <32d3a300-f74f-7660-0a78-9be7c8a279ba@huawei.com> Date: Sat, 5 Dec 2020 10:31:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20201204094021.GG3306@suse.de> Content-Type: text/plain; charset="iso-8859-15" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.176.199] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/12/4 17:40, Mel Gorman wrote: > 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. > ok, thanks.