From: Kanchan Joshi <[email protected]>
To: Jens Axboe <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [PATCH 4/4] block: enable use of bio allocation cache
Date: Tue, 10 Aug 2021 18:09:03 +0530 [thread overview]
Message-ID: <CA+1E3rKS+m6kuci7PmRw7LUbwVmF-ge6AV78SSnAkdegK0__Gw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
On Tue, Aug 10, 2021 at 6:40 AM Jens Axboe <[email protected]> wrote:
>
> If a kiocb is marked as being valid for bio caching, then use that to
> allocate a (and free) new bio if possible.
>
> Signed-off-by: Jens Axboe <[email protected]>
> ---
> fs/block_dev.c | 30 ++++++++++++++++++++++++++----
> 1 file changed, 26 insertions(+), 4 deletions(-)
>
> diff --git a/fs/block_dev.c b/fs/block_dev.c
> index 9ef4f1fc2cb0..36a3d53326c0 100644
> --- a/fs/block_dev.c
> +++ b/fs/block_dev.c
> @@ -327,6 +327,14 @@ static int blkdev_iopoll(struct kiocb *kiocb, bool wait)
> return blk_poll(q, READ_ONCE(kiocb->ki_cookie), wait);
> }
>
> +static void dio_bio_put(struct blkdev_dio *dio)
> +{
> + if (!dio->is_sync && (dio->iocb->ki_flags & IOCB_ALLOC_CACHE))
> + bio_cache_put(&dio->bio);
I think the second check (against IOCB_ALLOC_CACHE) is sufficient here.
next prev parent reply other threads:[~2021-08-10 12:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-09 21:23 [PATCHSET 0/4] Enable bio recycling for polled IO Jens Axboe
2021-08-09 21:23 ` [PATCH 1/4] bio: add allocation cache abstraction Jens Axboe
2021-08-10 13:15 ` Ming Lei
2021-08-10 13:53 ` Jens Axboe
2021-08-10 14:24 ` Jens Axboe
2021-08-10 14:48 ` Jens Axboe
2021-08-10 15:35 ` Jens Axboe
2021-08-10 15:54 ` Kanchan Joshi
2021-08-10 15:58 ` Jens Axboe
2021-08-09 21:23 ` [PATCH 2/4] fs: add bio alloc cache kiocb flag Jens Axboe
2021-08-09 21:24 ` [PATCH 3/4] io_uring: wire up bio allocation cache Jens Axboe
2021-08-10 12:25 ` Kanchan Joshi
2021-08-10 13:50 ` Jens Axboe
2021-08-09 21:24 ` [PATCH 4/4] block: enable use of " Jens Axboe
2021-08-10 12:39 ` Kanchan Joshi [this message]
2021-08-10 13:56 ` Jens Axboe
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=CA+1E3rKS+m6kuci7PmRw7LUbwVmF-ge6AV78SSnAkdegK0__Gw@mail.gmail.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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