linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Fengnan Chang <changfengnan@bytedance.com>
Cc: axboe@kernel.dk, viro@zeniv.linux.org.uk, brauner@kernel.org,
	jack@suse.cz, asml.silence@gmail.com, willy@infradead.org,
	djwong@kernel.org, hch@infradead.org, ritesh.list@gmail.com,
	linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org,
	linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] block: enable per-cpu bio cache by default
Date: Mon, 13 Oct 2025 13:18:12 +0800	[thread overview]
Message-ID: <aOyLlFUNEKi2_vXT@fedora> (raw)
In-Reply-To: <20251011013312.20698-1-changfengnan@bytedance.com>

On Sat, Oct 11, 2025 at 09:33:12AM +0800, Fengnan Chang wrote:
> Per cpu bio cache was only used in the io_uring + raw block device,
> after commit 12e4e8c7ab59 ("io_uring/rw: enable bio caches for IRQ
> rw"),  bio_put is safe for task and irq context, bio_alloc_bioset is
> safe for task context and no one calls in irq context, so we can enable
> per cpu bio cache by default.
> 
> Benchmarked with t/io_uring and ext4+nvme:
> taskset -c 6 /root/fio/t/io_uring  -p0 -d128 -b4096 -s1 -c1 -F1 -B1 -R1
> -X1 -n1 -P1  /mnt/testfile
> base IOPS is 562K, patch IOPS is 574K. The CPU usage of bio_alloc_bioset
> decrease from 1.42% to 1.22%.
> 
> The worst case is allocate bio in CPU A but free in CPU B, still use
> t/io_uring and ext4+nvme:
> base IOPS is 648K, patch IOPS is 647K.

Just be curious, how do you run the remote bio free test? If the nvme is 1:1
mapping, you may not trigger it.

BTW, ublk has this kind of remote bio free trouble, but not see IOPS drop
with this patch.

The patch itself looks fine for me.


Thanks, 
Ming


  parent reply	other threads:[~2025-10-13  5:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-11  1:33 [PATCH] block: enable per-cpu bio cache by default Fengnan Chang
2025-10-11  1:36 ` fengnan chang
2025-10-11  1:43   ` fengnan chang
2025-10-13  3:24 ` Christoph Hellwig
2025-10-13  5:42   ` fengnan chang
2025-10-13  6:28     ` Christoph Hellwig
2025-10-13 12:58       ` [External] " Fengnan Chang
2025-10-13 13:31         ` Pavel Begunkov
2025-10-14  2:38           ` Fengnan Chang
2025-10-13  5:18 ` Ming Lei [this message]
2025-10-13  5:44   ` fengnan chang

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=aOyLlFUNEKi2_vXT@fedora \
    --to=ming.lei@redhat.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=changfengnan@bytedance.com \
    --cc=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=io-uring@vger.kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=ritesh.list@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).