Re: [PATCH V3 4/5] ext4: get discard out of jbd2 commit kthread contex

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

 




On 2021/8/26 3:51 PM, Wang Jianchao wrote:

>>
>>> @@ -3672,8 +3724,14 @@ int __init ext4_init_mballoc(void)
>>>  	if (ext4_free_data_cachep == NULL)
>>>  		goto out_ac_free;
>>>  
>>> +	ext4_discard_wq = alloc_workqueue("ext4discard", WQ_UNBOUND, 0);
>>> +	if (!ext4_discard_wq)
>>> +		goto out_free_data;
>>> +
>>
>>
>> Perhaps we should only allocate the workqueue when it's needed ---
>> e.g., when a file system is mounted or remounted with "-o discard"?
>>
>> Then in ext4_exit_malloc(), we only free it if ext4_discard_wq is
>> non-NULL.
>>
>> This would save a bit of memory on systems that wouldn't need the ext4
>> discard work queue.
> 
> Yes, it make sense to the system with pool memory

s/pool/poor  :)

> 
> Thanks so much
> Jianchao
> 
>>
>> 					- Ted
>>



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux