Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2757163pxb; Sat, 30 Jan 2021 13:26:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9dciKoczvlHSno01Jmp6nNUQOzr+PtHEOaJQnkLU0wcBWnnj+S5OYI0gdGx4hJIACtV4X X-Received: by 2002:a17:906:2454:: with SMTP id a20mr10598359ejb.203.1612041984111; Sat, 30 Jan 2021 13:26:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612041984; cv=none; d=google.com; s=arc-20160816; b=kgOEFP072pr8d7SX5FGyWIsB9ZPlDWGdUqEgNzVzkhbitzzc4VrBPSZytpLSKBvSqp sZbmNITVFXXwmrg6dcQTUXos4tpgaIo/TkKiEscpUsUAEVGQyjbaxfAKWLPTdGh9Qs19 aYpnlUXO/CcrtxProlFRfbboRFKa6hL42YPnOAN2Vmrk/667cbtxgntlGjoEa7+yqP4f 88l3qW4BAfjqkXjsuqP7357s16a2J5KYcq3qZbDbdAIy0I6mtAWAAPxN/zJNNTSAJJX8 h7ucVyAtvDWcyXDle08hRRyaPI+ejcBIkOsIYGtG3hKH3kbp0PTF/tSkvixFSXiFmx76 SSPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=XdEBWDGTZuiWQxyc+j9VORWv1cft7WIfWK/EqPUa+p4=; b=LUw3SmgwaCMkz5K2JO7z0LkhTfbqo1+b8EY0oM++rtAodyfyPGG0AjJmwlOjhEKL/M c4Pkpp0B8YZcJwvP0qOs5mGjquHwvzzKGRvS/hhebFCc5TZwV0DjIGbpDPvcRr91pBLc lnfT9bP4BOSRCk/FfLWusKZXQ3cSJY6lkA6bvg+nQtRaYOjtTs7qD6Mwy3Rb1/YpZuYk xwiLmjXT4p/fNECZDnYBGNYBAG4CGkCfkUM4JWFkw8XI8HgQWfSsymOiuvFQDBVps43Y LH4pn7Mss8ABWbNX8hhBHUr4v3fC4NgCMqW5FdH4T225NIDi0I00VxD0EGXl4DVrO4W2 gg6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=CgBuB8hJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kk9si7657728ejc.485.2021.01.30.13.25.59; Sat, 30 Jan 2021 13:26:24 -0800 (PST) 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=pass header.i=@nvidia.com header.s=n1 header.b=CgBuB8hJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232274AbhA3VYY (ORCPT + 99 others); Sat, 30 Jan 2021 16:24:24 -0500 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:2160 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230517AbhA3VYX (ORCPT ); Sat, 30 Jan 2021 16:24:23 -0500 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== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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