Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp39356pxk; Tue, 1 Sep 2020 15:34:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQhmsJQdZKPGfJ6GLiTg1a22RP19CpfAydCSMOwfkvuFOkKS7wv313vjdSYZtDF7nXsIcO X-Received: by 2002:aa7:c7c1:: with SMTP id o1mr4012280eds.368.1598999686568; Tue, 01 Sep 2020 15:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598999686; cv=none; d=google.com; s=arc-20160816; b=XCkX7wbimbq5SZ1EYTz+/KQzHlWu72nV3+Ld/CQHVFuDP3pbqquKJOa0OYpWUfMNwl a3z8sYxEFCVZqA+T2vWTg4GLr3MCbH2tB6vizmJpFfsBSyL29tlNJych0Hz4XeWYWgd7 uUzkAI0YEb0++KtmPxVU9mLsYE9ZydU48NCsNxYhYmGeW/RbMlDg5Lmaq3MJxX91QXHf AHVq+a5J3jCZWMPZCI2BDsCGkgf+L5vUA4jkEpcIpYLhNNKpl58YbQL5s4PfJbdYJhck n1Mut4+DJZcXYPIS1J1WKBdZ60m6WP4uEdRteQbJptnadOVaFJozvfc065dwv3+oZ5tO 6BCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=TmyJ0BbLbbSDuQuruMjrmfeIja4KHT+NlxrM3Pes6YQ=; b=rTzgwzd+7163+Y1f38OKM54eSG1idpP9To+ib40zzr3dBG4tDbYb5icFMevgV/+Zlc ZG8v+WM8zB5sPhUd7ejZRAaR1RpAET2/o5AlDLOTN2zcMx4EIabLVeqzQJsn0Dmx4AkK RUa8ue2fxY7uO/QSEBG9KS5XmgOb2BnUc6y6JVmRqQPSOsZkI+Nj1ZusfO11NUyCKDwo DjqfI3hGt4XM51QFpYE8oNIGfdUE+1kVl8OL3hHT/4J3iKQSD7xFyjXc030BG3oRD5D8 h0kVNYlD8uZUPKQHaCVG42r8FbeFO9BCH46BkCqxG6hypFK0qyofzVjMyhmze+A39BpQ pM3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=bNSviyyU; 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 z20si1432389edq.490.2020.09.01.15.34.23; Tue, 01 Sep 2020 15:34:46 -0700 (PDT) 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=fail header.i=@infradead.org header.s=casper.20170209 header.b=bNSviyyU; 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 S1727822AbgIAWdu (ORCPT + 99 others); Tue, 1 Sep 2020 18:33:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726355AbgIAWdt (ORCPT ); Tue, 1 Sep 2020 18:33:49 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DBD4C061244; Tue, 1 Sep 2020 15:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=TmyJ0BbLbbSDuQuruMjrmfeIja4KHT+NlxrM3Pes6YQ=; b=bNSviyyU19ly/efQ8h6QZNOBnx q8dhdpJIEhjLrPrzMRfmucfTIR1CbSAG8NKV64gk96L+lp5t3QizOYmMFe2287hTrIg2stFQkNdF7 swELd6UeLDNj2iq0B+jXNa7N9XVWGCC/rCxiRy8V4BDpP8huOD+bBZyZIbUoQLmE1+FT4neaCHv+X W4gYVx/uizPrNG0D6+pK9AKjb9hD0A2ab0teQ9kRQGmNsmARWR0exsDRJXzaFA9jpfp5yf9qMZr2U YcEeg3NI3g9nerxd4CXoCBwOcf1xH7sPgYvRQ+Phao/qarhYkj1ymPY9HfTLSOQ5EzOcPMFbKQm0F ghp4rCNg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDEqY-00068H-W2; Tue, 01 Sep 2020 22:33:47 +0000 Date: Tue, 1 Sep 2020 23:33:46 +0100 From: Matthew Wilcox To: David Howells Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/7] mm: Make more use of readahead_control Message-ID: <20200901223346.GV14765@casper.infradead.org> References: <20200901164827.GQ14765@casper.infradead.org> <159897769535.405783.17587409235571100774.stgit@warthog.procyon.org.uk> <423539.1598989454@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <423539.1598989454@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 01, 2020 at 08:44:14PM +0100, David Howells wrote: > Matthew Wilcox wrote: > > > > Note that I've been > > > passing the number of pages to read in rac->_nr_pages, and then saving it > > > and changing it certain points, e.g. page_cache_readahead_unbounded(). > > > > I do not like this. You're essentially mutating the meaning of _nr_pages > > as the ractl moves down the stack, and that's going to lead to bugs. > > I'd keep it as a separate argument. > > The meaning isn't specified in linux/pagemap.h. Can you adjust the comments > on the struct and on readahead_count() to make it more clear what the value > represents? It's intentionally not documented. This documentation is for the filesystem author, who should not be looking at it. Neither should you :-P