Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp44267pxu; Tue, 24 Nov 2020 18:05:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyeIMIlqYzIcwQVdZhC9A7Z4X5yrNSHMcaBnszXoDAbkfpih8QCvEhUyh0HYlxvouYyiLbO X-Received: by 2002:a05:6402:1a22:: with SMTP id be2mr1445987edb.102.1606269902595; Tue, 24 Nov 2020 18:05:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606269902; cv=none; d=google.com; s=arc-20160816; b=Crx1yJAP42F7kIV0DYULrDQXeW2dtsNxXOdXB9cN5S8SFGyXVZ6gTLlOTrgfsaDdi3 hwwoLFPVbbgGCXdb9VZjaDVbC4VQDLSxlMBz8ixaMeTdhPe2t8Ko3HShLyPkn3qvoBHs vGMXqU6fMYfuOVCtiCalHB5ifBbIV/RWZTAW1AxVKQFQMUI+5pK8KLoqbP90+EwtdHaL 89RboXMMFR28wWPMgRc/1jbwPYVdmYzPgFN77A09ge3LjIXAmaU/i9b2OvQftKHyngEI 70syem+3wBp7CQv+ia3PhCddBm5WsGnzt9e3DwcKXpq9qLxS77Z9++Hh9gnU7G23JHYL QEDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=068Fu+Z0aLPOBNenOpFqaYC4iMnOldGF41cHqQyvS+c=; b=uHdEfSOjISHV0PH1Vww+Pmwi2cFBfUHhRtNYsUa5DIoz1Xafo2B5J1hHjvBurcVBFN SBSceK8d2OBrgREA6x8/gMKW4pTnubW4WGmM4J75AWPg/UMyULO9ZDoxlJkoy6BEpmGD 0zUBAkz5nr7kEHRBgWSZPrh/V/hRhpP2+4h/TfuaiiGrB4VLrRHoGW+girbTrpaxyPGZ ZeNYmDKCHJ3JBIQ/b2ase8hh7nQhk1S3WpXkIZQBqwZiINjSP87XWdrnIHsUwtDpb1Rn wyoh+tKsloUiArk93X5IXcVZHX2Y2W3nvBhR2AmhJW8B3/v+6dx1MVqFFKbIED6Tk79e 4W+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 63si354072edc.144.2020.11.24.18.04.40; Tue, 24 Nov 2020 18:05:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732977AbgKXLkr (ORCPT + 99 others); Tue, 24 Nov 2020 06:40:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:45544 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727909AbgKXLkr (ORCPT ); Tue, 24 Nov 2020 06:40:47 -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 A9982AC2E; Tue, 24 Nov 2020 11:40:45 +0000 (UTC) Date: Tue, 24 Nov 2020 11:40:42 +0000 From: Mel Gorman To: Yafang Shao 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, linux-rt-users@vger.kernel.org Subject: Re: [RFC PATCH v2 3/5] sched: make schedstats helper independent of cfs_rq Message-ID: <20201124114042.GJ3306@suse.de> References: <20201123125808.50896-1-laoar.shao@gmail.com> <20201123125808.50896-4-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20201123125808.50896-4-laoar.shao@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 23, 2020 at 08:58:06PM +0800, Yafang Shao wrote: > The 'cfs_rq' in these helpers > update_stats_{wait_start, wait_end, enqueue_sleeper} is only used to get > the rq_clock, so we can pass the rq directly. Then these helpers can be > used by all sched class after being moved into stats.h. > > After that change, the size of vmlinux is increased around 824Bytes. > w/o this patch, with this patch > Size of vmlinux: 78443832 78444656 > > Signed-off-by: Yafang Shao The inline helpers are quite large. When I was suggesting that the overhead was minimal, what I expected what that the inline functions would be a schedstat_enabled() followed by a real function call. It would introduce a small additional overhead when schedstats are enabled but avoid vmlinux growing too large e.g. static inline void update_stats_wait_start(struct cfs_rq *cfs_rq, struct sched_entity *se) { if (!schedstat_enabled()) return; __update_stats_wait_start(cfs_rq, se); } where __update_stats_wait_start then lives in kernel/sched/stats.c -- Mel Gorman SUSE Labs