Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3420204pxb; Thu, 10 Feb 2022 22:05:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdLXBN4RigYC0Oy3qTPdyG/W/T5OzUkcXiyPK+2QM+zkM/osSNAxA9fqwg8wCmqYh9r5Rk X-Received: by 2002:a17:90a:ea83:: with SMTP id h3mr1127075pjz.96.1644559538092; Thu, 10 Feb 2022 22:05:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644559538; cv=none; d=google.com; s=arc-20160816; b=R7JLsktcd/bJC5/8bXhpfdjjD+umVE8FKUL1+PBZ/FxFhUJO8Q8cmZ94RazlutxdUP PTK65wKA2Cg2lAKeG3o/P0T24MOgUxI8bYEq7ftivWTDfpUjCxikar8YNj7Eirt7V2Dk lkbIv8USeg9uF8HtKwq+wgOx0Nm/iSZ+kKDpzYzeLbIpT/xxOpJf0+YRP84R+puZvuZg u1oiqDH9YKZEkAccXsK8M/No442bMa1L5wN0PFC3Znm2FRZPN44SOb//dK2oWaemcaX1 VGyFojeMFz4MN2Bjl3/J2oX9mbfbb5ri5X6SN3B3pMdf7hlu22zH+PQVwHxdFMM4E1eZ h/2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=tANgVZE3P47aF53XSfN41u2Y4MtV+aBH3rrzoHjf0Gk=; b=gLlm7DEezkQpxSeEyhR8yE9u/mUf+hdFN3CQHUOABGToCXBGb6N1U8i5zTCNKby01v IqEOoGNyHcx3JU3hpSL+v4sOKcpuctwc2xirQakZOOuD0FM7ujyEraT0WTv4QdomTDrU DJhyGjA2hdAbssQ1DbgICqz4fPDVyKciKiq5+hbzwmeHChXAmmRYc2eleBgFVapRT9MC TS7DGtPxWHog54owqZDFlXywroUuCAJ3jyK5rsT24ArBpkCKFwOYAVWx3ZnSNCnPYSBu hjTlj7Kvrq9lGYLx/qxlGFZ/9OqyG2qh1EkYi1RJCQ9o1xtowLcx2WXSbrI/nD2OHI4P m8Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=TJc10X1h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d70si21140373pgc.182.2022.02.10.22.05.26; Thu, 10 Feb 2022 22:05:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=TJc10X1h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242132AbiBKD7A (ORCPT + 99 others); Thu, 10 Feb 2022 22:59:00 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235308AbiBKD66 (ORCPT ); Thu, 10 Feb 2022 22:58:58 -0500 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 776C85F84 for ; Thu, 10 Feb 2022 19:58:57 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Jw0Gk6vqsz4xNn; Fri, 11 Feb 2022 14:58:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1644551935; bh=tANgVZE3P47aF53XSfN41u2Y4MtV+aBH3rrzoHjf0Gk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TJc10X1humPxq54tTHXpi37q4W3JhMDlUmefID+CHV/iE11sjIcO8BYDjCeY11/iu N/8vUtnehArEWreU1PcHiqKssHxNjtDwoAQG/BFAA8zu2vmyXOw4WrK1Egfntjk/02 YR91FZMYgKjkif7/f9QoRButM9z/SHQlIv80u5Xq8C4FE2DKp/VImq4WoCq+UiZSZq JTU1jdLMWRy8hXfzKlw73+TRMBJg14Jgl4exgZsA0GibsuyRrZcQ1xj98VNZZONYTp g9R01QhjUtMDflCL35GymVwSzSQOvZV/hgxALOh8Tvt8THrPJdPuXnr8oi8iHuPzhq OKjIDpc26Kt0w== Date: Fri, 11 Feb 2022 14:58:53 +1100 From: Stephen Rothwell To: Hugh Dickins Cc: Andrew Morton , SeongJae Park , Geert Uytterhoeven , Naresh Kamboju , Linux MM , Linux Kernel Mailing List Subject: Re: [PATCH for-mm 1/2 v2] mm/internal: Implement no-op mlock_page_drain() for !CONFIG_MMU Message-ID: <20220211145853.329ff344@canb.auug.org.au> In-Reply-To: <8eae6026-098-befb-92d3-b9ad2ad57776@google.com> References: <20220209094158.21941-1-sj@kernel.org> <20220209094158.21941-2-sj@kernel.org> <715a8b2e-1048-c098-8b89-bcf3c13cbd75@google.com> <8eae6026-098-befb-92d3-b9ad2ad57776@google.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/uzV4b3Z7XYHDfaFovndMX.Y"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/uzV4b3Z7XYHDfaFovndMX.Y Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Hugh, On Wed, 9 Feb 2022 20:44:02 -0800 (PST) Hugh Dickins wro= te: > > From: SeongJae Park >=20 > Commit 4b3b8bd6c8287 ("mm/munlock: mlock_page() munlock_page() batch by > pagevec") in -mm tree[1] implements 'mlock_page_drain()' under > CONFIG_MMU only, but the function is used by 'lru_add_drain_cpu()', > which defined outside of CONFIG_MMU. As a result, below build error > occurs. >=20 > /linux/mm/swap.c: In function 'lru_add_drain_cpu': > /linux/mm/swap.c:637:2: error: implicit declaration of function 'mloc= k_page_drain' [-Werror=3Dimplicit-function-declaration] > 637 | mlock_page_drain(cpu); > | ^~~~~~~~~~~~~~~~ > cc1: some warnings being treated as errors > /linux/scripts/Makefile.build:289: recipe for target 'mm/swap.o' fail= ed >=20 > This commit fixes it by implementing no-op 'mlock_page_drain()' for > !CONFIG_MMU case, similar to 'mlock_new_page()'. >=20 > [1] https://www.ozlabs.org/~akpm/mmotm/broken-out/mm-munlock-mlock_page-m= unlock_page-batch-by-pagevec.patch >=20 > [hughd: add need_mlock_page_drain() stub too] > Signed-off-by: SeongJae Park > Signed-off-by: Hugh Dickins > --- > Andrew, Stephen, please add as fix to > mm-munlock-mlock_page-munlock_page-batch-by-pagevec.patch > Thanks! >=20 > mm/internal.h | 2 ++ > 1 file changed, 2 insertions(+) >=20 > --- a/mm/internal.h > +++ b/mm/internal.h > @@ -508,6 +508,8 @@ static inline void mlock_vma_page(struct page *page, > static inline void munlock_vma_page(struct page *page, > struct vm_area_struct *vma, bool compound) { } > static inline void mlock_new_page(struct page *page) { } > +static inline bool need_mlock_page_drain(int cpu) { return false; } > +static inline void mlock_page_drain(int cpu) { } > static inline void vunmap_range_noflush(unsigned long start, unsigned lo= ng end) > { > } Added to linux-next from today. --=20 Cheers, Stephen Rothwell --Sig_/uzV4b3Z7XYHDfaFovndMX.Y Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmIF3v0ACgkQAVBC80lX 0Gw6SAf/YdMw2mcK7OcCmFZERxK4VtcnUrURgP2yV67H8pWoh3aYufIiNrTX8QWK IL6uVdq7lXdjUD5JWcvlu7LRBIHicNfcbqSaHtBQJJlCYDbBc+Vnuk0EkFz8ERJC 3LwUxJnzrwYDz2C0uDma8tm5OGYnVzyAQYRmLXHtVRVtn3inOltpGo261fCuCzlU w3ojkVO09YGG1uF1tZoDQlx/vXSqyNLI7uvn8jAA1pgPDqM3KmypQn/ZINpwihT5 c8SUMvx9tkPUTkXsKBLsHFyvtXC0egOynMcRUs3BGjnZHNnCRWUxv0ZIRB3SyVUu 0xiKlfryatRYI9O1++ksAjlmlFa7IA== =n70x -----END PGP SIGNATURE----- --Sig_/uzV4b3Z7XYHDfaFovndMX.Y--