Linux-Raid Archives mirror
 help / color / mirror / Atom feed
From: Song Liu <song@kernel.org>
To: tada keisuke <keisuke1.tada@kioxia.com>
Cc: "yukuai3@huawei.com" <yukuai3@huawei.com>,
	 "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 00/11] md: avoid counter operation conflicts
Date: Wed, 10 Apr 2024 14:13:50 -0700	[thread overview]
Message-ID: <CAPhsuW6iDjPp2B-NEqMEjb9v40US9eN88CuOc+882h6+BRCAQw@mail.gmail.com> (raw)
In-Reply-To: <a022f547c43e40e2b9f0aebb2bd0bfa8@kioxia.com>

Thanks for the patchset!

On Tue, Mar 26, 2024 at 3:29 AM tada keisuke <keisuke1.tada@kioxia.com> wrote:
>
> Currently, active_aligned_reads and nr_pending used as counters are atomic types.
> Therefore, when inc/dec in a multi-core results in conflicts.
>
> To solve this problem, use "percpu_ref" counters that can avoid conflicts and maintain consistency.
>
> Switch modes of percpu_ref to achieve both consistency and conflict avoidance.
> During normal operations such as inc/dec, it operates as percpu mode.
> When consistency is required, it operates as atomic mode.
> The operations that require consistency are as follows:
> ・Zero check for the counter
> ・All operations in RAID 1/10

IIUC, the patchset is to resolve race conditions and thus improve performance.
If this is the case, could you please include some performance numbers in the
next version?

Thanks,
Song

      parent reply	other threads:[~2024-04-10 21:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 10:29 [PATCH 00/11] md: avoid counter operation conflicts tada keisuke
2024-03-26 14:01 ` Yu Kuai
2024-03-27  1:27   ` tada keisuke
2024-04-10 21:13 ` Song Liu [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=CAPhsuW6iDjPp2B-NEqMEjb9v40US9eN88CuOc+882h6+BRCAQw@mail.gmail.com \
    --to=song@kernel.org \
    --cc=keisuke1.tada@kioxia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=yukuai3@huawei.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).