Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1716851

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group
Date 2017-08-21 22:30 +0200
Message-ID <uh1uH-Ac-51@gated-at.bofh.it> (permalink)
References <ugWOm-648-7@gated-at.bofh.it> <ugWOm-648-19@gated-at.bofh.it> <ugYGu-7g4-7@gated-at.bofh.it> <ugZ9w-7pX-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 21, 2017 at 06:59:28PM +0100, Brendan Jackman wrote:
> Hi Josef,
> 
> Thanks for taking a look.
> 
> On Mon, Aug 21 2017 at 17:26, Josef Bacik wrote:
> > On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote:
> [...]
> >> -		local_group = cpumask_test_cpu(this_cpu,
> >> -					       sched_group_span(group));
> >> -
> >
> > This isn't right is it?  cpu isn't necessarily in the very first group of a sd
> > right?
> 
> I think it is - I haven't grokked the sd/sg setup code in
> kernel/sched/topology.c but there is a comment[1] that I interpret as
> saying this. I'll take a more careful look tomorrow.
> 
> [1] http://elixir.free-electrons.com/linux/v4.13-rc6/source/kernel/sched/topology.c#L786
> 
> If I'm wrong, this can be rewritten not to use that assumption - I did
> it this way in the caller ("else if (group == sd->groups)") because I
> didn't want to use cpumask_test_cpu, and then changed it inside
> find_idlest_group so there weren't two ways of doing the same thing in
> the same neighbourhood of code.

No you are quite correct. The sched_domain of a CPU always includes that
CPU and the first group of a sched_domain is it's child domain and
therefore also includes that CPU.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] sched/fair: Tweaks for select_task_rq_fair slowpath Brendan Jackman <brendan.jackman@arm.com> - 2017-08-21 17:30 +0200
  [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Brendan Jackman <brendan.jackman@arm.com> - 2017-08-21 17:30 +0200
    Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Josef Bacik <josef@toxicpanda.com> - 2017-08-21 19:30 +0200
      Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Brendan Jackman <brendan.jackman@arm.com> - 2017-08-21 20:00 +0200
        Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Peter Zijlstra <peterz@infradead.org> - 2017-08-21 22:30 +0200
    Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Peter Zijlstra <peterz@infradead.org> - 2017-08-21 23:20 +0200
      Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Peter Zijlstra <peterz@infradead.org> - 2017-08-21 23:30 +0200
      Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Joel Fernandes <joelaf@google.com> - 2017-08-22 06:40 +0200
        Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Brendan Jackman <brendan.jackman@arm.com> - 2017-08-22 12:40 +0200
          Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Brendan Jackman <brendan.jackman@arm.com> - 2017-08-22 12:50 +0200
          Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Peter Zijlstra <peterz@infradead.org> - 2017-08-22 13:10 +0200
            Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Brendan Jackman <brendan.jackman@arm.com> - 2017-08-22 14:50 +0200
    Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Vincent Guittot <vincent.guittot@linaro.org> - 2017-08-22 09:50 +0200
      Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group Brendan Jackman <brendan.jackman@arm.com> - 2017-08-22 12:50 +0200
  [PATCH 1/2] sched/fair: Remove unnecessary comparison with -1 Brendan Jackman <brendan.jackman@arm.com> - 2017-08-21 17:30 +0200
    Re: [PATCH 1/2] sched/fair: Remove unnecessary comparison with -1 Josef Bacik <josef@toxicpanda.com> - 2017-08-21 19:40 +0200

csiph-web