Re: [PATCH v2 2/5] kmod: reduce atomic operations on kmod_concurrent

2017-05-26 Thread Luis R. Rodriguez
On Thu, May 25, 2017 at 06:11:00PM -0700, Dmitry Torokhov wrote: > On Thu, May 25, 2017 at 05:16:27PM -0700, Luis R. Rodriguez wrote: > > When checking if we want to allow a kmod thread to kick off we increment, > > then read to see if we should enable a thread. If we were over the allowed > > limi

Re: [PATCH v2 2/5] kmod: reduce atomic operations on kmod_concurrent

2017-05-25 Thread Dmitry Torokhov
On Thu, May 25, 2017 at 05:16:27PM -0700, Luis R. Rodriguez wrote: > When checking if we want to allow a kmod thread to kick off we increment, > then read to see if we should enable a thread. If we were over the allowed > limit limit we decrement. Splitting the increment far apart from decrement >

[PATCH v2 2/5] kmod: reduce atomic operations on kmod_concurrent

2017-05-25 Thread Luis R. Rodriguez
When checking if we want to allow a kmod thread to kick off we increment, then read to see if we should enable a thread. If we were over the allowed limit limit we decrement. Splitting the increment far apart from decrement means there could be a time where two increments happen potentially giving