From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.95.11.211 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796375079; b=DjooOoXvNSyGXQ5BwmMaj1WwPzaoNe5yJUiTcgGCoTlbwmdOp0WpPY97xLpkCjt8PAsF 1xjZxnnRrB9e8ef2SPjqYaxAF+YTFacYaRYPRbzvqHeabCBQrXRUWTyKsJ2kA5V4UwBYM ifPxx4eijQRpNP8/VXzAxT/Sek7OuTFNAKspU7Mp7yfZ9g42JlcvvGOJn2Uhpb09wWRFC fbm/BpocpoUEsUmEzIYCw5e2+LRLSnyVWw/X9MTs1hzkR/LfiieWFP1VykCRBsXZ+4yIq xWcIXsQ0ZekIXA2ynDkg48bhtEdQkghkua5B+DQPgwnrOxJu8IBdKDbUQLV3hqNLxqQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796375079; h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; bh=TeZDbcs1+SvzSWOm21OpuUPQiVw3x41ND+IP63xFBzs=; b=ic7FMYI8toabrvRVVO8peXllDt6JMZrFrcer4vl06oVLU6s17Ssaf7rYB+IjAuvBzNy5 2Z3TQvcMEsg47SbnKiK8rhQgyHuULisBVVPPthIwhOFaMv3iOu0D0wJf57kJozeSj6lOA uklTlAM1l/w6EW4298Skhbd027XVzb7scHrpXp+10alRDJf2H16V83772EotL/x39AmE0 TPBwqqH50acwajubKNJ1kDZDNqaRicEgWBayl1p/oBjNbOcXZLqfrdngjORpXy2o2IUMu UOsFfh2x3OGP65iZxxoEfvdklcsvCBIiCHAOYKYD0LVwds+VYIisbW+lxVo+J8niRtg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.remote-ip=213.95.11.211 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F1A9606A322; Fri, 4 Dec 2026 09:04:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4F1A9606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 976F968B05; Fri, 4 Dec 2026 10:04:34 +0100 (CET) Date: Fri, 4 Dec 2026 10:04:34 +0100 From: Christoph Hellwig To: Carlos Maiolino Cc: Christoph Hellwig , brauner@kernel.org, tytso@mit.edu, changfengnan@bytedance.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] iomap: don't use iomap_iter for simple dio reads Message-ID: <20261204090434.GA20218@lst.de> References: <20261203083744.2089627-1-hch@lst.de> X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, Dec 03, 2026 at 11:28:10AM +0100, Carlos Maiolino wrote: > On Thu, Dec 03, 2026 at 09:36:40AM +0100, Christoph Hellwig wrote: > > Simple dio reads do not use the iter model, instead they only support > > a one-time mapping. Removing the relatively larger iomap_iter and > > Remove? Yeah. I've reworded the commit log a bit more as well. > > provide separate callbacks that directly do the read-only mapping. > > > The downside of this is a bit of code duplication for the file system > > callbacks, although even that has the small upside of only inlining > > the smaller special-purpose version compared to the generic one. > > If the concern is code duplication here, perhaps the duplicated > verifications could be factored out into something like: > > static inline _iomap_checks() {...} > > Wouldn't that still keep the special-purpose version inlined? > > Not that I really care about it or that it's something for this patch, > just a future cleanup. I'm just enumerating the downsides. The different side of the same coin is that this now has optimized to the bones callbacks for the simple read case. > > diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c > > index 0d6ce1a30b2c..6fa1ca9c30b7 100644 > > --- a/fs/iomap/direct-io.c > > +++ b/fs/iomap/direct-io.c > > @@ -980,30 +980,32 @@ static void iomap_dio_simple_end_io(struct bio *bio) > > This hunk fails to apply to me because... > > > ... Somehow seems the > > if (unlikely(!iomi->inode->i_sb->s_dio_done_wq && > ... > } > > is missing here but I'm not sure why. I tried to search in vfs The patch requires iomap: don't call sb_init_dio_done_wq from the simple dio read path and I didn't think of that, sorry. I'll resend a series with both of them.