From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F42FC433EF for ; Mon, 24 Jan 2022 07:27:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AF0FA6B0081; Mon, 24 Jan 2022 02:27:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AA0186B0083; Mon, 24 Jan 2022 02:27:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B61B6B0085; Mon, 24 Jan 2022 02:27:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0140.hostedemail.com [216.40.44.140]) by kanga.kvack.org (Postfix) with ESMTP id 8B6146B0081 for ; Mon, 24 Jan 2022 02:27:23 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2D360181C98FF for ; Mon, 24 Jan 2022 07:27:23 +0000 (UTC) X-FDA: 79064349966.17.FDA0854 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf22.hostedemail.com (Postfix) with ESMTP id 1ED6EC0030 for ; Mon, 24 Jan 2022 07:27:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=j+tH6nHEGujTdaJ2n2+WPQs1USsQeUND+saT792MFaY=; b=H7V5NazfCuRpqJD2ZyOZ7qzuHy phksDlX5d097UBUrD3C1Pc6dIaRL3blyFjQPUDWBN+o/HC71o4JBUKo7iAAMn/o8aEi+348M3Nejt E5wozVTblU1Pe3bYYemVEiPRnWcySUIZ0lV0P2v2Q5v8GBPEVldsLBIHplO15aFkVZW3A9HigYQdN 4N8Ay0SrPRCyI2LM78tG36kXrIo1MH7gXgQ5PQwNDMdhx8TKW+Z3ewo7bZ0v4e6bUr08YHlCvZJyH H+hTD30ZWqXFATKQzOw4W6DLQKlOzAUweV6IfVc7fGfuauV3SpslRqZ+WBCB7ijsYUg95RBlZEH61 vq1P7G8g==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBtkq-002U44-LS; Mon, 24 Jan 2022 07:27:08 +0000 Date: Sun, 23 Jan 2022 23:27:08 -0800 From: Christoph Hellwig To: NeilBrown Cc: Trond Myklebust , Anna Schumaker , Chuck Lever , Andrew Morton , Mel Gorman , Christoph Hellwig , David Howells , linux-nfs@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/23] MM: extend block-plugging to cover all swap reads with read-ahead Message-ID: References: <164299573337.26253.7538614611220034049.stgit@noble.brown> <164299611274.26253.13900771841681128440.stgit@noble.brown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <164299611274.26253.13900771841681128440.stgit@noble.brown> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 1ED6EC0030 X-Stat-Signature: f1b6o5ux3utq5fzft7zgq3ffumcsczdz Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=H7V5Nazf; dmarc=none; spf=none (imf22.hostedemail.com: domain of BATV+b18af077b488c69bdec9+6728+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+b18af077b488c69bdec9+6728+infradead.org+hch@bombadil.srs.infradead.org X-HE-Tag: 1643009240-507277 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jan 24, 2022 at 02:48:32PM +1100, NeilBrown wrote: > Code that does swap read-ahead uses blk_start_plug() and > blk_finish_plug() to allow lower levels to combine multiple read-ahead > pages into a single request, but calls blk_finish_plug() *before* > submitting the original (non-ahead) read request. > This missed an opportunity to combine read requests. > > This patch moves the blk_finish_plug to *after* all the reads. > This will likely combine the primary read with some of the "ahead" > reads, and that may slightly increase the latency of that read, but it > should more than make up for this by making more efficient use of the > storage path. > > The patch mostly makes the code look more consistent. Performance > change is unlikely to be noticeable. Looks good: Reviewed-by: Christoph Hellwig > Fixes-no-auto-backport: 3fb5c298b04e ("swap: allow swap readahead to be merged") Is this really a thing?