Re: [PATCH] ovl: punt write aio completion to workqueue

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

 



On 9/28/23 12:46 AM, Amir Goldstein wrote:
> I did not want to add an overlayfs specific workqueue for those
> completions, because, as I'd mentioned before, I intend to move this
> stacked file io infrastructure to common vfs code.
> 
> I figured it's fine for overlayfs (or any stacked filesystem) to use its
> own s_dio_done_wq for its own private needs.
> 
> Please help me reassure that I got this right.

Looks like you're creating it lazily as well, so probably fine to use
the same wq rather than setup something new.

>  		ret = -ENOMEM;
>  		aio_req = kmem_cache_zalloc(ovl_aio_request_cachep, GFP_KERNEL);
>  		if (!aio_req)

Unrelated to this patch, but is this safe? You're allocating an aio_req
from within the ->write_iter() handler, yet it's GFP_KERNEL? Seems like
that should at least be GFP_NOFS, no?

That aside, punting to a workqueue is a very heavy handed solution to
the problem. Maybe it's the only one you have, didn't look too closely
at it, but it's definitely not going to increase your performance...

-- 
Jens Axboe




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux