From: Jens Axboe <axboe@kernel.dk>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
Christian Brauner <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org
Subject: Re: [PATCH] ovl: punt write aio completion to workqueue
Date: Thu, 28 Sep 2023 01:08:41 -0600 [thread overview]
Message-ID: <fb6c8786-5308-412e-9d87-dac6fd35aa32@kernel.dk> (raw)
In-Reply-To: <20230928064636.487317-1-amir73il@gmail.com>
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
next prev parent reply other threads:[~2023-09-28 7:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 6:46 [PATCH] ovl: punt write aio completion to workqueue Amir Goldstein
2023-09-28 7:08 ` Jens Axboe [this message]
2023-09-28 9:15 ` Amir Goldstein
2023-09-28 9:22 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb6c8786-5308-412e-9d87-dac6fd35aa32@kernel.dk \
--to=axboe@kernel.dk \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox