Re: [PATCH 8/8] loop: don't destroy lo->workqueue in __loop_clr_fd

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

 



On 2022/03/16 20:25, Jan Kara wrote:
> On Wed 16-03-22 09:45:19, Christoph Hellwig wrote:
>> There is no need to destroy the workqueue when clearing unbinding
>> a loop device from a backing file.  Not doing so on the other hand
>> avoid creating a complex lock dependency chain involving the global
>> system_transition_mutex.
>>
>> Based on a patch from Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>.
>>
>> Reported-by: syzbot+6479585dfd4dedd3f7e1@xxxxxxxxxxxxxxxxxxxxxxxxx
>> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> 
> Looks good. Feel free to add:
> 
> Reviewed-by: Jan Kara <jack@xxxxxxx>

I don't recommend this change.

Since this WQ is invoked when flushing data to disk, this WQ had better use
WQ_MEM_RECLAIM flag when creating. A WQ created with WQ_MEM_RECLAIM flag has
at least one "struct task_struct" in order to guarantee forward progress, but
results in consuming more kernel resources. Therefore, it is preferable to
destroy the WQ when clearing unbinding a loop device from a backing file.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux