Re: [PATCH -next v2 0/5] ipc/sem: semop(2) improvements

From: Davidlohr Bueso
Date: Tue Sep 20 2016 - 11:03:44 EST


On Mon, 19 Sep 2016, Manfred Spraul wrote:
On 09/18/2016 09:11 PM, Davidlohr Bueso wrote:

Davidlohr Bueso (5):
ipc/sem: do not call wake_sem_queue_do() prematurely
The only patch that I don't like.
Especially: patch 2 of the series removes the wake_up_q from the function epilogue.
So only the code duplication (additional instances of rcu_read_unlock()) remains, I don't see any advantages.

ipc/sem: rework task wakeups
Acked

Thanks.

ipc/sem: optimize perform_atomic_semop()
I'm still thinking about it.
Code duplication is evil, but perhaps it is the best solution.

What I don't like is the hardcoded "< BITS_PER_LONG".
At least:
- (1 << sop->sem_num)
+ (1 << (sop->sem_num%BITS_PER_LONG))

Yeah, I'll send v3 for that.

ipc/sem: explicitly inline check_restart
Do we really need that? Isn't that the compiler's task?
Especially since the compiler is already doing it correctly.

Yes, I mentioned in the changelog that the compiler does it and this is
merely explicit. That said I see no harm in it, I guess whatever akpm says.

ipc/sem: use proper list api for pending_list wakeups
Acked

Thanks,
Davidlohr