public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Christoph Hellwig <hch@infradead.org>, Qu Wenruo <wqu@suse.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 4/4] btrfs: introduce btrfs_bio::async_csum
Date: Fri, 24 Oct 2025 22:51:47 +0000	[thread overview]
Message-ID: <20251024225147.GA4182237@google.com> (raw)
In-Reply-To: <6e338563-97d9-46f5-bfe6-19a1effa8aca@gmx.com>

On Sat, Oct 25, 2025 at 08:45:09AM +1030, Qu Wenruo wrote:
> Even if the new API can cause black magic to make CRC32C to be faster than
> DRAM bandwidth, it will not remove the latency.

For what it's worth, crc32c checksumming is often faster than DRAM
already.  Though, being faster than DRAM is still useful when the data
is already in cache.

For example, on AMD Ryzen 9 9950X (Zen 5), I get 89 GB/s crc32c with the
kernel's current crc32c code for data that's already in L1 cache.

However, Zen 5 tripled the number of ALUs that can execute the crc32
instruction, resulting in new code being optimal.  I've tested that
130 GB/s crc32c is theoretically possible with Zen 5 optimized code.

The indirect calls and other overhead in the traditional crypto API
makes a notable difference in checksumming throughput when the actual
calculation is this fast...

But absolutely, the real bottleneck for I/O is almost always going to be
elsewhere in the stack.

- Eric

  reply	other threads:[~2025-10-24 22:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-24 10:49 [PATCH 0/4] btrfs: introduce async_csum feature Qu Wenruo
2025-10-24 10:49 ` [PATCH 1/4] btrfs: make sure all btrfs_bio::end_io is called in task context Qu Wenruo
2025-10-24 10:49 ` [PATCH 2/4] btrfs: remove btrfs_fs_info::compressed_write_workers Qu Wenruo
2025-10-24 10:49 ` [PATCH 3/4] btrfs: relax btrfs_inode::ordered_tree_lock Qu Wenruo
2025-10-24 10:49 ` [PATCH 4/4] btrfs: introduce btrfs_bio::async_csum Qu Wenruo
2025-10-24 10:58   ` Christoph Hellwig
2025-10-24 22:15     ` Qu Wenruo
2025-10-24 22:51       ` Eric Biggers [this message]
2025-10-24 23:13         ` Qu Wenruo
2025-10-24 14:51   ` Boris Burkov
2025-10-24 21:40     ` Qu Wenruo
2025-10-28  7:19   ` kernel test robot
2025-10-28  8:06     ` Qu Wenruo
2025-10-28 10:15       ` Qu Wenruo

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=20251024225147.GA4182237@google.com \
    --to=ebiggers@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    --cc=wqu@suse.com \
    /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