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=-13.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 0503CC47080 for ; Tue, 1 Jun 2021 20:23:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4F398613C0 for ; Tue, 1 Jun 2021 20:23:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F398613C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8C8036B006C; Tue, 1 Jun 2021 16:23:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 878556B006E; Tue, 1 Jun 2021 16:23:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 718DD6B0070; Tue, 1 Jun 2021 16:23:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0220.hostedemail.com [216.40.44.220]) by kanga.kvack.org (Postfix) with ESMTP id 434006B006C for ; Tue, 1 Jun 2021 16:23:36 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C8B788249980 for ; Tue, 1 Jun 2021 20:23:35 +0000 (UTC) X-FDA: 78206280390.40.7576B27 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf18.hostedemail.com (Postfix) with ESMTP id D0B432001095 for ; Tue, 1 Jun 2021 20:23:23 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 769F761263; Tue, 1 Jun 2021 20:23:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622579014; bh=OSwdNRzwRbWoTBeR6z7tuCW+yTASw0qoelX/HIVXYeU=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=rObePwv7mCgt459xM3WZXZBXTPP0E5F6Uqj8m1aFtwi0jpmV0OztZ+Z2rybHcXEB1 0AhAsDQlAtuoFJ4tbslprigLzqbJTM3iSWi8+cw0VOChNEfl3p9VDJmX+TgOwt86lB 03iQDd7Z7JTCkW8Ktxu48unmLPyJvkJVmjufenY9qaSe9Kg4lLcyIq9C5V96DBTxRh FvJ6fGAjVjkmdBhTawLEdiL3CqCLplpaCV5Oypg/QfeprkGbMR4GRDNqBFuAN5LiBf 0odv7HDW61pqpp0phaysRD4nbg8U5XaEO4hcgKZBkDhELNzz2ugCQjq6mbJQhArJKM RIjg65ZG3IRmg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 433A35C08EB; Tue, 1 Jun 2021 13:23:34 -0700 (PDT) Date: Tue, 1 Jun 2021 13:23:34 -0700 From: "Paul E. McKenney" To: Suren Baghdasaryan Cc: Michel Lespinasse , Linux-MM , Linux-Kernel , Laurent Dufour , Peter Zijlstra , Michal Hocko , Matthew Wilcox , Rik van Riel , Andrew Morton , Joel Fernandes , Andy Lutomirski Subject: Re: [PATCH 00/29] Speculative page faults (anon vmas only) Message-ID: <20210601202334.GS4397@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20210430195232.30491-1-michel@lespinasse.org> <20210430224649.GA29203@lespinasse.org> <20210503181118.GA21048@lespinasse.org> <20210517175750.GJ4441@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=rObePwv7; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf18.hostedemail.com: domain of "SRS0=z9fB=K3=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 198.145.29.99 as permitted sender) smtp.mailfrom="SRS0=z9fB=K3=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" X-Stat-Signature: auuk6rouktzzq3uy4h1b39sbd9ty4ucs X-Rspamd-Queue-Id: D0B432001095 X-Rspamd-Server: rspam02 X-HE-Tag: 1622579003-581556 Content-Transfer-Encoding: quoted-printable 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 Thu, May 20, 2021 at 03:10:24PM -0700, Suren Baghdasaryan wrote: > On Mon, May 17, 2021 at 10:57 AM Paul E. McKenney = wrote: > > > > On Mon, May 03, 2021 at 11:11:18AM -0700, Michel Lespinasse wrote: > > > On Fri, Apr 30, 2021 at 03:46:49PM -0700, Michel Lespinasse wrote: > > > > I- Maple tree > > > > > > > > I do not think there is any fundamental conflict between the mapl= e > > > > tree patches currently being considered, and this patchset. > > > > I actually have a (very lightly tested) tree merging the two toge= ther, > > > > which was a fairly easy merge. For those interested, I made this > > > > available at my github, as the v5.12-maple-spf branch. > > > > > > People were still confused about it, so the instructions to fetch t= his are: > > > git fetch https://github.com/lespinasse/linux.git v5.12-maple-spf > > > > Finally getting around to actually testing this, apologies for the > > delay! > > > > Just checking to see if I am in the right place. The warning below i= s > > easily fixed, but I figured that I should check. > > > > Thanx, Paul > > > > ---------------------------------------------------------------------= --- > > > > CC arch/x86/kernel/asm-offsets.s > > In file included from ./include/linux/mmap_lock.h:10, > > from ./include/linux/mm.h:18, > > from ./include/linux/kallsyms.h:12, > > from ./include/linux/bpf.h:20, > > from ./include/linux/bpf-cgroup.h:5, > > from ./include/linux/cgroup-defs.h:22, > > from ./include/linux/cgroup.h:28, > > from ./include/linux/memcontrol.h:13, > > from ./include/linux/swap.h:9, > > from ./include/linux/suspend.h:5, > > from arch/x86/kernel/asm-offsets.c:13: > > ./include/linux/vmstat.h: In function =E2=80=98__mod_lruvec_page_stat= e=E2=80=99: > > ./include/linux/vmstat.h:504:24: error: implicit declaration of funct= ion =E2=80=98page_pgdat=E2=80=99; did you mean =E2=80=98page_private=E2=80= =99? [-Werror=3Dimplicit-function-declaration] > > __mod_node_page_state(page_pgdat(page), idx, val); > > ^~~~~~~~~~ > > page_private > > ./include/linux/vmstat.h:504:24: warning: passing argument 1 of =E2=80= =98__mod_node_page_state=E2=80=99 makes pointer from integer without a ca= st [-Wint-conversion] > > __mod_node_page_state(page_pgdat(page), idx, val); > > ^~~~~~~~~~~~~~~~ > > ./include/linux/vmstat.h:267:28: note: expected =E2=80=98struct pglis= t_data *=E2=80=99 but argument is of type =E2=80=98int=E2=80=99 > > void __mod_node_page_state(struct pglist_data *, enum node_stat_item= item, long); > > ^~~~~~~~~~~~~~~~~~~~ > > ./include/linux/vmstat.h: In function =E2=80=98mod_lruvec_page_state=E2= =80=99: > > ./include/linux/vmstat.h:510:22: warning: passing argument 1 of =E2=80= =98mod_node_page_state=E2=80=99 makes pointer from integer without a cast= [-Wint-conversion] > > mod_node_page_state(page_pgdat(page), idx, val); > > ^~~~~~~~~~~~~~~~ > > ./include/linux/vmstat.h:275:26: note: expected =E2=80=98struct pglis= t_data *=E2=80=99 but argument is of type =E2=80=98int=E2=80=99 > > void mod_node_page_state(struct pglist_data *, enum node_stat_item, = long); > > ^~~~~~~~~~~~~~~~~~~~ > > In file included from ./include/linux/kallsyms.h:12, > > from ./include/linux/bpf.h:20, > > from ./include/linux/bpf-cgroup.h:5, > > from ./include/linux/cgroup-defs.h:22, > > from ./include/linux/cgroup.h:28, > > from ./include/linux/memcontrol.h:13, > > from ./include/linux/swap.h:9, > > from ./include/linux/suspend.h:5, > > from arch/x86/kernel/asm-offsets.c:13: > > ./include/linux/mm.h: At top level: > > ./include/linux/mm.h:1568:26: error: conflicting types for =E2=80=98p= age_pgdat=E2=80=99 > > static inline pg_data_t *page_pgdat(const struct page *page) > > ^~~~~~~~~~ > > In file included from ./include/linux/mmap_lock.h:10, > > from ./include/linux/mm.h:18, > > from ./include/linux/kallsyms.h:12, > > from ./include/linux/bpf.h:20, > > from ./include/linux/bpf-cgroup.h:5, > > from ./include/linux/cgroup-defs.h:22, > > from ./include/linux/cgroup.h:28, > > from ./include/linux/memcontrol.h:13, > > from ./include/linux/swap.h:9, > > from ./include/linux/suspend.h:5, > > from arch/x86/kernel/asm-offsets.c:13: > > ./include/linux/vmstat.h:504:24: note: previous implicit declaration = of =E2=80=98page_pgdat=E2=80=99 was here > > __mod_node_page_state(page_pgdat(page), idx, val); > > ^~~~~~~~~~ > > cc1: some warnings being treated as errors >=20 > Hi Paul, > I promised you to look into this but somehow forgot to reply, sorry > about that. The issue is the new "#include " in mm.h > which causes page_pgdat() usage before it is defined: >=20 > mm.h includes mm_types.h > mm_types.h includes vmstat.h > vmstat.h uses page_pgdat() > mm.h defines page_pgdat() >=20 > Not sure if this is the best way to fix it but this worked fine for me: And it did fix the build error for me as well, thank you! Thanx, Paul > --- > include/linux/mmap_lock.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/include/linux/mmap_lock.h b/include/linux/mmap_lock.h > index 98f24a9910a9..13d4a706c0eb 100644 > --- a/include/linux/mmap_lock.h > +++ b/include/linux/mmap_lock.h > @@ -7,7 +7,7 @@ > #include > #include > #include > -#include > +#include >=20 > #ifdef CONFIG_SPECULATIVE_PAGE_FAULT > #define MMAP_LOCK_SEQ_INITIALIZER(name) \ > @@ -113,6 +113,8 @@ static inline bool __mmap_seq_read_check(struct > mm_struct *mm, > } >=20 > #ifdef CONFIG_SPECULATIVE_PAGE_FAULT_STATS > +static inline void count_vm_event(enum vm_event_item item); > + > static inline bool mmap_seq_read_check(struct mm_struct *mm, unsigned = long seq, > enum vm_event_item fail_event) > { > -- >=20 > Thanks, > Suren.