Re: [PATCH 1/3] wait: introduce wait_event_cmd_exclusive

2015-04-28 Thread Yuanhan Liu
On Tue, Apr 28, 2015 at 04:13:15PM +0200, Peter Zijlstra wrote: > On Mon, Apr 27, 2015 at 12:51:01PM +0800, Yuanhan Liu wrote: > > It's just a variant of wait_event_cmd, with exclusive flag being set. > > > > For cases like RAID5, which puts many processes to sleep until 1/4 > > resources are free

Re: [PATCH 1/3] wait: introduce wait_event_cmd_exclusive

2015-04-28 Thread Peter Zijlstra
On Mon, Apr 27, 2015 at 12:51:01PM +0800, Yuanhan Liu wrote: > It's just a variant of wait_event_cmd, with exclusive flag being set. > > For cases like RAID5, which puts many processes to sleep until 1/4 > resources are free, a wake_up wakes up all processes to run, but > there is one process bein

[PATCH 1/3] wait: introduce wait_event_cmd_exclusive

2015-04-26 Thread Yuanhan Liu
It's just a variant of wait_event_cmd, with exclusive flag being set. For cases like RAID5, which puts many processes to sleep until 1/4 resources are free, a wake_up wakes up all processes to run, but there is one process being able to get the resource as it's protected by a spin lock. That ends