Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1878620pxk; Tue, 1 Sep 2020 09:51:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5MbY4eqlrCHs1QenXYf1Y6bsFyjjw1c0UsH797BrWgJt6zZD1C6Y6Lq0OK562S3rSL5XA X-Received: by 2002:a05:6402:3199:: with SMTP id di25mr2593180edb.315.1598979111833; Tue, 01 Sep 2020 09:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598979111; cv=none; d=google.com; s=arc-20160816; b=sXAK2LekSkVamqNZc3QPu+NnIRTbDBGudj5Ic8Wrxx2Qy2uIeWbUw5h75bECgPHxSr 4Q244/101QpLIWTftDjenCrIMo3JjFl46fWg82/sS/EkEjrwaaKZq+S8CwsGHxo4rxTX OgdHt/6KYFb+QtkEl/C5smxyizJ65LpQCC/M9YjCM7jv0b5EXALW+1M9kimh1GWh+a2s WWNv4ZbyLHHxdV95aR0hSXiTA8nycoBsJ1xiSh2KonQ0RcgOjmDQOa2n1AycCWr5Tx4D AG/6RRbVwX3R7a69EQJQy5aK1fwmBFqKGON1jNY5XPeSPlWJOdbQxXjYNQahJWyYG5Ym sz7Q== 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=nQQXUA/VGMtj9K229q9a5IZGP8mnt1kdy4SDzXnaIyc=; b=GIFAwfrT1nAb1EBdXO8BuEaeqDgFglz2hfGUfOkpp39BsZp1CHaQcXj1gfbUamwVWy ZJVWfWZpljbjt+6/TPDGjHFNA2Bv150+AMHdmrtVJ0SJOSw3SYi9xUWZZPd4CVxHGPQc xTqMI/GxD6+ya9xZT2oHutHFVan61WyKuneK/eSc5LgY4nXcikPZoONJmhPaEX67Nw5G 6KSIi/rGu2Hvs3Xe9Zro9Ps7yhSk4uaY/irHSqVE+cJus08uw2sfJYgi0D/ktr8nxd/a XJMBYmsLM/pcNNoOZVAChCpUC+v6GIxevB6VM9QMmDAdm4hEIPtavM6LYZsu1k6NzTf2 wRvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=cwij6vHu; 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 t21si968427edi.213.2020.09.01.09.51.28; Tue, 01 Sep 2020 09:51:51 -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=cwij6vHu; 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 S1732245AbgIAQsr (ORCPT + 99 others); Tue, 1 Sep 2020 12:48:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731971AbgIAQsa (ORCPT ); Tue, 1 Sep 2020 12:48:30 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31737C061244; Tue, 1 Sep 2020 09:48:29 -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=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> 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 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.