Re: [PATCH 1/2] sched/wait: Break up long wake list walk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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                    .....
 
LOCK
wake up tasks on other CPUs    woken up             woken up
UNLOCK                         SPIN on waitq lock   SPIN on waitq lock
                               LOCK
                               remove waitq
                               UNLOCk
                                                    LOCK
                                                    remove waitq
                                                    UNLOCK

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.

-Andi

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux