Received: by 2002:a05:6a10:d593:0:0:0:0 with SMTP id gn19csp4625553pxb; Tue, 1 Dec 2020 04:49:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJym4sb3nQeVRx55s2MmXZYWy9sSSzhUxPHYo2s9HBdmW9AAMaU08ASIqwYANgzc4aNrjolO X-Received: by 2002:a50:8741:: with SMTP id 1mr2870903edv.349.1606826991354; Tue, 01 Dec 2020 04:49:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606826991; cv=none; d=google.com; s=arc-20160816; b=tawQfPpd4J0VI/FFyRHIzBG5aVvRWI+gHrUwNPnNMdph/rF3aZdHDLs6nB8d4S1amm VXJTD++vHoK9TKF6kCh/MPlk5ilkLsEeTXNz/WqHgSeAIoIhysAQad7jtSGeoQZst54q HOInbRb0hG3PH0mjVTDnCOb6jADU3TWICL/AMFcpS0PNjqbAPGKeD31qVZFMsxvzcutU dr90scsQpAOom5hiwtTm9vonrzl3NMFTxg9DFZZpX3cZneFQR6ef2ZqmcSizBfhyE/96 FFfcaUq9MGJcPcmlP9l0W75z5OBxXqmQivJ4MZrLCyxYveau8dYBFp6MzP2I8BFhEGs1 QA7Q== 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=Q+xtR+Rk43d+F3mAQN/2P6L2QZkWM7oVPT1SkgfPLfU=; b=Ex56IBHL8MiTm2Szn7wasyv35wPmFjtKthTrM5lqI4pmO6CT//6XxYbNsihEXlABx/ 3BzH3dRTTNRoD5Wvdx9V0xqM8g6kdfl2z0bvFLvMfRlW/UdBw/j3NqC3lm8eX8zq0+FG FzuRxwrmimvZO/xZ3UCb8DjDlxRnjIgnJI02ke6oQuo8AJuEsodjXtPF9CGRzWGU6B36 Go0+Hwh8FIwzn/O9ZZMUJdYG/iAaP3TImJkvL3BvtKJx231KuH3Xn8cLhz4lJfT/M2zj crYqVT/QBx8lgP9HK99xlDr05OKoe0uK/SJz7rO9OKGyE0fyq1SiNb5iDQvG7JTg2EpD SxGA== 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 k1si1007820edf.460.2020.12.01.04.49.27; Tue, 01 Dec 2020 04:49:51 -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 S2390083AbgLAMrA (ORCPT + 99 others); Tue, 1 Dec 2020 07:47:00 -0500 Received: from mx2.suse.de ([195.135.220.15]:58920 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727852AbgLAMrA (ORCPT ); Tue, 1 Dec 2020 07:47:00 -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 4B775ACC2; Tue, 1 Dec 2020 12:46:18 +0000 (UTC) Date: Tue, 1 Dec 2020 12:46:14 +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, qianjun.kernel@gmail.com, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Subject: Re: [PATCH 4/6] sched: make schedstats helpers independent of fair sched class Message-ID: <20201201124614.GU3306@suse.de> References: <20201201115416.26515-1-laoar.shao@gmail.com> <20201201115416.26515-5-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20201201115416.26515-5-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 Tue, Dec 01, 2020 at 07:54:14PM +0800, Yafang Shao wrote: > The original prototype of the schedstats helpers are > > update_stats_wait_*(struct cfs_rq *cfs_rq, struct sched_entity *se) > > The cfs_rq in these helpers is used to get the rq_clock, and the se is > used to get the struct sched_statistics and the struct task_struct. In > order to make these helpers available by all sched classes, we can pass > the rq, sched_statistics and task_struct directly. > > Then the new helpers are > > update_stats_wait_*(struct rq *rq, struct task_struct *p, > struct sched_statistics *stats) > > which are independent of fair sched class. > > To avoid vmlinux growing too large or introducing ovehead when > !schedstat_enabled(), some new helpers after schedstat_enabled() are also > introduced, Suggested by Mel. These helpers are in sched/stats.c, > > __update_stats_wait_*(struct rq *rq, struct task_struct *p, > struct sched_statistics *stats) > > Cc: Mel Gorman > Signed-off-by: Yafang Shao Think it's ok, it's mostly code shuffling. I'd have been happier if there was evidence showing a before/after comparison of the sched stats for something simple like "perf bench sched pipe" and a clear statement of no functional change as well as a comparison of the vmlinux files but I think it's ok so; Acked-by: Mel Gorman I didn't look at the rt.c parts -- Mel Gorman SUSE Labs