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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YzcTZBTF2H0udyk1@chenyu5-mobl1>
Date:   Sat, 1 Oct 2022 00:03:48 +0800
From:   Chen Yu <yu.c.chen@...el.com>
To:     Honglei Wang <wanghonglei@...ichuxing.com>
CC:     K Prateek Nayak <kprateek.nayak@....com>,
        Peter Zijlstra <peterz@...radead.org>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        "Tim Chen" <tim.c.chen@...el.com>,
        Mel Gorman <mgorman@...hsingularity.net>,
        "Juri Lelli" <juri.lelli@...hat.com>,
        Rik van Riel <riel@...riel.com>,
        Aaron Lu <aaron.lu@...el.com>,
        Abel Wu <wuyun.abel@...edance.com>,
        Yicong Yang <yangyicong@...ilicon.com>,
        "Gautham R . Shenoy" <gautham.shenoy@....com>,
        Ingo Molnar <mingo@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Valentin Schneider <vschneid@...hat.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] sched/fair: Choose the CPU where short task is
 running during wake up

On 2022-09-29 at 14:59:46 +0800, Honglei Wang wrote:
> > > > @@ -6050,7 +6063,8 @@ wake_affine_idle(int this_cpu, int prev_cpu, int sync)
> > > >   	if (available_idle_cpu(this_cpu) && cpus_share_cache(this_cpu, prev_cpu))
> > > >   		return available_idle_cpu(prev_cpu) ? prev_cpu : this_cpu;
> > > > -	if (sync && cpu_rq(this_cpu)->nr_running == 1)
> > > > +	if ((sync && cpu_rq(this_cpu)->nr_running == 1) ||
> > > > +	    is_short_task(cpu_curr(this_cpu)))
> 
> Seems it a bit breaks idle (or will be idle) purpose of wake_affine_idle()
> here.
Exactly, we should prefer previous idle CPU to 'potential idle' this_cpu to keep
it consistent.
> Maybe we can do it something like this?
> 
> if ((sync || is_short_task(cpu_curr(this_cpu))) &&
> cpu_rq(this_cpu)->nr_running == 1)
>
Yes, Prateek's experimental results has proven your suggestion.

thanks,
Chenyu
> Thanks,
> Honglei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ