Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Rosen Penev <rosenp@gmail.com>
Cc: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: Question about btrfs and XOR offloading
Date: Wed, 6 Jan 2021 13:37:38 +0100	[thread overview]
Message-ID: <20210106123738.GS6430@twin.jikos.cz> (raw)
In-Reply-To: <CAKxU2N9XkG72T0pUb2iSeATXB-Sh9j+rBpSogfAVH0Zccui_mg@mail.gmail.com>

On Tue, Jan 05, 2021 at 02:40:28PM -0800, Rosen Penev wrote:
> > What's the raw speed of the hw offload? Measured on large data so that
> > the overhead is negligible.
> I have no idea how to benchmark such a thing. I assume it could be
> done indirectly.
> >
> > It might make sense to add the async support in case the speed is
> > comparable or better to the CPU, but also to reduce the CPU load.
> I think the latter is the reason Marvell added hardware support for
> doing parity calculations.

The support seems to be in NAS boxes and besides xor and raid5/6
calculations the engine can also do a memcpy offload. This could gain a
lot of performance and be cheap in terms of code. Full page copies are
wrapped under copy_page so we'd need to insert the offload code. Similar
for the raid5/6 calculations.

The MD-RAID already supports offloading so we have code to stea^Wcopy.
Overall it sounds worth to add the async support to btrfs as it would
help with the metadata updates too, there's a lot of memcpy/memmove.

  reply	other threads:[~2021-01-06 12:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03  3:50 Question about btrfs and XOR offloading Rosen Penev
2021-01-03  6:53 ` Qu Wenruo
2021-01-03  7:12   ` Rosen Penev
2021-01-04 14:44 ` David Sterba
2021-01-04 22:56   ` Rosen Penev
2021-01-05 15:33     ` David Sterba
2021-01-05 22:40       ` Rosen Penev
2021-01-06 12:37         ` David Sterba [this message]
2021-01-06 21:52           ` Rosen Penev

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=20210106123738.GS6430@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=rosenp@gmail.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