Re: [PATCH] module: Remove preempt_disable() from module reference counting.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 09, 2023 at 03:49:02PM +0200, Sebastian Andrzej Siewior wrote:
> The preempt_disable() section in module_put() was added in commit
>    e1783a240f491 ("module: Use this_cpu_xx to dynamically allocate counters")
> 
> while the per-CPU counter were switched to another API. The API requires
> that during the RMW operation the CPU remained the same.
> 
> This counting API was later replaced with atomic_t in commit
>    2f35c41f58a97 ("module: Replace module_ref with atomic_t refcnt")
> 
> Since this atomic_t replacement there is no need to keep preemption
> disabled while the reference counter is modified.
> 
> Remove preempt_disable() from module_put(), __module_get() and
> try_module_get().
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>

Thanks! Queued up onto modules-next.

  Luis



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux