mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: yukuai@fygo.io, Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>,
	song@kernel.org, magiclinan@didiglobal.com, xiao@kernel.org,
	vverma@digitalocean.com, linux-raid@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] md: remove REQ_NOWAIT support
Date: Thu, 30 Jul 2026 05:07:15 -0600	[thread overview]
Message-ID: <86d67b99-0bb5-4132-b412-9bb68ee4ca8c@kernel.dk> (raw)
In-Reply-To: <07b0887a-e546-4d2f-b261-1fe7adb1d6e0@fygo.io>

On 7/30/26 4:50 AM, yu kuai wrote:
> Hi,
> 
> ? 2026/6/28 22:27, Abd-Alrhman Masalkhi ??:
>> REQ_NOWAIT support in md is fundamentally incomplete. While reads can
>> avoid some blocking paths, write requests can still encounter cases
>> where one mirror succeeds while another returns -EAGAIN. At that point
>> md cannot distinguish queue pressure from a real device failure, so it
>> can neither record a bad block nor safely retry the write without
>> REQ_NOWAIT, leaving mirrors with divergent data.
>>
>> Rather than continue advertising REQ_NOWAIT support that cannot be
>> implemented correctly, remove it from md and its raid personalities.
>> This simplifies the waiting paths and avoids exposing incorrect
>> non-blocking semantics.
>>
>> Fixes: bf2c411bb1cf ("md: raid456 add nowait support")
>> Fixes: c9aa889b035f ("md: raid10 add nowait support")
>> Fixes: 5aa705039c4f ("md: raid1 add nowait support")
>> Fixes: f51d46d0e7cb ("md: add support for REQ_NOWAIT")
>> Suggested-by: Yu Kuai<yukuai@fygo.io>
>> Signed-off-by: Abd-Alrhman Masalkhi<abd.masalkhi@gmail.com>
>> ---
>>   drivers/md/md-bitmap.c   |  9 +---
>>   drivers/md/md-bitmap.h   |  2 +-
>>   drivers/md/md-llbitmap.c | 10 +----
>>   drivers/md/md.c          | 15 ++-----
>>   drivers/md/raid1-10.c    |  8 ++--
>>   drivers/md/raid1.c       | 91 +++++++++-------------------------------
>>   drivers/md/raid10.c      | 80 +++++++++--------------------------
>>   drivers/md/raid5.c       | 13 ------
>>   8 files changed, 51 insertions(+), 177 deletions(-)
> 
> Applied to md-7.3 with a few changes, please check:
> 
> md: remove REQ_NOWAIT support from raid1/10/456 - 
> kernel/git/mdraid/linux.git - song's fork of linux.git <https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux.git/commit/?h=md-7.3&id=3fe5b7c9fb72ccc29bfd0f955b124892af7e3674>
> 
> - rebase raid1/raid10 with latest code;
> - keep nowait for raid0/linear;
> - keep nowait for md_handle_request, as raid0/linear will need it;

What's the plan for making REQ_NOWAIT _actually_ work with md? Just
yanking it wholesale is a massive performance problem, and it will
regress workloads. Has any time been spent on making this more solid?

-- 
Jens Axboe

  reply	other threads:[~2026-07-30 11:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-28 14:27 Abd-Alrhman Masalkhi
2026-07-11 15:21 ` yu kuai
2026-07-30 10:50 ` yu kuai
2026-07-30 11:07   ` Jens Axboe [this message]
2026-07-30 12:41     ` yu kuai

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=86d67b99-0bb5-4132-b412-9bb68ee4ca8c@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=abd.masalkhi@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=magiclinan@didiglobal.com \
    --cc=song@kernel.org \
    --cc=vverma@digitalocean.com \
    --cc=xiao@kernel.org \
    --cc=yukuai@fygo.io \
    /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

all inboxes | Powered by JetHome®