From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F76F38C421 for ; Wed, 24 Jun 2026 08:08:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782288499; cv=none; b=DaZx9GOedMJZYjVdrxc/nj4kD6JN88TJdSTPr9p6Av4BwHH2BqFUcdb4VJauXeJ+aiWH/vly9Mt0g/GER5ZOZC1ZARLa5j7XXPtcSx7IpMgfPmVEkW8jdcHcG0GB3Uj/xUZ5nixXvBTw/b3IqZtNry7Vb9dLDbJL6wfja3/81Xs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782288499; c=relaxed/simple; bh=eAWUuP8xKywSlpbDj5vHPgvt1HEPv2PVR5iSivYStj4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=pEOf21FMa04D9IuEkiKxcVScWnVJKTzOETsuhIH2IH3DrMECTKTy1a7sOglYQCnyFfoVhUnA8tSrfEcaCsEdNoghj9WgUvyrqAJXMNX+e7ZD5+kvXIuxLi0HoQkXIWKRL+3TVTzNNWAdR2SB8W3ROkV/7ZqKMNJVsjmY7InxyCc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=I9vLYQM6; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="I9vLYQM6" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4922244f7c7so6592105e9.0 for ; Wed, 24 Jun 2026 01:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782288497; x=1782893297; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=eAWUuP8xKywSlpbDj5vHPgvt1HEPv2PVR5iSivYStj4=; b=I9vLYQM6SzLITCcrde55x1vKzeLUpsCnbLmEqK5VNb3HhRRIGKAfsGvykgF04s/m6c pkrISSubXErweY//67kA+UB6i445e0DrtLMBAa1lZeCHOBW5b7vDfjIXyzloakqWgvB8 9OYayfcodhzJzjohXYbE0v8pp1rkfxRI4g6ofn6Og/v/yq1lgZTwQF/8wcguF644raSE 8+agN3rIP5goxRjHTRQWrqTL6V2GBTtfL6UbhN0UeW8+zmCTkYDS9t9LTHhKgCv/8hOa Zecar4RODqGVxlSC+IaF/BFNspxXIkH8169l25ItTRathGdzjP4obBzB/hOMK15jPPjQ UngA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782288497; x=1782893297; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=eAWUuP8xKywSlpbDj5vHPgvt1HEPv2PVR5iSivYStj4=; b=UqEwbGB13xPnaaWigWMhC5QtgzJOkMZqhzkqbZ9fY4bBB3wfQcA9nFOb0l3dLWEfpy nDLhE8w9inXORUh7y+rRQuXAyLy/TyZdu+0JSvKEy22T7hA0Z5yOhMK2SBcXwEkXndNt IUuxtUgrvNpV43/uL3LlfL8p6R6VdjDgT0Gnu6mgCkxogfcluD43oSlzGXH8ls3bdk+4 jgoVfZ6tfncXmsgW2/KGl9QSNl9eqhSVep2GZcpQHr8X5R7mJftogj1LSSIOjVM/Y2H7 o7zBW/iG47mKu7LBcGk+yTYCpbsUllzPDP/l1wfuHo5p/R2bgG/JXETADUNYdO39HBO4 JEmg== X-Forwarded-Encrypted: i=1; AFNElJ9xmSDuPpQV656/tLyYP8m/f1P3VxhOD7m/bWZ3+DieivGGZmEbVXso8wLAy555MeTwZVH/hGLPObksnns=@vger.kernel.org X-Gm-Message-State: AOJu0YwIRl29pnkXMGLafmM8FCMXCzNJAiIremXwDAKg2yDmvS5CxuOf QHcrao8B/zHHE/WNU0UqF5GANylykx2HUdpf8/3Ou8Bu6CqW/JVTSY8N X-Gm-Gg: AfdE7cku3y1o67kRMxep9WEy+HMcdrwI1e1RJUjCBWUkrc12RqER6sl9oK1D3iB+Yt+ 1dM0pKqCsteB+wWsIhYGamRBLN7yrW4omipaQxV6egyGP0/seR4bdF7GEDEEmNYi4f6VZakWUNk wWjkUkRCecbCvs6/rxPRhBOXRaSR0wPnOthLNhrYY3YEFDIzmytzQF6viaiWF6NAaO/RAegYZh9 hVHf/NbW+LzoHY4//xgcpyaIDc5xq3tElUNIGMZKoEJeQ2w1VOaup+9S8ZcdO9xm1lLhjTNF28R FDxM0TXsvlpbOe75fVK7ERaoYgnJ6cJSqefCnnj2eMk/FW5jvCeqbduFjbhq1mruAG+uXatfzdO W2dTyPivlpfWc2TfoqG8T8TXjrVubCw0zlqfhn/OFeaHwSl4xbgaLUXTUJnGeaYUn9MDmc9Mlam SBPGDeSdaVLAAGik2q6rxSVuKX5y3hn/1j24+vwr6SSUPSkQ== X-Received: by 2002:a05:600c:1906:b0:490:d38c:7836 with SMTP id 5b1f17b1804b1-4926084aa9fmr29128995e9.3.1782288496763; Wed, 24 Jun 2026 01:08:16 -0700 (PDT) Received: from Abds-MacBook-Air.local ([141.2.113.191]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-46c1ee018e8sm4831624f8f.11.2026.06.24.01.08.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2026 01:08:16 -0700 (PDT) From: Abd-Alrhman Masalkhi To: yu kuai , song@kernel.org, magiclinan@didiglobal.com, xiao@kernel.org, vverma@digitalocean.com, axboe@kernel.dk Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai@fygo.io Subject: Re: [PATCH] md/raid1: honor REQ_NOWAIT when waiting for behind writes In-Reply-To: <868207d0-d20f-42e8-8257-f57816987bf5@fygo.io> References: <20260611083514.754922-1-abd.masalkhi@gmail.com> <61361f20-f81c-46c3-bdd2-3de24e90a0aa@fnnas.com> <868207d0-d20f-42e8-8257-f57816987bf5@fygo.io> Date: Wed, 24 Jun 2026 10:08:15 +0200 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Jun 24, 2026 at 14:39 +0800, yu kuai wrote: > Hi, > > =E5=9C=A8 2026/6/22 2:08, Abd-Alrhman Masalkhi =E5=86=99=E9=81=93: >> What if on a partial nowait failure we just end the master bio as >> success, but set NEEDED on that chunk's bitmap counter and start_sync() >> picks it up for resync? That way we don't have to decide why rdev2 >> failed at all, resync just copies from rdev1 to rdev2 without nowait, >> so if it's a real bad block, end_sync_write() records it then. >> >> We kinda have the idea of ending the bio before the write lands on all >> mirrors in write-behind already, though it's not quite the same, there >> the deferred write still lands, here we ACK after it already failed and >> lean on resync to redo it. >> >> My worry is the loaded case: AGAIN under queue pressure isn't that rare, >> so we might end up triggering resync frequently. Do you think that's >> acceptable, or is dropping nowait better? Happy to prototype either way. > > Yes, AGAIN under queue pressure isn't rare, and I don't think trigger res= ync > for a nowait IO failure is acceptable. This can cause lots of offline IO > pressure which will affect disk service life. Meanwhile, resync will cause > performance degradation for user. > > I still feel dropping nowait is better. > That makes sense. I'll drop nowait for md and post a patch. > --=20 > Thanks, > Kuai --=20 Best Regards, Abd-Alrhman