From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (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 20144480DCF for ; Tue, 25 Aug 2026 13:37:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=96.67.55.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787665049; cv=none; b=CvsT1q3rq1e6jKK2s55doiOWm2d3ROuZr2hT4x4YwH00+c09S8BkaWmsSOj0sU1E6oZRwfgeDotmgdG066gIfvENiZ/t4lnnUyJhinf3EiclTgHJTyaf3JZ04JpXJyJALMPDu3lSCm2CqvdHxQrYN/pKKEy7qZY/4dYIFXd5GGE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787665049; c=relaxed/simple; bh=pCW1SrRc9TdfDbK0btXS320EQf/SwGeEdsMu8TkCBi8=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=s+qtUAYRsZeKuUW70T06UGAsAu8IrLYMzctl3WzIEXnOdlDItyYUUi6RjnM68ZH13CHxgoEirW3nqMjgZ6UzicvbVvy0DvXEpvBCe8qm1pk7zIcy4w8kxRaQomwPWorZVDQTb2dVuAD0uXPRVEyVQXZGRKbdYcWI5wMC16cIXVg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=surriel.com; spf=pass smtp.mailfrom=surriel.com; dkim=pass (2048-bit key) header.d=surriel.com header.i=@surriel.com header.b=nJtI+U+s; arc=none smtp.client-ip=96.67.55.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=surriel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=surriel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=surriel.com header.i=@surriel.com header.b="nJtI+U+s" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=surriel.com ; s=mail; h=MIME-Version:Content-Transfer-Encoding:Content-Type:References: In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID; bh=pCW1SrRc9TdfDbK0btXS320EQf/SwGeEdsMu8TkCBi8=; b=nJtI+U +skEo/xtAPNWY+Pt/aZ55afKPl/U9qwxu+GZvWaL5oKWwGKHChMkl63naXjMRF2NPMrgEL7jQVnlV TySRY2nVE/aCJMdcjOg/HlwxXqaZ6Z/toX9y/ZxkkX4sIx4yHSWwjPn299Pi1FA/wiM2L8rO9nX3s hS7eRw4ernxPTnRFK+9WX9POFKleZjBl2H6VWZXjlofGHuB1x935cNJEoeeU17LoTsXeXZ0lcXHda 5nuQwE9GjbSrgwtGgEla/eG2pfXC4B1Lf+MtEDqedKHUyeQWPsvfOQrJfjLG0Zcc4uG0UFv7XJfIP xEx7O6lFYT5rhZpAgxLbn8pW7GvQ==; Received: from [2601:18c:8100:a0e0:5a47:caff:fe78:8708] by shelob.surriel.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.5) (envelope-from ) id 1wyrKv-00000004DAx-1RiJ; Tue, 25 Aug 2026 13:37:09 +0000 Message-ID: Subject: Re: [RFC PATCH v3 0/8] batch lookups in follow_page_mask() From: Rik van Riel To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, Andrew Morton , David Hildenbrand , Jason Gunthorpe , John Hubbard , Peter Xu , linux-mm@kvack.org Date: Tue, 25 Aug 2026 09:37:09 -0400 In-Reply-To: References: <20260811025157.1632867-1-riel@surriel.com> Autocrypt: addr=riel@surriel.com; prefer-encrypt=mutual; keydata=mQENBFIt3aUBCADCK0LicyCYyMa0E1lodC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igOHg+4zyzdDgKM+jp0bvDI51KQ4XfxV593OhvkS3z 3FPx0CE7l62WhWrieHyBblqvkTYgJ6dq4bsYpqxxGJOkQ47WpEUx6onH+rImWmPJbSYGhwBzTo0Mm G1Nb1qGPG+mTrSmJjDRxrwf1zjmYqQreWVSFEt26tBpSaWsgdmFuIFJpZWwgPHJpZWxAZmIuY29tP okBPgQTAQIAKAUCW5LbiAIbIwUJEswDAAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQznneko TE3oOUEQgAsrGxjTC1bGtZyuvyQPcXclap11Ogib6rQywGYu6/Mnkbd6hbyY3wpdyQii/cas2S44N cQj8HkGv91JLVE24/Wt0gITPCH3rLVJJDGQxprHTVDs1t1RAbsbp0XTksZPCNWDGYIBo2aHDwErhI omYQ0Xluo1WBtH/UmHgirHvclsou1Ks9jyTxiPyUKRfae7GNOFiX99+ZlB27P3t8CjtSO831Ij0Ip QrfooZ21YVlUKw0Wy6Ll8EyefyrEYSh8KTm8dQj4O7xxvdg865TLeLpho5PwDRF+/mR3qi8CdGbkE c4pYZQO8UDXUN4S+pe0aTeTqlYw8rRHWF9TnvtpcNzZw== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.2 (3.60.2-1.fc44) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2026-08-25 at 00:52 -0700, Christoph Hellwig wrote: > On Mon, Aug 10, 2026 at 10:51:49PM -0400, Rik van Riel wrote: > > follow_page_mask() walks the page tables one page at a time, even > > when the > > caller asked for a whole run of contiguous pages. Every page of a > > large folio > > re-enters the pmd/pud/pte walk and re-takes the page table lock. > >=20 > > This series changes follow_page_mask() to return a page count and a > > fill an > > array of pages, instead of a single struct page, so a walker can > > hand back > > more than one page per call. >=20 > And what many including the most performance critical callers want > instead is really a single bio_vec.=C2=A0 Maybe we can go the extra step > for > that, as it would reduce the number of calls into gup significantly. >=20 Which code are you referring to here? blk_rq_map_user() seems to end up calling pin_user_pages_fast(), via iov_iter_extract_user_pages, and it directly fills in the bio_vec's pages array. Is there another performance critical path that goes through the slower get_user_pages() path? --=20 All Rights Reversed.