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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43B5CC433E2 for ; Tue, 1 Sep 2020 22:33:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E28E1206EF for ; Tue, 1 Sep 2020 22:33:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="bNSviyyU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E28E1206EF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 53C5F8E0003; Tue, 1 Sep 2020 18:33:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4ED2F8E0001; Tue, 1 Sep 2020 18:33:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 401A58E0003; Tue, 1 Sep 2020 18:33:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0097.hostedemail.com [216.40.44.97]) by kanga.kvack.org (Postfix) with ESMTP id 277948E0001 for ; Tue, 1 Sep 2020 18:33:54 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D4DDE1EF1 for ; Tue, 1 Sep 2020 22:33:53 +0000 (UTC) X-FDA: 77215946346.16.fruit23_62153162709b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id A7EB3100E690C for ; Tue, 1 Sep 2020 22:33:53 +0000 (UTC) X-HE-Tag: fruit23_62153162709b X-Filterd-Recvd-Size: 2511 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 22:33:53 +0000 (UTC) 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> X-Rspamd-Queue-Id: A7EB3100E690C X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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 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