On Sun, May 11, 2008 at 03:54:14PM +0200, Ingo Molnar wrote:Yup. I explained why that's actually beneficial in an earlier email. That's a laudable goal, but ultimately it's secondary to performance (or this thread wouldn't exist). No conceptual holes, just a performance one. Either we want your patch below or mine; definitely not both. diff --git a/kernel/semaphore.c b/kernel/semaphore.c index 5e41217..e520ad4 100644 --- a/kernel/semaphore.c +++ b/kernel/semaphore.c @@ -229,6 +229,11 @@ static inline int __sched __down_common(struct semaphore *sem, long state, } list_del(&waiter.list); + + /* It's possible we need to wake up the next task on the list too */ + if (unlikely(sem->count > 1) && !list_empty(&sem->wait_list)) + __up(sem); + return ret; } -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." --
| Jens Axboe | Re: [BUG] New Kernel Bugs |
| Faik Uygur | Re: Linux 2.6.21-rc1 |
| Ingo Molnar | [patch 02/13] syslets: add syslet.h include file, user API/ABI definitions |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
git: | |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | Re: Data corruption issue with splice() on 2.6.27.10 |
| Steven Rostedt | Re: -rt scheduling: wakeup bug? |
