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=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 B3EB1C433E0 for ; Sat, 30 Jan 2021 21:23:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 26EE064E0A for ; Sat, 30 Jan 2021 21:23:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26EE064E0A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 52CCF6B0005; Sat, 30 Jan 2021 16:23:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4B8826B0006; Sat, 30 Jan 2021 16:23:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 380DC6B006C; Sat, 30 Jan 2021 16:23:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id 1F4526B0005 for ; Sat, 30 Jan 2021 16:23:46 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id AA3BC1EE6 for ; Sat, 30 Jan 2021 21:23:45 +0000 (UTC) X-FDA: 77763718410.14.fog59_08035a8275b4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 8622618229818 for ; Sat, 30 Jan 2021 21:23:45 +0000 (UTC) X-HE-Tag: fog59_08035a8275b4 X-Filterd-Recvd-Size: 4981 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Sat, 30 Jan 2021 21:23:44 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sat, 30 Jan 2021 13:23:42 -0800 Received: from [10.2.62.101] (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 30 Jan 2021 21:23:30 +0000 Subject: Re: [PATCH v2 net-next 3/4] net: introduce common dev_page_is_reserved() To: Alexander Lobakin , Jakub Kicinski CC: "David S. Miller" , David Rientjes , Yisen Zhuang , Salil Mehta , Jesse Brandeburg , Tony Nguyen , Saeed Mahameed , Leon Romanovsky , Andrew Morton , Jesper Dangaard Brouer , Ilias Apalodimas , Jonathan Lemon , Willem de Bruijn , "Randy Dunlap" , Pablo Neira Ayuso , Dexuan Cui , Jakub Sitnicki , Marco Elver , Paolo Abeni , , , , , References: <20210127201031.98544-1-alobakin@pm.me> <20210127201031.98544-4-alobakin@pm.me> <20210129183907.2ae5ca3d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20210130154149.8107-1-alobakin@pm.me> <20210130110707.3122a360@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20210130194459.37837-1-alobakin@pm.me> From: John Hubbard Message-ID: <752a57a6-3f45-8b9b-e8b1-939bc9450947@nvidia.com> Date: Sat, 30 Jan 2021 13:23:30 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Thunderbird/85.0 MIME-Version: 1.0 In-Reply-To: <20210130194459.37837-1-alobakin@pm.me> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612041822; bh=XdEBWDGTZuiWQxyc+j9VORWv1cft7WIfWK/EqPUa+p4=; h=Subject:To:CC:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding:X-Originating-IP:X-ClientProxiedBy; b=CgBuB8hJYU+MIBPQME3YhhtMFWXo3UeYILMxnQGrIaEN3YYevfyNPOUu/2Ox8YS1E ghXmFo3e/yaJuPpXKJXPz+UU5J8mMJpKradqvcIim2gTRnC40Psz8zdWwgxsjsNqLY zagJMVx3lia+GGBPt+o5cF5+iuquSwS72PmYYkY+b0n1WmELYe90cn1qMFDrFW8XH8 TSUtIL3EY9vQtb/yfp/1KhVceVxez4JYu8mq/s+XtXkbcA5DMqU34O7/cjmj2AdGge vfGCrA6OmrQksCFUrXOAb9FpY3Pok/3MTu6v9rBgvK4GuxVmA4oIgaS4QVYPO4Vf9A VM7OcNZQarHeQ== 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 1/30/21 11:45 AM, Alexander Lobakin wrote: > From: Jakub Kicinski > Date: Sat, 30 Jan 2021 11:07:07 -0800 > >> On Sat, 30 Jan 2021 15:42:29 +0000 Alexander Lobakin wrote: >>>> On Wed, 27 Jan 2021 20:11:23 +0000 Alexander Lobakin wrote: >>>>> + * dev_page_is_reserved - check whether a page can be reused for network Rx >>>>> + * @page: the page to test >>>>> + * >>>>> + * A page shouldn't be considered for reusing/recycling if it was allocated >>>>> + * under memory pressure or at a distant memory node. >>>>> + * >>>>> + * Returns true if this page should be returned to page allocator, false >>>>> + * otherwise. >>>>> + */ >>>>> +static inline bool dev_page_is_reserved(const struct page *page) >>>> >>>> Am I the only one who feels like "reusable" is a better term than >>>> "reserved". >>> >>> I thought about it, but this will need to inverse the conditions in >>> most of the drivers. I decided to keep it as it is. >>> I can redo if "reusable" is preferred. >> >> Naming is hard. As long as the condition is not a double negative it >> reads fine to me, but that's probably personal preference. >> The thing that doesn't sit well is the fact that there is nothing >> "reserved" about a page from another NUMA node.. But again, if nobody >> +1s this it's whatever... > > Agree on NUMA and naming. I'm a bit surprised that 95% of drivers > have this helper called "reserved" (one of the reasons why I finished > with this variant). > Let's say, if anybody else will vote for "reusable", I'll pick it for > v3. Definitely "reusable" seems better to me, and especially anything *other* than "reserved" is a good idea, IMHO. thanks, -- John Hubbard NVIDIA