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 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 2E2BEC433E2 for ; Tue, 1 Sep 2020 16:48:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DC15D2078B for ; Tue, 1 Sep 2020 16:48:35 +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="cwij6vHu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC15D2078B 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 696EF6B00B2; Tue, 1 Sep 2020 12:48:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 61F8A6B00B3; Tue, 1 Sep 2020 12:48:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4C125900002; Tue, 1 Sep 2020 12:48:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id 324D86B00B2 for ; Tue, 1 Sep 2020 12:48:35 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id EA27F181AEF1F for ; Tue, 1 Sep 2020 16:48:34 +0000 (UTC) X-FDA: 77215076148.13.join64_61139e927099 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id BF6AF18140B67 for ; Tue, 1 Sep 2020 16:48:34 +0000 (UTC) X-HE-Tag: join64_61139e927099 X-Filterd-Recvd-Size: 2445 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 16:48:34 +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=nQQXUA/VGMtj9K229q9a5IZGP8mnt1kdy4SDzXnaIyc=; b=cwij6vHukHNI+V8tjoKhjVndSE gHsk+IJlyMeIRWYx4AVNurvCNmfsy0SfFSMaga++40VcM+HONvLSs1dSlVU1f/YssK2YwRcEUOJfG eC2qsL78uXeHG7Yf+ODvSXKT243Im987iab/BsWqck5lvdleXbt2EeEZoKOeTJcNrXh3KTCkLeNHg wjPvflkN5PE7QD3S5mgT7sYUqWp88w7GnsOlIJGSWzBlqcZa5iptC7H7xAq+f0i054XhHoHy/rxIM uq7hO4yRgYh1wlyJ8C5wYmuNV2LJpve4+FqnqANXyP8//XGjIUaVlqqWspiCL0uiEkVQX9NPThD9b XxMSXSwQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kD9SN-00018H-J3; Tue, 01 Sep 2020 16:48:27 +0000 Date: Tue, 1 Sep 2020 17:48:27 +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: <20200901164827.GQ14765@casper.infradead.org> References: <159897769535.405783.17587409235571100774.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <159897769535.405783.17587409235571100774.stgit@warthog.procyon.org.uk> X-Rspamd-Queue-Id: BF6AF18140B67 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 05:28:15PM +0100, David Howells wrote: > Here's a set of patches to expand the use of the readahead_control struct, > essentially from do_sync_mmap_readahead() down. I like this. > 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. > Also there's an apparent minor bug in khugepaged.c that I've included a > patch for: page_cache_sync_readahead() looks to be given the wrong size in > collapse_file(). This needs to go in as an independent fix. But you didn't actually cc Song.