Re: [PATCH 2/2] ipc: semaphores: do not hold ipc lock more than necessary

2013-03-02 Thread Davidlohr Bueso
On Fri, 2013-03-01 at 17:20 -0800, Linus Torvalds wrote: > On Fri, Mar 1, 2013 at 4:16 PM, Davidlohr Bueso > wrote: > > +static inline struct sem_array *sem_obtain_object(struct ipc_namespace > > *ns, int id) > > +{ > > + struct kern_ipc_perm *ipcp = ipc_obtain_object(&sem_ids(ns), id); >

Re: [PATCH 2/2] ipc: semaphores: do not hold ipc lock more than necessary

2013-03-02 Thread Davidlohr Bueso
On Sat, 2013-03-02 at 12:41 +0800, Michel Lespinasse wrote: > On Sat, Mar 2, 2013 at 8:16 AM, Davidlohr Bueso > wrote: > > Instead of holding the ipc lock for permissions and security > > checks, among others, only acquire it when necessary. > > > > Signed-off-by: Davidlohr Bueso > > You got so

Re: [PATCH 2/2] ipc: semaphores: do not hold ipc lock more than necessary

2013-03-01 Thread Michel Lespinasse
On Sat, Mar 2, 2013 at 8:16 AM, Davidlohr Bueso wrote: > Instead of holding the ipc lock for permissions and security > checks, among others, only acquire it when necessary. > > Signed-off-by: Davidlohr Bueso You got some really great test results on this; I think they deserve to be mentioned in

Re: [PATCH 2/2] ipc: semaphores: do not hold ipc lock more than necessary

2013-03-01 Thread Linus Torvalds
On Fri, Mar 1, 2013 at 4:16 PM, Davidlohr Bueso wrote: > +static inline struct sem_array *sem_obtain_object(struct ipc_namespace *ns, > int id) > +{ > + struct kern_ipc_perm *ipcp = ipc_obtain_object(&sem_ids(ns), id); > + > + if (IS_ERR(ipcp)) > + return (struct sem_arr

[PATCH 2/2] ipc: semaphores: do not hold ipc lock more than necessary

2013-03-01 Thread Davidlohr Bueso
Instead of holding the ipc lock for permissions and security checks, among others, only acquire it when necessary. Signed-off-by: Davidlohr Bueso --- ipc/sem.c | 94 --- 1 file changed, 66 insertions(+), 28 deletions(-) diff --git a/ip