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


Groups > linux.kernel > #1699392

Re: wake_wide mechanism clarification

From Joel Fernandes <joelaf@google.com>
Newsgroups linux.kernel
Subject Re: wake_wide mechanism clarification
Date 2017-07-30 00:50 +0200
Message-ID <u8IIy-h0-9@gated-at.bofh.it> (permalink)
References (4 earlier) <tY7AC-8dL-25@gated-at.bofh.it> <u8uYW-7T4-3@gated-at.bofh.it> <u8Bxp-40f-13@gated-at.bofh.it> <u8Gno-7k6-7@gated-at.bofh.it> <u8Ipc-a9-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Jul 29, 2017 at 3:28 PM, Joel Fernandes <joelaf@google.com> wrote:
<snip>
>>>> Again I didn't follow why the second condition couldn't just be:
>>>> waker->nr_wakee_switch > factor, or, (waker->nr_wakee_switch +
>>>> wakee->nr_wakee_switch) > factor, based on the above explanation from
>>>> Micheal Wang that I quoted.
>>>> and why he's instead doing the whole multiplication thing there that I
>>>> was talking about earlier: "factor * wakee->nr_wakee_switch".
>>>>
>>>> Rephrasing my question in another way, why are we talking the ratio of
>>>> master/slave instead of the sum when comparing if its > factor? I am
>>>> surely missing something here.
>>>
>>> Because the heuristic tries to not demolish 1:1 buddies.  Big partner
>>> flip delta means the pair are unlikely to be a communicating pair,
>>> perhaps at high frequency where misses hurt like hell.
>>
>> But it does seem to me to demolish the N:N communicating pairs from a
>> latency/load balancing standpoint. For he case of N readers and N
>> writers, the ratio (master/slave) comes down to 1:1 and we wake
>> affine. Hopefully I didn't miss something too obvious about that.
>
> I think wake_affine() should correctly handle the case (of
> overloading) I bring up here where wake_wide() is too conservative and
> does affine a lot, (I don't have any data for this though, this just
> from code reading), so I take this comment back for this reason.

aargh, nope :( it still runs select_idle_sibling although on the
previous CPU even if want_affine is 0 (and doesn't do the wider
wakeup..), so the comment still applies.. its easy to get lost into
the code with so many if statements :-\  sorry about the noise :)

thanks,

-Joel

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


Thread

Re: wake_wide mechanism clarification Joel Fernandes <joelaf@google.com> - 2017-07-29 10:10 +0200
  Re: wake_wide mechanism clarification Joel Fernandes <joelaf@google.com> - 2017-07-29 10:20 +0200
  Re: wake_wide mechanism clarification Mike Galbraith <umgwanakikbuti@gmail.com> - 2017-07-29 17:10 +0200
    Re: wake_wide mechanism clarification Joel Fernandes <joelaf@google.com> - 2017-07-29 22:20 +0200
      Re: wake_wide mechanism clarification Joel Fernandes <joelaf@google.com> - 2017-07-30 00:30 +0200
        Re: wake_wide mechanism clarification Joel Fernandes <joelaf@google.com> - 2017-07-30 00:50 +0200
          Re: wake_wide mechanism clarification Josef Bacik <josef@toxicpanda.com> - 2017-07-31 14:30 +0200

csiph-web