From: "Theodore Ts'o" <tytso@mit.edu>
To: Kanchan Joshi <joshi.k@samsung.com>
Cc: lsf-pc@lists.linux-foundation.org, linux-btrfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-nvme@lists.infradead.org,
linux-block@vger.kernel.org, josef@toxicpanda.com
Subject: Re: [LSF/MM/BPF TOPIC] File system checksum offload
Date: Thu, 30 Jan 2025 06:28:57 -0800 [thread overview]
Message-ID: <20250130142857.GB401886@mit.edu> (raw)
In-Reply-To: <20250130091545.66573-1-joshi.k@samsung.com>
On Thu, Jan 30, 2025 at 02:45:45PM +0530, Kanchan Joshi wrote:
> I would like to propose a discussion on employing checksum offload in
> filesystems.
> It would be good to co-locate this with the storage track, as the
> finer details lie in the block layer and NVMe driver.
I wouldn't call this "file system offload". Enabling the data
integrity feature or whatever you want to call it is really a block
layer issue. The file system doesn't need to get involved at all.
Indeed, looking the patch, the only reason why the file system is
getting involved is because (a) you've added a mount option, and (b)
the mount option flips a bit in the bio that gets sent to the block
layer.
But this could also be done by adding a queue specific flag, at which
point the file system doesn't need to be involved at all. Why would
you want to enable the data ingregity feature on a per block I/O
basis, if the device supports it?
We can debate whether it should be defaulted to on if the device
supports it, or whether the needs to be explicitly enabled. It's true
that relative to not doing checksumming at all, it it's not "free".
The CPU has to calculate the checksum, so there are power, CPU, and
memory bandwidth costs. I'd still tend to lean towards defaulting it
to on, so that the user doesn't need do anything special if they have
hardware is capable of supporting the data integrity feature.
It would be enlightening to measure the performance and power using
some file system benchmark with and without the block layer data
integrity enabled, with no other changes in the file system. If
there's no difference, then enabling it queue-wide, for any file
system, would be a no-brainer. If we discover that there is a
downside to enabling it, then we might decide how we want to enable
it.
Cheers,
- Ted
next prev parent reply other threads:[~2025-01-30 14:29 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250130092400epcas5p1a3a9d899583e9502ed45fe500ae8a824@epcas5p1.samsung.com>
2025-01-30 9:15 ` [LSF/MM/BPF TOPIC] File system checksum offload Kanchan Joshi
2025-01-30 14:28 ` Theodore Ts'o [this message]
2025-01-30 20:39 ` [Lsf-pc] " Martin K. Petersen
2025-01-31 4:40 ` Theodore Ts'o
2025-01-31 7:07 ` Christoph Hellwig
2025-01-31 13:11 ` Kanchan Joshi
2025-02-03 7:47 ` Johannes Thumshirn
2025-02-03 7:56 ` Christoph Hellwig
2025-02-03 8:04 ` Johannes Thumshirn
2025-02-03 8:06 ` hch
2025-02-03 8:16 ` Qu Wenruo
2025-02-03 8:26 ` Matthew Wilcox
2025-02-03 8:30 ` hch
2025-02-03 8:36 ` Qu Wenruo
2025-02-03 8:40 ` hch
2025-02-03 8:51 ` Qu Wenruo
2025-02-03 8:57 ` hch
2025-02-03 8:26 ` hch
2025-02-03 13:27 ` Kanchan Joshi
2025-02-03 23:17 ` Qu Wenruo
2025-02-04 5:48 ` hch
2025-02-04 5:16 ` hch
2025-03-18 7:06 ` Kanchan Joshi
2025-03-18 8:07 ` hch
2025-03-19 18:06 ` Kanchan Joshi
2025-03-20 5:48 ` hch
2025-02-03 13:32 ` Kanchan Joshi
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=20250130142857.GB401886@mit.edu \
--to=tytso@mit.edu \
--cc=josef@toxicpanda.com \
--cc=joshi.k@samsung.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=lsf-pc@lists.linux-foundation.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