Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6290396ybv; Tue, 18 Feb 2020 13:53:07 -0800 (PST) X-Google-Smtp-Source: APXvYqxjU9/99HmJBM1iMTRiexTkvAc7G9VxVfIGrxV4H4kBWh5XuyiVFLgfbUm/r9AJI6Jr1WEu X-Received: by 2002:aca:2416:: with SMTP id n22mr2496231oic.169.1582062787236; Tue, 18 Feb 2020 13:53:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582062787; cv=none; d=google.com; s=arc-20160816; b=Y5g8WqbTm/DnH0jDK0TRiDzXMZrHg6TxnIsVj1ErIQq9ki6wOxeeWiiHfQqH51nb3p Nz0nfJlV7t7siBaOW8EcIOLj9bQc3CPlS90FgKrRVDHESOaydPSk9lSmxpyfq81QhRh+ Rkb3zS88gLp3uiEu5CCn+vwAekDf3FkL/4FnqxwwRXYD2SWtSH0ydlTvhsmVNWEw3r/X edkH7CfdYMPDURnYQ7vZH4VDtaYVqcreZSH58F67FJ+vCGilThN1G5r5tQNBfk8cMZyF GWtxAdQILUjptEwIT9uRmT3UTJ5Vtpf6lcGzYKbuLAQU5hfF0Rq8tyVdD3xasItjaum7 e0MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=qfpwxWjoJAxZXMl/fVWRFqa8SVkCAfNTchKU/DsPf1w=; b=bUv58p0W/VW2tCz88PKJomBx8+mlVZbylDydN0Romh6W50E4mWDDe1TDheZBMqsIKn 33ikidybcdj1OTAPShsj+FYg9knUHLFHJ34DpNWHhgbQPlw8X5hT86kcOjEcbkR9uIew 7LpZg+EKWEALeY6fmCKtE87EYmKDQQgzSeTps1ye2GqFhoN3nA+GVT+Csk4FeQMOd7Gl UXUne9qKnvv7l163AtQeTbgsjXbob33jSBpqAL8024BDw+RmOPj6HiUTenqTcQLtUAlj 14zREm2X0GMxfOShAuqHSLDo2K8xjxJztwIjpeiVc/H8ev/N1zK2IcdYv8QhUKlXr0fn u2CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=L8ru848X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si31950otk.225.2020.02.18.13.52.54; Tue, 18 Feb 2020 13:53:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=L8ru848X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727868AbgBRVwu (ORCPT + 99 others); Tue, 18 Feb 2020 16:52:50 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:1176 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbgBRVwu (ORCPT ); Tue, 18 Feb 2020 16:52:50 -0500 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 18 Feb 2020 13:52:35 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Tue, 18 Feb 2020 13:52:49 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Tue, 18 Feb 2020 13:52:49 -0800 Received: from [10.110.48.28] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 18 Feb 2020 21:52:48 +0000 Subject: Re: [PATCH v6 01/19] mm: Return void from various readahead functions To: Matthew Wilcox CC: , , , , , , , , , References: <20200217184613.19668-1-willy@infradead.org> <20200217184613.19668-2-willy@infradead.org> <29d2d7ca-7f2b-7eb4-78bc-f2af36c4c426@nvidia.com> <20200218212115.GG24185@bombadil.infradead.org> X-Nvconfidentiality: public From: John Hubbard Message-ID: Date: Tue, 18 Feb 2020 13:52:48 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200218212115.GG24185@bombadil.infradead.org> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1582062755; bh=qfpwxWjoJAxZXMl/fVWRFqa8SVkCAfNTchKU/DsPf1w=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=L8ru848XvUIfOJO/JXhX+NAXu7iIY1KJSx3RiY9Om4rla5Ao2A9lF+RAEJasJvP5L owCBjoiopItYsoex90j53Y8mnM3ktiY1MMNo8HH+kjWAdu7/XAWRA5giE/2/cgeZo1 UzfV3lbbxYSMkVntSf7SjA5oxNk59bYCkEmDWiuTjVcx3LjHjGBJkIBzlgkhs4ZBhL oBrJEGs94r8uGApZIYHqfv60ijxl2jPOY76N6V1bK0kLceuPY9FEScpmq72aOxPBeV O9bOSJy3x3CRdtcl3DfnYeEMl70MqfhK4trIMvG7AasW+TbAnle4v8IFOUmWPDmYWd rkWaM8EskmDKw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/18/20 1:21 PM, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 01:05:29PM -0800, John Hubbard wrote: >> This is an easy review and obviously correct, so: >> >> Reviewed-by: John Hubbard > > Thanks > >> Thoughts for the future of the API: >> >> I will add that I could envision another patchset that went in the >> opposite direction, and attempted to preserve the information about >> how many pages were successfully read ahead. And that would be nice >> to have (at least IMHO), even all the way out to the syscall level, >> especially for the readahead syscall. > > Right, and that was where I went initially. It turns out to be a > non-trivial aount of work to do the book-keeping to find out how many > pages were _attempted_, and since we don't wait for the I/O to complete, > we don't know how many _succeeded_, and we also don't know how many > weren't attempted because they were already there, and how many weren't > attempted because somebody else has raced with us and is going to attempt > them themselves, and how many weren't attempted because we just ran out > of memory, and decided to give up. > > Also, we don't know how many pages were successfully read, and then the > system decided to evict before the program found out how many were read, > let alone before it did any action based on that. > That is even worse than I initially thought. :) > So, given all that complexity, and the fact that nobody actually does > anything with the limited and incorrect information we tried to provide > today, I think it's fair to say that anybody who wants to start to do > anything with that information can delve into all the complexity around > "what number should we return, and what does it really mean". In the Yes, and now that you mention it, it's really tough to pick a single number that answers the right questions that the user space caller might have. whew. > meantime, let's just ditch the complexity and pretense that this number > means anything. > Definitely. Thanks for the notes here. thanks, -- John Hubbard NVIDIA