Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp487061pxv; Fri, 9 Jul 2021 02:32:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/5Qtm/MCWf2MlmgHE/wXXOqW+OURi7l+9T/3S2d4BKu7IHQPzG8u5iBkSdZmywkSzO7uZ X-Received: by 2002:a17:906:e0e:: with SMTP id l14mr15977676eji.501.1625823132647; Fri, 09 Jul 2021 02:32:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625823132; cv=none; d=google.com; s=arc-20160816; b=SgvG/bcRfddJo/MVzYH3sqLm78xJpp2parPf/CfrPjyRUG6C6rHtZLlxP+jJEO4R0k zUxgqM9nJYa6PSdYt/yF3H3vim87CGSuom1UQakwhCcjJz6DtjKTk7+BhcOSOAtho1EI LuLWsEYpPnWhCxsp2NQzQVGLh3WVdf9OZVAtQ3gYkfxuTUQqk82RNwTu5tn6Jd2LSGkn b8LVW+HxpVy0Jugz6nKAXbA5Tu5/eRH20KZOeZCUeLWd2Ze2f91/kOXePzvJf/V0SsL7 yMFzRaImZI3b9RFI3xwaRKMvKUI2L1x+GeEUn0k0DIUK241HuclSsy+5dWFagcwT5F4H m/oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=WzqaMwBf38EZs4GthK3TPrXbHuho7mduQdjuSDGE+3w=; b=o1Vh4iZbJycAJUv8ksXsq0deJP8me0uQvUlZO+Dy+FnqIZiHuxXeJ6S9legouThMJ/ i9ZnrGRAydLMGk5dz3Xnbuthm5ZdxPQPq/lpqTBdRHoGeBQDTs9FZ8S0Qu/GzY09CMpc p7pW4oZiYEZxYRZnqzBqUgmPZg8Ft1KCrWPsTD8uixJPtp8V19OrDMKuleVSpHr3QQOa iqtXdhc4IB2qcj7qP0yjgsko/0Hr+qrtX3xyCyLqPO8qKeOBOfieLr8ZzF5lNZg6+wd/ iqisL78yxNBEjrsEYGx85+86YuQKcf1bKMPeZcjoM7U1FfCo8pEHupay3zByDthGVf5J aUFg== ARC-Authentication-Results: i=1; mx.google.com; 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 dd21si6619203ejc.261.2021.07.09.02.31.49; Fri, 09 Jul 2021 02:32:12 -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; 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 S231954AbhGIJd3 (ORCPT + 99 others); Fri, 9 Jul 2021 05:33:29 -0400 Received: from outbound-smtp56.blacknight.com ([46.22.136.240]:54721 "EHLO outbound-smtp56.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231494AbhGIJd0 (ORCPT ); Fri, 9 Jul 2021 05:33:26 -0400 Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp56.blacknight.com (Postfix) with ESMTPS id A3410FB371 for ; Fri, 9 Jul 2021 10:30:42 +0100 (IST) Received: (qmail 27889 invoked from network); 9 Jul 2021 09:30:42 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 9 Jul 2021 09:30:42 -0000 Date: Fri, 9 Jul 2021 10:30:40 +0100 From: Mel Gorman To: Matteo Croce Cc: Andrew Morton , Michal Hocko , David Hildenbrand , Vlastimil Babka , Dan Streetman , Yang Shi , Linux-MM , LKML Subject: Re: [PATCH 03/14] mm/page_alloc: Make should_fail_alloc_page a static function should_fail_alloc_page static Message-ID: <20210709093040.GX3840@techsingularity.net> References: <20210520084809.8576-1-mgorman@techsingularity.net> <20210520084809.8576-4-mgorman@techsingularity.net> <20210708211648.13659bb5@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210708211648.13659bb5@linux.microsoft.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 08, 2021 at 09:18:44PM +0200, Matteo Croce wrote: > On Thu, 20 May 2021 09:47:58 +0100 > Mel Gorman wrote: > > > make W=1 generates the following warning for mm/page_alloc.c > > > > mm/page_alloc.c:3651:15: warning: no previous prototype for > > ???should_fail_alloc_page??? [-Wmissing-prototypes] noinline bool > > should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) > > ^~~~~~~~~~~~~~~~~~~~~~ > > > > This function is deliberately split out for BPF to allow errors to be > > injected. The function is not used anywhere else so it is local to > > the file. Make it static which should still allow error injection > > to be used similar to how block/blk-core.c:should_fail_bio() works. > > > > Signed-off-by: Mel Gorman > > --- > > mm/page_alloc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index aaa1655cf682..26cc1a4e639b 100644 > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -3648,7 +3648,7 @@ static inline bool > > __should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) > > #endif /* CONFIG_FAIL_PAGE_ALLOC */ > > > > -noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int > > order) +static noinline bool should_fail_alloc_page(gfp_t gfp_mask, > > unsigned int order) { > > return __should_fail_alloc_page(gfp_mask, order); > > } > > > Hi Mel, > > It seems that this breaks builds with CONFIG_DEBUG_INFO_BTF=y. > Maybe that warning was a false positive because > should_fail_alloc_page() is referenced via a macro? > > I proposed to revert it, feel free to propose another fix. > The alternative fix of making the symbol global was rejected. eBPF needs to figure out a way of instrumenting code that is is unused by the kernel and not globally visible but I don't know how that might be achieved. -- Mel Gorman SUSE Labs