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: <jhjzh72hocc.mognet@arm.com>
Date:   Mon, 10 Aug 2020 09:55:31 +0100
From:   Valentin Schneider <valentin.schneider@....com>
To:     Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc:     Josh Don <joshdon@...gle.com>, Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] sched/fair: ignore cache hotness for SMT migration


On 10/08/20 07:14, Srikar Dronamraju wrote:
> * Josh Don <joshdon@...gle.com> [2020-08-04 12:34:13]:
>
>> SMT siblings share caches, so cache hotness should be irrelevant for
>> cross-sibling migration.
>>
>> Proposed-by: Venkatesh Pallipadi <venki@...gle.com>
>> Signed-off-by: Josh Don <joshdon@...gle.com>
>> ---
>>  kernel/sched/fair.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 1a68a0536add..abdb54e2339f 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -7402,6 +7402,10 @@ static int task_hot(struct task_struct *p, struct lb_env *env)
>>      if (unlikely(task_has_idle_policy(p)))
>>              return 0;
>>
>> +	/* SMT siblings share cache */
>> +	if (env->sd->flags & SD_SHARE_CPUCAPACITY)
>> +		return 0;
>> +
>
> If this for retaining cache hotness, should we look at
> SD_SHARE_PKG_RESOURCES instead of SD_SHARE_CPUCAPACITY?
>

Josh's patch only targets migrating tasks between threads of the same
core - as he points out, cache hotness shouldn't matter here.

Using SD_SHARE_PKG_RESOURCES here would mean freely migrating tasks between
any CPU of an LLC domain, which is quite likely something you do *not* want
to do.

>>      /*
>>       * Buddy candidates are cache hot:
>>       */
>> --
>> 2.28.0.163.g6104cc2f0b6-goog
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ