lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 8 Dec 2020 15:47:40 +0100 From: Vincent Guittot <vincent.guittot@...aro.org> To: Mel Gorman <mgorman@...hsingularity.net> Cc: Dietmar Eggemann <dietmar.eggemann@....com>, LKML <linux-kernel@...r.kernel.org>, Aubrey Li <aubrey.li@...ux.intel.com>, Barry Song <song.bao.hua@...ilicon.com>, Ingo Molnar <mingo@...hat.com>, Peter Ziljstra <peterz@...radead.org>, Juri Lelli <juri.lelli@...hat.com>, Valentin Schneider <valentin.schneider@....com>, Linux-ARM <linux-arm-kernel@...ts.infradead.org> Subject: Re: [PATCH 1/4] sched/fair: Remove SIS_AVG_CPU On Tue, 8 Dec 2020 at 14:54, Mel Gorman <mgorman@...hsingularity.net> wrote: > > On Tue, Dec 08, 2020 at 02:43:10PM +0100, Vincent Guittot wrote: > > On Tue, 8 Dec 2020 at 14:36, Mel Gorman <mgorman@...hsingularity.net> wrote: > > > > > > On Tue, Dec 08, 2020 at 02:24:32PM +0100, Vincent Guittot wrote: > > > > > > Nitpick: > > > > > > > > > > > > Since now avg_cost and avg_idle are only used w/ SIS_PROP, they could go > > > > > > completely into the SIS_PROP if condition. > > > > > > > > > > > > > > > > Yeah, I can do that. In the initial prototype, that happened in a > > > > > separate patch that split out SIS_PROP into a helper function and I > > > > > never merged it back. It's a trivial change. > > > > > > > > while doing this, should you also put the update of > > > > this_sd->avg_scan_cost under the SIS_PROP feature ? > > > > > > > > > > It's outside the scope of the series but why not. This? > > > > > > --8<-- > > > sched/fair: Move avg_scan_cost calculations under SIS_PROP > > > > > > As noted by Vincent Guittot, avg_scan_costs are calculated for SIS_PROP > > > even if SIS_PROP is disabled. Move the time calculations under a SIS_PROP > > > check and while we are at it, exclude the cost of initialising the CPU > > > mask from the average scan cost. > > > > > > Signed-off-by: Mel Gorman <mgorman@...hsingularity.net> > > > > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > > index 19ca0265f8aa..0fee53b1aae4 100644 > > > --- a/kernel/sched/fair.c > > > +++ b/kernel/sched/fair.c > > > @@ -6176,10 +6176,10 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t > > > nr = 4; > > > } > > > > > > - time = cpu_clock(this); > > > > I would move it in the if (sched_feat(SIS_PROP)) above. > > > > I considered it but made the choice to exclude the cost of cpumask_and() > from the avg_scan_cost instead. It's minor but when doing the original At the cost of a less readable code > prototype, I didn't think it was appropriate to count the cpumask > clearing as part of the scan cost as it's not directly related. hmm... I think it is because the number of loop is directly related to the allowed cpus > > -- > Mel Gorman > SUSE Labs
Powered by blists - more mailing lists