lkml.org 
[lkml]   [2022]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 6/9] sched/core: Merge cpumask_andnot()+for_each_cpu() into for_each_cpu_andnot()
On Thu, Aug 25, 2022 at 07:12:07PM +0100, Valentin Schneider wrote:
> This removes the second use of the sched_core_mask temporary mask.
>
> Signed-off-by: Valentin Schneider <vschneid@redhat.com>

Suggested-by: Yury Norov <yury.norov@gmail.com>

> ---
> kernel/sched/core.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index ee28253c9ac0..b4c3112b0095 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -360,10 +360,7 @@ static void __sched_core_flip(bool enabled)
> /*
> * Toggle the offline CPUs.
> */
> - cpumask_copy(&sched_core_mask, cpu_possible_mask);
> - cpumask_andnot(&sched_core_mask, &sched_core_mask, cpu_online_mask);
> -
> - for_each_cpu(cpu, &sched_core_mask)
> + for_each_cpu_andnot(cpu, cpu_possible_mask, cpu_online_mask)
> cpu_rq(cpu)->core_enabled = enabled;
>
> cpus_read_unlock();
> --
> 2.31.1

\
 
 \ /
  Last update: 2022-08-25 23:19    [W:0.147 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site