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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEC5AC433F5 for ; Thu, 10 Feb 2022 07:58:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 493056B0075; Thu, 10 Feb 2022 02:58:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 442BE6B007B; Thu, 10 Feb 2022 02:58:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 37F7D6B007D; Thu, 10 Feb 2022 02:58:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0219.hostedemail.com [216.40.44.219]) by kanga.kvack.org (Postfix) with ESMTP id 2BE1F6B0075 for ; Thu, 10 Feb 2022 02:58:29 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D798E182332FE for ; Thu, 10 Feb 2022 07:58:28 +0000 (UTC) X-FDA: 79126117896.16.8775ACA Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf25.hostedemail.com (Postfix) with ESMTP id 73067A0005 for ; Thu, 10 Feb 2022 07:58:28 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7B2D460EDC; Thu, 10 Feb 2022 07:58:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41661C340ED; Thu, 10 Feb 2022 07:58:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644479906; bh=sOyBT9KTJ9e8RVarYf7lEUeFi0anfb6hhv8VDPpph74=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=gZhsakv/FrQVIGUkfvVVAwW55nBWiOIfO32gfkRLolyYrguE8cWVQHYadWx8q2iUT W1rFyTZ9y96HUL5GQVm1GbVGD+IP/VNBU+80tFbMU70hXTqY/uxWNaFHK86QshWbEM grOKkcC4tKeVAE1gjbc1rX1ZJVkTruCwn4nAbSxf9I1oPgnlgpMVo8+xijcN8MVtU8 OwTToGj4F3DI7Zw7wa9ybSE4dwWrXB1Io0rhZltbTE3NdksFgPPYCJQqidYLFJM65Y sMg6xoFe+CERHGWkBPyytYtyxE8l0e0QjInfpRPS9qyk5TzrxQifIBsGCzBA1t9ixc CowxeeawoIgWQ== From: SeongJae Park To: Hugh Dickins Cc: Andrew Morton , Stephen Rothwell , 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 Date: Thu, 10 Feb 2022 07:58:24 +0000 Message-Id: <20220210075824.13422-1-sj@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <8eae6026-098-befb-92d3-b9ad2ad57776@google.com> Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="gZhsakv/"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf25.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org X-Rspam-User: X-Rspamd-Queue-Id: 73067A0005 X-Stat-Signature: tfsebabjwm6rm7y1my93rkngkct6awe1 X-Rspamd-Server: rspam07 X-HE-Tag: 1644479908-94584 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 Wed, 9 Feb 2022 20:44:02 -0800 (PST) Hugh Dickins wrote: > From: SeongJae Park > > 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. > > /linux/mm/swap.c: In function 'lru_add_drain_cpu': > /linux/mm/swap.c:637:2: error: implicit declaration of function 'mlock_page_drain' [-Werror=implicit-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' failed > > This commit fixes it by implementing no-op 'mlock_page_drain()' for > !CONFIG_MMU case, similar to 'mlock_new_page()'. > > [1] https://www.ozlabs.org/~akpm/mmotm/broken-out/mm-munlock-mlock_page-munlock_page-batch-by-pagevec.patch > > [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! Thank you, Hugh! Thanks, SJ > > mm/internal.h | 2 ++ > 1 file changed, 2 insertions(+) > > --- 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 long end) > { > } >