[lkml]   [2017]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/2] sched/wait: Break up long wake list walk
> I was really hoping that we'd root-cause this and have a solution (and
> then apply Tim's patch as a "belt and suspenders" kind of thing), but

One thing I wanted to point out is that Tim's patch seems to make
several schedule intensive micro benchmarks faster.

I think what's happening is that it allows more parallelism during wakeup:

Normally it's like

CPU 1 CPU 2 CPU 3 .....

wake up tasks on other CPUs woken up woken up
UNLOCK SPIN on waitq lock SPIN on waitq lock
remove waitq
remove waitq

So everything is serialized.

But with the bookmark patch the other CPUs can go through the "remove waitq" sequence
earlier because they have a chance to get a go at the lock and do it in parallel
with the main wakeup.

Tim used a 64 task threshold for the bookmark. That may be actually too large.
It may even be faster to use a shorter one.

So I think it's more than a bandaid, but likely a useful performance improvement
even for less extreme wait queues.


 \ /
  Last update: 2017-08-18 22:06    [W:0.105 / U:24.640 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site