Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4255035pxb; Mon, 1 Feb 2021 17:21:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVuGLef5PAl3qvmf4P3ZKkfABR+TykZScBr89noKwtt3M3bLjg0D9ttH6w6DSBq066vJTZ X-Received: by 2002:a17:906:708f:: with SMTP id b15mr20548731ejk.267.1612228886667; Mon, 01 Feb 2021 17:21:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612228886; cv=none; d=google.com; s=arc-20160816; b=O3lRVDbN28qFb+tXsX62fJwS753Fuxx5OPIQveGYtsCrVKIzJKdbWZoT5obrRwrYlP DWBh4gr3bebxhyCJTK0wMe67X5E4bsHMDV7JVX7slueOQsejWYo0xcLuEWkK+5pIZGPb mOQ7oXyBKm6bLDwuyE5H9M3Y2jFbjhgG054OZiKzaqd+1ZZl+0Tk1I/9IM9t0a7FuzJW IbMBYEq131SHYFAAeBMBbxTYEZUkhqw9hhklkBxwGFXRH0kiVj45tvinScs3YLh4gShz DyfubhduTbw0kdfRSBmKXzYVFqbxAFCX9bdJk0qz0/b9rMszUgOM7LGRhv7JqCLgpEEm d0SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=nubjV5RxPS9rBe0ST4Of24Ui70x9oAYNdmJ0tl2QhWI=; b=qz/1kb5ZL6cy2uVKDDZA8tXEjw+eAfWi8B7IjKO9YKCEK/PGGO5W7dAgx7qGpW4qto or1spKOT34lgKH/SZ2moLd+tywfAPAv+oQW0i5VR94pcacGjPcXiEZyYcpWwXr/yQUmN utoTYigRYp2U821Z3OmsuzacZXUklIlWWKoFoVyymTY1RtO3OWTrQhaAoMi2XMTtDIjG EjB8tc3+9kKgE9uRLMg0tqV5p8ntHexYPMMsMwoxjzWFElmlMzhe/1rGXtugdHCDDuyQ CqpGL7lu183QaV4o07jj+N9OkGs4TcykxY1cfCP3XaYIa/mIC3SVz1L4SAoWz3v8CIRZ KV4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VX5NiTQ9; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k5si11560909ejj.483.2021.02.01.17.21.01; Mon, 01 Feb 2021 17:21:26 -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=@kernel.org header.s=k20201202 header.b=VX5NiTQ9; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230224AbhBBBTU (ORCPT + 99 others); Mon, 1 Feb 2021 20:19:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:50464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230194AbhBBBTS (ORCPT ); Mon, 1 Feb 2021 20:19:18 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D0A8864DD4; Tue, 2 Feb 2021 01:18:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612228717; bh=nubjV5RxPS9rBe0ST4Of24Ui70x9oAYNdmJ0tl2QhWI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VX5NiTQ9Jubs8sCIFZX5+4/UbBPOEWx5B+HxdzXkfH83BLJ+GDDV7Iksibf8AcKsp YfA7nFsLTTuZuK3Si2se9ublIX2GIHuhQaFxBHQXPQQ7QfAm80uvuUJgoAmb5S6UIT qfQx/CMJCrx2NKU8XM9OUfaY2v3TgsWmnM1DqRTXnyqXM7RcWfxTrWeTyaHcCakoSk bPqIsrVJ17Ex7s0pE+YPcbg7u0V9Xl6yRxHIcjI+OBMKo/BiXzFvUAuiyCt+NIrp66 TSTBCwg6hwB5pvt97bywOh1JhP2Qz8xfI2P8BR1756EcewjICgpbewLVGatX5iYTgQ LM90b6lTC+rcw== Date: Mon, 1 Feb 2021 17:18:35 -0800 From: Jakub Kicinski To: Alexander Lobakin Cc: "David S. Miller" , John Hubbard , 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 , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-rdma@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v3 net-next 0/5] net: consolidate page_is_pfmemalloc() usage Message-ID: <20210201171835.690558df@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20210131120844.7529-1-alobakin@pm.me> References: <20210131120844.7529-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 31 Jan 2021 12:11:16 +0000 Alexander Lobakin wrote: > page_is_pfmemalloc() is used mostly by networking drivers to test > if a page can be considered for reusing/recycling. > It doesn't write anything to the struct page itself, so its sole > argument can be constified, as well as the first argument of > skb_propagate_pfmemalloc(). > In Page Pool core code, it can be simply inlined instead. > Most of the callers from NIC drivers were just doppelgangers of > the same condition tests. Derive them into a new common function > do deduplicate the code. Please resend, this did not get into patchwork :/