public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Naohiro Aota <naohiro.aota@wdc.com>
Cc: linux-btrfs@vger.kernel.org, wangyugui@e16-tech.com,
	clm@meta.com, hch@lst.de
Subject: Re: [PATCH v3] btrfs: introduce offload_csum_mode to tweak checksum offloading behavior
Date: Tue, 20 Feb 2024 13:22:10 +0100	[thread overview]
Message-ID: <20240220122210.GD355@twin.jikos.cz> (raw)
In-Reply-To: <8dc4a312da70bb93f042f32a75efb7ec848cc08b.1707122589.git.naohiro.aota@wdc.com>

On Mon, Feb 05, 2024 at 10:01:16PM +0900, Naohiro Aota wrote:
> We disable offloading checksum to workqueues and do it synchronously when
> the checksum algorithm is fast. However, as reported in the link below,
> RAID0 with multiple devices may suffer from the sync checksum, because
> "fast checksum" is still not fast enough to catch up RAID0 writing.
> 
> To measure the effectiveness of sync checksum and checksum offloading for
> developers, it would be better to have a switch for the checksum offloading
> under CONFIG_BTRFS_DEBUG hood.
> 
> This commit introduces fs_devices->offload_csum_mode for
> CONFIG_BTRFS_DEBUG, so that a btrfs developer can change the behavior by
> writing to /sys/fs/btrfs/<uuid>/offload_csum. The default is "auto" which
> is the same as the previous behavior. Or, you can set "on" or "off" (or "y"
> or "n" whatever kstrtobool() accepts) to always/never offload checksum.
> 
> More benchmark should be collected with this knob to implement a proper
> criteria to enable/disable checksum offloading.
> 
> Link: https://lore.kernel.org/linux-btrfs/20230731152223.4EFB.409509F4@e16-tech.com/
> Link: https://lore.kernel.org/linux-btrfs/p3vo3g7pqn664mhmdhlotu5dzcna6vjtcoc2hb2lsgo2fwct7k@xzaxclba5tae/
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>

I'm adding this to for-next.

      parent reply	other threads:[~2024-02-20 12:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 13:01 [PATCH v3] btrfs: introduce offload_csum_mode to tweak checksum offloading behavior Naohiro Aota
2024-02-05 18:44 ` David Sterba
2024-02-06  8:10 ` Johannes Thumshirn
2024-02-20 12:22 ` David Sterba [this message]

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=20240220122210.GD355@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=clm@meta.com \
    --cc=hch@lst.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=naohiro.aota@wdc.com \
    --cc=wangyugui@e16-tech.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