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: <20230612201414.GG83892@hirez.programming.kicks-ass.net>
Date:   Mon, 12 Jun 2023 22:14:14 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Tim Chen <tim.c.chen@...ux.intel.com>
Cc:     Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Ricardo Neri <ricardo.neri@...el.com>,
        "Ravi V . Shankar" <ravi.v.shankar@...el.com>,
        Ben Segall <bsegall@...gle.com>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Len Brown <len.brown@...el.com>, Mel Gorman <mgorman@...e.de>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Valentin Schneider <vschneid@...hat.com>,
        Ionela Voinescu <ionela.voinescu@....com>, x86@...nel.org,
        linux-kernel@...r.kernel.org,
        Shrikanth Hegde <sshegde@...ux.vnet.ibm.com>,
        Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
        naveen.n.rao@...ux.vnet.ibm.com,
        Yicong Yang <yangyicong@...ilicon.com>,
        Barry Song <v-songbaohua@...o.com>,
        Chen Yu <yu.c.chen@...el.com>, Hillf Danton <hdanton@...a.com>
Subject: Re: [Patch v2 1/6] sched/fair: Determine active load balance for SMT
 sched groups

On Mon, Jun 12, 2023 at 01:12:10PM -0700, Tim Chen wrote:
> How about making this modification to take care of SMT-4 case?
> 

Yep, that works.

> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 33246dce10db..e2261c24e536 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -9642,11 +9642,11 @@ static bool update_sd_pick_busiest(struct lb_env *env,
>         case group_has_spare:
>                 /*
>                  * Do not pick sg with SMT CPUs over sg with pure CPUs,
> -                * as we do not want to pull task off half empty SMT core
> +                * as we do not want to pull task off SMT core with one task
>                  * and make the core idle.
>                  */
>                 if (smt_vs_nonsmt_groups(sds->busiest, sg)) {
> -                       if (sg->flags & SD_SHARE_CPUCAPACITY)
> +                       if (sg->flags & SD_SHARE_CPUCAPACITY && sgs->sum_h_nr_running <= 1)
>                                 return false;
>                         else
>                                 return true;
> 
> 		

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ