Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3464231pxb; Mon, 24 Jan 2022 10:05:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFMk84aHp/tP1glEjxGmFfo//z8eiXTrxpx+XLUZGZj5KfQxASxw7JDRUSgcgUxwr4bKH1 X-Received: by 2002:a17:902:7c93:b0:14b:3020:1dad with SMTP id y19-20020a1709027c9300b0014b30201dadmr10692528pll.77.1643047536874; Mon, 24 Jan 2022 10:05:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643047536; cv=none; d=google.com; s=arc-20160816; b=es2z4NrbLNUKEYy0Zle6lprtFJEaEWCYe8u/webw8Pok1suZOLhz62OmlSWXzhO33V vCf3WetAIXmk3dxtT88/8IgtoDIy68awqilik+5AyYa33pEwG046cIr01/XbffdXOrXL YWeQJ7WmDfpbkd00VAY1g1yqkEVTiW5D29nASvra36bnqKedNT38LCteK6pY1BB3wDgl MjqRusLuLYCQ9MIaaE3GAH8DtdCHg4chWCwZANNhsYTozKjGDBzl5zG50ghmQDL2kA8z hAhf4FtgJnchgM7N9vu8BPhEaVahNlks1Q7POcEEShp7RDCvEg2hjrBrMe/q6hyajLx6 MWaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=j+tH6nHEGujTdaJ2n2+WPQs1USsQeUND+saT792MFaY=; b=ytRRMILm4csOrjBK+Gmp7LBBCq7gWNTpmrT2FdK2HhtjWjZj5//9EwM29REiLmv2dn Nkb7h8VyW8rfmGvnWDvmFgc6qg/7ETZPZ8uD1hSr50+0Y0YVaRh2ai4oY8p0RyfDstDi qmLlt2zRl9gY6NypZIozJqzifXw6o0Mcb0VqfoQ7auzzENrlJQ/biPeoYWqGWSAsskdf M6CXqxutBrfEBUf6oJmjMLrqzXc4497weX8jHf2ZoOezqug/s0N1JbEOu0VGqfSGM0oc yyPTEw4CiyLeit7DyLYMNVuvke7TiXwT5FxP0C67BamNUaeJ1swmpWELUlrfYay+kHnb O2WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=H7V5Nazf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l12si14358390pgj.586.2022.01.24.10.05.24; Mon, 24 Jan 2022 10:05:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=H7V5Nazf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241802AbiAXH1U (ORCPT + 99 others); Mon, 24 Jan 2022 02:27:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241713AbiAXH1T (ORCPT ); Mon, 24 Jan 2022 02:27:19 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1A5CC06173B; Sun, 23 Jan 2022 23:27:18 -0800 (PST) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?