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=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL 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 B2DC0C433B4 for ; Thu, 20 May 2021 22:10:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2B07B613BB for ; Thu, 20 May 2021 22:10:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B07B613BB Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8398E8E0021; Thu, 20 May 2021 18:10:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7E8ED8E001B; Thu, 20 May 2021 18:10:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 662758E0021; Thu, 20 May 2021 18:10:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0058.hostedemail.com [216.40.44.58]) by kanga.kvack.org (Postfix) with ESMTP id 303AD8E001B for ; Thu, 20 May 2021 18:10:37 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C5E01180ACC3C for ; Thu, 20 May 2021 22:10:36 +0000 (UTC) X-FDA: 78163004472.06.3F8AC43 Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) by imf07.hostedemail.com (Postfix) with ESMTP id F0704A0001CA for ; Thu, 20 May 2021 22:10:33 +0000 (UTC) Received: by mail-yb1-f170.google.com with SMTP id b13so23477146ybk.4 for ; Thu, 20 May 2021 15:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Cv+VF88O//9RPdfggPYjWdSdgDtDa86C3Ull6eQ/XI4=; b=hYsAuj2mIN+GveHmlUeIi8ZyqzPH8DvA+rMcytXdue4I82a9TNGqQWmW0P0qS8h02J dhGFUgryjsqhzpEMvKd4/H6kQxr5vO9+Rbi1id5TE0/PJAVOo4vkG0KquYivpaqJbbJA lu4xkjOfxGkz9LG+6bKgJTxVQ9FdOPO0ssMBUK5gMTzILplUzcgoYJNuZOpCAm5UVwXH P06Y293f9od02kqBouQtlbXDLwECiHiX8wWnccHOra31RyYdbKQI1CqNnKKa7VbJBhlR XcxZE5SU2CUSRzDw1Sdza9myU8pABv+9zkm+patPIf4Y0K/T61EGqHoqrFrCxfqjwaFe y70A== 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=Cv+VF88O//9RPdfggPYjWdSdgDtDa86C3Ull6eQ/XI4=; b=CTbV2s2//FVkGBoVSDsS7eFXs5OG/hhsmRaGfRsrMNYyHoM4rbBjAOIFGrLUwo+Gv4 3P3RvclXAV3Z7FGwd8/k8oOUnmBdBclaaK0dVSEslHQNd5QhFEz225f4M13zMIELhKI2 ARJEuPMs8g7OuDwsPvgI6P+nxDbSkrV8TeURh5SifRz3tLLNrTlDWnCbXZaf4YQI386m mmxeoC/siSpKYhXtIo5rS/un9yhz2jiINIa/TBHTM2U80y1AdrnxRXX00wuKfgoOVtjI j5V2yNrkO4T6LTbbJ483i4lz00QvHQEyKpkdR0jFg8yTX2OjKuAQYV22SAqw7S4gdRDB qu/A== X-Gm-Message-State: AOAM533YrFW3PwATx5BN7qL0nOF7iunJoyriegG7OKrO8g2U2cglNeZl mc5eYWIw8G64/yHsciZNNw17Z/ebW4wSTQdtkOik2g== X-Google-Smtp-Source: ABdhPJz3gKhh5eo38dfQ8Q5auhgwe1OWL3SRpeb9Wg8+v/BWQ0fvUvVeAwyzzvRgylyi99uQkccRWgWKD2/EXgtIT24= X-Received: by 2002:a25:9c88:: with SMTP id y8mr9621140ybo.294.1621548635461; Thu, 20 May 2021 15:10:35 -0700 (PDT) MIME-Version: 1.0 References: <20210430195232.30491-1-michel@lespinasse.org> <20210430224649.GA29203@lespinasse.org> <20210503181118.GA21048@lespinasse.org> <20210517175750.GJ4441@paulmck-ThinkPad-P17-Gen-1> In-Reply-To: <20210517175750.GJ4441@paulmck-ThinkPad-P17-Gen-1> From: Suren Baghdasaryan Date: Thu, 20 May 2021 15:10:24 -0700 Message-ID: Subject: Re: [PATCH 00/29] Speculative page faults (anon vmas only) To: "Paul E . McKenney" Cc: Michel Lespinasse , Linux-MM , Linux-Kernel , Laurent Dufour , Peter Zijlstra , Michal Hocko , Matthew Wilcox , Rik van Riel , Andrew Morton , Joel Fernandes , Andy Lutomirski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=hYsAuj2m; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf07.hostedemail.com: domain of surenb@google.com designates 209.85.219.170 as permitted sender) smtp.mailfrom=surenb@google.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: F0704A0001CA X-Stat-Signature: oqiifu85bcbycwyfj64mwiouzgdwnz7u X-HE-Tag: 1621548633-491264 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 Mon, May 17, 2021 at 10:57 AM Paul E. McKenney wrot= e: > > 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 maple > > > tree patches currently being considered, and this patchset. > > > I actually have a (very lightly tested) tree merging the two together= , > > > 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 this = 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 is > 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_state=E2= =80=99: > ./include/linux/vmstat.h:504:24: error: implicit declaration of function = =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 cast [-= Wint-conversion] > __mod_node_page_state(page_pgdat(page), idx, val); > ^~~~~~~~~~~~~~~~ > ./include/linux/vmstat.h:267:28: note: expected =E2=80=98struct pglist_da= ta *=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 ite= m, 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=98= mod_node_page_state=E2=80=99 makes pointer from integer without a cast [-Wi= nt-conversion] > mod_node_page_state(page_pgdat(page), idx, val); > ^~~~~~~~~~~~~~~~ > ./include/linux/vmstat.h:275:26: note: expected =E2=80=98struct pglist_da= ta *=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=98page_= 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 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: mm.h includes mm_types.h mm_types.h includes vmstat.h vmstat.h uses page_pgdat() mm.h defines page_pgdat() Not sure if this is the best way to fix it but this worked fine for me: --- include/linux/mmap_lock.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 #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, } #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) { -- Thanks, Suren.