Messages in this thread | ![/](/images/icornerl.gif) | | From | Arnd Bergmann <> | Subject | Re: [PATCH/RFC] mutex: Fix optimistic spinning vs. BKL | Date | Wed, 28 Apr 2010 14:06:03 +0200 |
| |
On Wednesday 28 April 2010, Benjamin Herrenschmidt wrote: > Now, we -could- make it a bit smarter about the BKL by introducing a > contention counter and only go out if we own the BKL and it is contended, > but I didn't feel like this was worth the effort, time is better spent > removing the BKL from sensitive code path instead.
Agreed.
> - for (;;) { > + for (timeout = jiffies + 2; jiffies < timeout;) { > [...] > - for (;;) { > + while (jiffies < timeout) {
This needs to use time_before() to avoid problems on jiffies wraparound.
Arnd
| ![\](/images/icornerr.gif) |