From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-00364e01.pphosted.com (mx0a-00364e01.pphosted.com [148.163.135.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 737243655E6 for ; Mon, 10 Aug 2026 16:10:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786378230; cv=none; b=L0fD9pmkMHEML02tonk1c36WSkgIKwEc5/XICGmpbhuwSqfFymStha5uLkub2n2w1mLwb77mTLPqYoxGGgPfVBvXNu3LIeofGuYVxICK3yN7CHJFrogsPDTkai8qTkIovwMB6B1PWcvbbuAMc8pTgZpDmTsiAsx3uGU16tJZbZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786378230; c=relaxed/simple; bh=/AF03rHuJDyQBfFPu4ugDlBCG/z+8RMKjZwI9veqS/M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UyclqE9Jm58/VDgx9nkO9/0/GmFYYBGhyKIw8RMxiELX0rfS05olaVDpSwiIxEcUbr5z06HVC3yXI6QU1v8lies2/l6FWs/75qcmYQ9vx+m43h/0vL7sJm9dRoeU+TzUj/SSfMZPjTc4pG8bZWr7dcKSaf86WdhRb22KVDJo+ho= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=columbia.edu; spf=pass smtp.mailfrom=columbia.edu; dkim=pass (2048-bit key) header.d=columbia.edu header.i=@columbia.edu header.b=CyN46gAF; arc=none smtp.client-ip=148.163.135.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=columbia.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=columbia.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=columbia.edu header.i=@columbia.edu header.b="CyN46gAF" Received: from pps.filterd (m0167072.ppops.net [127.0.0.1]) by mx0a-00364e01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67AFj9gP3224656 for ; Mon, 10 Aug 2026 12:10:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=columbia.edu; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pps01; bh=f0bZ ditIahGukFZnD48c1dgtAdNiTQKz0eXUlzu/oaY=; b=CyN46gAFzGTv5sCQAiJ+ xhJD7DYCrTeiGETf4yox+1+3CDtlrqNvkTFW4J4vobHmLbXUHDE3doFn2xz6glN6 k3BaKUBMntJiRVVcyGVM+aPSYqFm+iaf0XYNNoNBeRDmY9JppLG3h/hrnHSqxXvv vjK8KVgvBMjsQt6iPYPncBt/4wLvSNnFasjiicrFClgJgyo8becIWZAI0ulxYnrR 6gWJbEIwkZVX0gc0uqUhLZ6UiI8xM4a2dmU0T4jB029Z7GGdBlXVd/OkAW3bqRIn Cc8m/OyKwiMnlPkQ7RPRQxLQ1PMxJu4vRWd97Of20SU/QcoKr4fq6yE9zIqHq0a3 1Q== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-00364e01.pphosted.com (PPS) with ESMTPS id 4fy3jdbq3p-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 10 Aug 2026 12:10:22 -0400 (EDT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-5276aa86d00so20750001cf.2 for ; Mon, 10 Aug 2026 09:10:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786378221; x=1786983021; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=f0bZditIahGukFZnD48c1dgtAdNiTQKz0eXUlzu/oaY=; b=Wt9/6d4Gj4NcriFJoLdrm+hxJP3NP3x+2TiruNzkORCZ6ujUNMbGK0WVDmCZ8q6n8q 9VjGzKlZHZlFL1X9rB+aR0oLPaEZkPCVsDnUmEa6nkMicpsYceTunMsY4g3HRPY/jeM3 vUJRhwnIqLFjvnLTzvzZZuAIN3yZj9n7FWdSpXucWork3Kt+Jv8myNTEf5cuwfmHEH9b 8YJ7KyehMZTItvetGr+D7NAoJ5vaFwKLEuGN5C8/IV1nnkJy8E96fPDbh9SS5HU6YxY9 y++Q/uVyQwL7miwH2tIiaeowsuso8tYG5J4yCOOVGeMFq8J6pyJkSdbyZE6j2+ATR/L4 BM7Q== X-Forwarded-Encrypted: i=1; AHgh+RrXYKR3bFfGakLto3bd3SwNl+qYXk6SsDgyU0GgAHSY16y7/hLNTOF02OzxGndTSDIRfnt1L/AMs+ysXEc=@vger.kernel.org X-Gm-Message-State: AOJu0YyBMXgkkkG7+hbcS0439YD3GnZeFyrFvRPMHf3bSEfYa/TZAVyF WIknUX+qNqPIpcraSAUlAODxqUTVbLuunbYCfzSolCTs+7Z9BIrQoGApwWpgA/q3xHS8wOLYZ2L tAoICG9Se3VXCLoLY5Ek3FuyrDSMJ88TSDNMTHkFekicD8Pe95MNOSFo4ibD5YQ== X-Gm-Gg: AR+sD10JT6G64wKDTZ/YkSNQfJjfT4/wUJMnTr3ijw0WKnFoSrB05Q8PEzk/XZK8nrB XlCVW2kHL7U3sJa3LZYBLwiq46cBwDZNZDrcykys6NF1Zc4wHeIGSIAzB7LlQe4OIeRC60KmO+l eYDpxsrhaFxFB/3icJqUnvCMbbWC7TCFYEcRKUQlcl8ILCiSBTlPcuSsw9dr+P6LonIhiq7svIB hg8w67RyCyr7/DjSlyNAFVYXg3brwJLx+b6MjV9VuxLO6S8uScDayMRvqdIB148dbjYx73Z919L 9bAYmtsXHNA0DzVWTR5fbsq4V2QuQ6Hp5Hh1RgqXh50LCGdWIMxLcuc4cncr0ditEZOSiw2H3u+ BAmpyPawnoFCdR14nxrZybwsAgsruf5eUDqoX9VtwhoC2iAg+8EVqCg== X-Received: by 2002:ac8:7fc7:0:b0:519:89b6:78b4 with SMTP id d75a77b69052e-52d20a819bamr234404581cf.40.1786378221622; Mon, 10 Aug 2026 09:10:21 -0700 (PDT) X-Received: by 2002:ac8:7fc7:0:b0:519:89b6:78b4 with SMTP id d75a77b69052e-52d20a819bamr234403791cf.40.1786378221085; Mon, 10 Aug 2026 09:10:21 -0700 (PDT) Received: from [192.168.0.165] (bzq-79-179-7-133.red.bezeqint.net. [79.179.7.133]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4997402a89bsm4159805e9.0.2026.08.10.09.10.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Aug 2026 09:10:19 -0700 (PDT) Message-ID: <8eb00a03-d6c6-423e-9768-48fd2566f11d@columbia.edu> Date: Mon, 10 Aug 2026 19:10:16 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: RWF_DONTCACHE regression fix for xfs To: Christoph Hellwig Cc: Jens Axboe , "Matthew Wilcox (Oracle)" , Christian Brauner , "Darrick J. Wong" , Carlos Maiolino , Alexander Viro , Jan Kara , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Sandeep Dhavale , Hongbo Li , Chunhai Guo , Dave Chinner , Bart Van Assche , Hillf Danton , Sebastian Andrzej Siewior , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-erofs@lists.ozlabs.org, Christoph Hellwig References: <20260730-blk-dontcache-v7-0-3e8e6850068d@columbia.edu> Content-Language: en-US From: Tal Zussman In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Info: AW1haW4tMjYwODEwMDEzOSBTYWx0ZWRfX7NCOHINiqDjm 3/4UNL3hoXF5CsweazhWM4ppcs27cpvNm7e5/MWVO99aXDN6hZPO3fOXas//PnJDvPz6qWDVZkb iwOtcVCY8UufCzxKrWzfr1CNmEQoUSKEefUo55yuB4Ij+N36OyNx X-Proofpoint-GUID: 4XGCwavUYe6yhtCtUPhqLN_DS-y0IHJ6 X-Proofpoint-ORIG-GUID: 4XGCwavUYe6yhtCtUPhqLN_DS-y0IHJ6 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODEwMDEzOSBTYWx0ZWRfX3f7I7XwDs4iN IB78mEuTcO+vLCW8X5FI5JYzIgyLa5jGcaLnPc0kp1irl0XhBDgM1AZoKEVGXsyGP4QplgtMJlU zfXwEFmFfWHA1luADixqKxFIxRg4MlMLJfLyRIETp5FNtllo7kvLjfVi13hiId1eTZi64cXr91o AC5gauvwlz+ZOX+E19Fkj/aBGipecYfGuB537YlJ/MYAKDrEBwVSv0Q9Rb3G7k2oCwqpySBnni+ GUcHPRE4fjU+6yihjcp3Rx2NiygGxlP+ICyvVhHaVY+2zvlLd42kxAbrgVhAEEQ/HsWPWDzNWI2 Wpz5if66FBw88rsy7qnZtzs7UIPBP4fKMv3V0ORCDuXT2t7A9strYOISy7zfv6V8KnQNhS1wyjV C/I0N+9f3JH9jHejX/TuOduz4s2OG/U6C5IOpgqPuEufnsLv0fQtXcGZW3/dS0W4BVCbdJleeo7 pHdPMC5ltlk+131ABQA== X-Authority-Analysis: v=2.4 cv=JPQLdcKb c=1 sm=1 tr=0 ts=6a79f7ee cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=LRATYcvZeiQrLRB5MfbBvg==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=x7bEGLp0ZPQA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Da8U98TiO7q1upZEImrf:22 a=SsB-OO3BMngHh3ZO9fOt:22 a=dys9yn6NND9hJ5TNHOUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-Virus-Version: vendor=nai engine=6900 definitions=11871 signatures=596817 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 lowpriorityscore=10 adultscore=0 phishscore=0 spamscore=0 suspectscore=0 bulkscore=10 clxscore=1015 impostorscore=10 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608100139 On 8/10/26 10:45 AM, Christoph Hellwig wrote: > Below is Tal's suggested fixup for xfs with the whitespace damage fixeѕ. > It should probably be attributed to Tal instead. Can you handled it > from here and send it to Jens with your signoff/authorship to avoid > the performance regression in XFS? > Yes, will do shortly. Thanks Christoph! > From: Christoph Hellwig > Subject: xfs: avoid double deferrals for RWF_DONTCACHE writes > > XFS already defers some writes to a workqueue when transactions are > needed to process the I/O completion. Disable the block layer bio > task completion in this case to avoid a major performance drop. > > Fixes: efbde6f9f449 ("iomap: use BIO_COMPLETE_IN_TASK for dropbehind writeback") > --- > fs/xfs/xfs_aops.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c > index f73e26d9c9f9..059846a8d65c 100644 > --- a/fs/xfs/xfs_aops.c > +++ b/fs/xfs/xfs_aops.c > @@ -372,10 +372,14 @@ xfs_writeback_submit( > } > > /* > - * Send ioends that might require a transaction to the completion wq. > + * Send ioends that might require a transaction to the completion wq, > + * and disable the block layer task completion for them as there is no > + * need to defer twice. > */ > - if (xfs_ioend_needs_wq_completion(ioend)) > + if (xfs_ioend_needs_wq_completion(ioend)) { > ioend->io_bio.bi_end_io = xfs_end_bio; > + bio_clear_flag(&ioend->io_bio, BIO_COMPLETE_IN_TASK); > + } > > return iomap_ioend_writeback_submit(wpc, error); > } > @@ -481,7 +485,14 @@ xfs_zoned_writeback_submit( > { > struct iomap_ioend *ioend = wpc->wb_ctx; > > + /* > + * Defer all completions to our workqueue as all zoned writes require a > + * transaction to be persisted. This also means we never need the block > + * layer in-task completion for a task context. > + */ > ioend->io_bio.bi_end_io = xfs_end_bio; > + bio_clear_flag(&ioend->io_bio, BIO_COMPLETE_IN_TASK); > + > if (error) { > ioend->io_bio.bi_status = errno_to_blk_status(error); > bio_endio(&ioend->io_bio); > -- > 2.53.0 >