Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2749049pxu; Mon, 7 Dec 2020 14:48:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmGMmDtORIjazgReGBprX4vkFcqY8AgHYuzMWa9S4DbdG4qy0z22XokH/5quwwTcEm5oe1 X-Received: by 2002:a17:907:6e6:: with SMTP id yh6mr21242333ejb.512.1607381338452; Mon, 07 Dec 2020 14:48:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607381338; cv=none; d=google.com; s=arc-20160816; b=zIk+IWILBbnRoK53Qc8WOdOSCMEu9vHEdgpkWcyqe+DOq6RPIsS3qNCkjVGWIgIXEZ DrQMga1q+4/k+4McnMR9r0U47zTxgp92htXtasCgoA6KFW5BdySTExRtzIjz9+ALTzzB d1EX/S7mE/pUcfMTuRhhACK8C/ifmNEjglVMmvrmsyPsL7qUzqppJaMsP9Xm1bfRvPMu Iws6uZwh/imq09z5LsbWHM6uR338oWaRBt7Vh72G+Iwi9Nvq8HWbgWlT+xnVy/aHFG0W S0H6aXR11hw8TfjvECn4KhNkasAz7YwRW3IS/niik8lrO6ed+DDWDtTiRYZ/hXf5zUTc Gc9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=84NZyZiyC4OmRBVaSotinan5g5hCm7otD/hM6jLzgCE=; b=qw70v+st/9oxt6E5m/WCnpEBkAETDo9Aofl5Q0/jVChTBNOqJiNchbIphNgx//DMDH l0Lb1vSI8cUSQXwIRwuhlDG1U6dSKfeASf9DVP4q5ts3YzHeaPpcNPQqrLxKKayC+vb4 R400Lf63eZyE7dlKR6M07TPjX2j119zZpo47xIX/pBh7Fe7bYVc5skKvKK0l3ftDdvxg FkEmLt/NkveK7Jy0w7tT0OCoXI1RpCo7bXQwSWN8fzny4eBqAozVOdIm2weBX7HMdTnE ubtmZGFPKc78ZgojwUiMbxWnMVyO/AwcImPgGa3F+j6Rt0mulnjodA98Ly35QlK9omY0 nU9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fsVrGztc; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j24si7624833ejs.60.2020.12.07.14.48.35; Mon, 07 Dec 2020 14:48:58 -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=@gmail.com header.s=20161025 header.b=fsVrGztc; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726705AbgLGWpQ (ORCPT + 99 others); Mon, 7 Dec 2020 17:45:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbgLGWpP (ORCPT ); Mon, 7 Dec 2020 17:45:15 -0500 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 348A3C061793; Mon, 7 Dec 2020 14:44:35 -0800 (PST) Received: by mail-lj1-x241.google.com with SMTP id t22so16923724ljk.0; Mon, 07 Dec 2020 14:44:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=84NZyZiyC4OmRBVaSotinan5g5hCm7otD/hM6jLzgCE=; b=fsVrGztcKudL75OYLON1S5/amW5C1gnztHnfl2ajkJFdra0sd906St+Rg5dHEbJjv6 AdzdxrTy7vuBz1XF03Cpe7OTM8Q82YAnBwk7TWcyHGhBWMBc7iR4tBsypP57ydTs1BlK LC+d/DOZehBxwMMFn3A1hXSQF8DtRDVinDzabW9NeZHNveWxSdOCJmjL1bEuq2HyPq+z XuNr7u0Pt6uQKeVSHOkvWVyK4W/oqjxKoI/XwWTVNg8ZeQB3cRlsBISZMyNryUMbi/UF 1d4k8K097iroGBSjBJ4eK4Hz+9T/hI44cY+j6jW6ks/R4QHsPWQfil0zo03mZ7Psqcrd 0iaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=84NZyZiyC4OmRBVaSotinan5g5hCm7otD/hM6jLzgCE=; b=CHBrTXxnVzCHDVOymOt5Eo/1FVggMtWAEl1cQjTVTvbf1gJZUwog7UAEm4ChAJwmir MdG3tacMeTyczbdrMck3OfhNVoGkdMqMyzmN0LLk59BKJP8lJkMLh/oNRDJcpdn5EC79 EWG2cYQupcQRehJy8hLRtleN4dB9udnmDDcPXF9joTYuS94ur77fUJ/zSU79ZXOLFb/+ TcSquMdFferbA1YCBNmecn1K2fepM7vV+oJwXJcZKpd5U7cAjYpjeJte7LDByddCT8VV 9PEBi2OXHyc3BpUqSp8wiKT/HG+ni6DG+w/z7nrhLwcWAoBFjze+8bUp3VNJdqRdFm9V 9/Dg== X-Gm-Message-State: AOAM5324Gn61HqkIGJKp5MiMihUQzbTWvyeXy0aH96fUy8GtKLVf8t+h xZW0OGMlLR5vorjoycrn8YGLbgNL031hal+850V4YF9g X-Received: by 2002:a2e:8891:: with SMTP id k17mr9048437lji.290.1607381073733; Mon, 07 Dec 2020 14:44:33 -0800 (PST) MIME-Version: 1.0 References: <1604661895-5495-1-git-send-email-alex.shi@linux.alibaba.com> <20201110115037.f6a53faec8d65782ab65d8b4@linux-foundation.org> <20201207081556.pwxmhgdxayzbofpi@lion.mk-sys.cz> In-Reply-To: From: Alexei Starovoitov Date: Mon, 7 Dec 2020 14:44:22 -0800 Message-ID: Subject: Re: [PATCH] mm/filemap: add static for function __add_to_page_cache_locked To: Justin Forbes , bpf Cc: Michal Kubecek , Alex Shi , Andrew Morton , Souptick Joarder , Linux-MM , LKML , Alexei Starovoitov , Daniel Borkmann , Josef Bacik Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 7, 2020 at 10:36 AM Justin Forbes wrote: > > On Mon, Dec 7, 2020 at 2:16 AM Michal Kubecek wrote: > > > > On Thu, Nov 12, 2020 at 08:18:57AM +0800, Alex Shi wrote: > > > > > > > > > =E5=9C=A8 2020/11/11 =E4=B8=8A=E5=8D=883:50, Andrew Morton =E5=86=99= =E9=81=93: > > > > On Tue, 10 Nov 2020 08:39:24 +0530 Souptick Joarder wrote: > > > > > > > >> On Fri, Nov 6, 2020 at 4:55 PM Alex Shi wrote: > > > >>> > > > >>> Otherwise it cause gcc warning: > > > >>> ^~~~~~~~~~~~~~~ > > > >>> ../mm/filemap.c:830:14: warning: no previous prototype for > > > >>> =E2=80=98__add_to_page_cache_locked=E2=80=99 [-Wmissing-prototype= s] > > > >>> noinline int __add_to_page_cache_locked(struct page *page, > > > >>> ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > > >> > > > >> Is CONFIG_DEBUG_INFO_BTF enabled in your .config ? > > > > > > > > hm, yes. > > > > > > When the config enabled, compiling looks good untill pahole tool > > > used to get BTF info, but I still failed on a right version pahole > > > > 1.16. Sorry. > > > > > > > > > > >>> > > > >>> Signed-off-by: Alex Shi > > > >>> Cc: Andrew Morton > > > >>> Cc: linux-mm@kvack.org > > > >>> Cc: linux-kernel@vger.kernel.org > > > >>> --- > > > >>> mm/filemap.c | 2 +- > > > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > > > >>> > > > >>> diff --git a/mm/filemap.c b/mm/filemap.c > > > >>> index d90614f501da..249cf489f5df 100644 > > > >>> --- a/mm/filemap.c > > > >>> +++ b/mm/filemap.c > > > >>> @@ -827,7 +827,7 @@ int replace_page_cache_page(struct page *old,= struct page *new, gfp_t gfp_mask) > > > >>> } > > > >>> EXPORT_SYMBOL_GPL(replace_page_cache_page); > > > >>> > > > >>> -noinline int __add_to_page_cache_locked(struct page *page, > > > >>> +static noinline int __add_to_page_cache_locked(struct page *page= , > > > >>> struct address_space *map= ping, > > > >>> pgoff_t offset, gfp_t gfp= , > > > >>> void **shadowp) > > > > > > > > It's unclear to me whether BTF_ID() requires that the target symbol= be > > > > non-static. It doesn't actually reference the symbol: > > > > > > > > #define BTF_ID(prefix, name) \ > > > > __BTF_ID(__ID(__BTF_ID__##prefix##__##name##__)) > > > > > > > > > > The above usage make me thought BTF don't require the symbol, though > > > the symbol still exist in vmlinux with 'static'. > > > > > > So any comments of this, Alexei? Sorry. I've completely missed this thread. Now I have a hard time finding context in archives. If I understood what's going on the removal of "static" cases issues? Yes. That's expected. noinline alone is not enough to work reliably.