[PATCH 0/1] percpu_rw_semaphore: reimplement to not block thereaders unnecessarily
From: Oleg Nesterov
Date: Wed Oct 31 2012 - 15:41:14 EST
On 10/30, Oleg Nesterov wrote:
>
> So. down_write/up_right does msleep() and it needs to call
> synchronize_sched() 3 times.
>
> This looks too much. It is not that I am worried about the writers,
> the problem is that the new readers are blocked completely while the
> writer sleeps in msleep/synchronize_sched.
>
> Paul, Mikulas, et al. Could you please look at the new implementation
> below? Completely untested/uncompiled, just for discussion.
I tried to test it, seems to work...
But. I guess the only valid test is: pass the review from Paul/Peter.
Todo:
- add the lockdep annotations
- we can speedup the down_write-right-aftet-up_write case
What do you all think?
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/