Re: [PATCH] test_rhashtable: remove semaphore usage

2018-12-16 Thread Arnd Bergmann
On Fri, Dec 14, 2018 at 10:25 PM David Miller wrote: > > From: Arnd Bergmann > Date: Mon, 10 Dec 2018 22:17:20 +0100 > > > @@ -635,8 +636,9 @@ static int threadfunc(void *data) > > int i, step, err = 0, insert_retries = 0; > > struct thread_data *tdata = data; > > > > - up(_sem);

Re: [PATCH] test_rhashtable: remove semaphore usage

2018-12-14 Thread David Miller
From: Arnd Bergmann Date: Mon, 10 Dec 2018 22:17:20 +0100 > @@ -635,8 +636,9 @@ static int threadfunc(void *data) > int i, step, err = 0, insert_retries = 0; > struct thread_data *tdata = data; > > - up(_sem); > - if (down_interruptible(_sem)) > + if

Re: [PATCH] test_rhashtable: remove semaphore usage

2018-12-10 Thread Phil Sutter
Hi, On Tue, Dec 11, 2018 at 01:45:52PM +0800, Herbert Xu wrote: > On Mon, Dec 10, 2018 at 10:17:20PM +0100, Arnd Bergmann wrote: > > This is one of only two files that initialize a semaphore to a negative > > value. We don't really need the two semaphores here at all, but can do > > the same

Re: [PATCH] test_rhashtable: remove semaphore usage

2018-12-10 Thread Herbert Xu
On Mon, Dec 10, 2018 at 10:17:20PM +0100, Arnd Bergmann wrote: > This is one of only two files that initialize a semaphore to a negative > value. We don't really need the two semaphores here at all, but can do > the same thing in more conventional and more effient way, by using a > single

Re: [PATCH] test_rhashtable: remove semaphore usage

2018-12-10 Thread David Miller
From: Arnd Bergmann Date: Mon, 10 Dec 2018 22:17:20 +0100 > This is one of only two files that initialize a semaphore to a negative > value. We don't really need the two semaphores here at all, but can do > the same thing in more conventional and more effient way, by using a > single waitqueue

[PATCH] test_rhashtable: remove semaphore usage

2018-12-10 Thread Arnd Bergmann
This is one of only two files that initialize a semaphore to a negative value. We don't really need the two semaphores here at all, but can do the same thing in more conventional and more effient way, by using a single waitqueue and an atomic thread counter. This gets us a little bit closer to