Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1850460pxb; Wed, 9 Feb 2022 05:58:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWtM8/Nz9nUQXKWFjCCSKesiT11r7oHFazQooxru3T8AymCmPQIqKysYQrahLmcIc/T9sr X-Received: by 2002:a17:90a:5a48:: with SMTP id m8mr1253561pji.97.1644415114117; Wed, 09 Feb 2022 05:58:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644415114; cv=none; d=google.com; s=arc-20160816; b=yV4PsRE/ArqEYbM/8vHu/HW1egtZzA0njzl4wCDrW2/b1ao98iHrnAUFxJF7+H0UAd S4c+mhE9ulVvx9lCgUq9c3tQiasBO7+Gq5O87c4kmLra2/w6qs99dc8va3JJSML6Xkbm 1SHObUnIMY8blEnGtkMPZ6SREE1Jl3xztctS7Jup+umZQhQd5ExfgfJholUWFY4NUUSG la7nJ84QWHBK+joBu/sWSYqL6Gcg+yVq02gJM16BKf34mludsK+2U491M0h4qUgMdvQW r5WpoHbwSTPtdWomjObVSZUqcmcvnHrclkaiqKu/0SNagKKV7ttO9Z+q5dVZLRbhYssB 5vUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=7gMFFNqAEC38TuMU6xJbJKq3A6kHAqCp3bmdVqmLHVk=; b=zWosj1M7LEx56Ar1CMQFHg+sXDuMlcu3xejztmda9vo6FLN6tLQRJuqu+xnRBnjy6B rnDmU8wJZuhHVgWkaqzn7VhAexfHvEJBsoCISgsN3OCn67CJYEO7qEf1raS8X81X22vc lwnrAAsJugK17LQFp/1xoEKAZQFFkxUr7P6COPUlwEjxqXXe/xLMPp6e/K/Bd1CmQJ5X YktcUm9+Dxl2BhcyWbzy1rNZ5TgbwuKjz+6s+U3Wi63uNW8mK5FYhOxmwHrnCXWm8L9B 1RmeMoIQRyCnpyfCAeKBJzshHwtSpGwUgc9NtKBPali+tqyueKCA/+r2NjdJ29f6Hqdh 8pOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t17a+03W; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x15si16812895pfd.329.2022.02.09.05.58.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 05:58:34 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t17a+03W; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 36B8AE17E44E; Wed, 9 Feb 2022 02:37:01 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229617AbiBIJ7P (ORCPT + 99 others); Wed, 9 Feb 2022 04:59:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233080AbiBIJ6v (ORCPT ); Wed, 9 Feb 2022 04:58:51 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F0B9E04F313 for ; Wed, 9 Feb 2022 01:58:45 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 4DBF2B81FC2 for ; Wed, 9 Feb 2022 09:42:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4EA0C340E7; Wed, 9 Feb 2022 09:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644399736; bh=T+mYubC4DgSvWYTBn4SckuteBDQWitfpW4vxCFz9Xd8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t17a+03WpPX5fsyUkiVTqQQb7z0JMhqNvZlsnI+WEPj7FkoPewMVPVXjflLcg9EE9 GsHvy14RTTWBaoF2mawz3tHmklfaoojB+PysLINwOETeXVm84mCSMlG1FAA3H1snEd nugn54oDNGmkwczq7cQREbfICXYt2kEMFIPGXxp7oCH1Guz/yDneb7XqNTO6Uafq7e rNE8DkCmHqu+OtgKl/G87Riq5oSpyI+VbyTr90CKlW6dcJ5nASv8Z9sBw9M6xPPmIu PCEcpl30FDfNoqir6Up3C785j80M0mbJwjo+50juCR7xJouMdlDWZlZnHOCcJAgyjq hq4lCIIWCdeIw== From: SeongJae Park To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park , hughd@google.com Subject: [PATCH for-mm 1/2] mm/internal: Implement no-op mlock_page_drain() for !CONFIG_MMU Date: Wed, 9 Feb 2022 09:41:57 +0000 Message-Id: <20220209094158.21941-2-sj@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220209094158.21941-1-sj@kernel.org> References: <20220209094158.21941-1-sj@kernel.org> X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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 Signed-off-by: SeongJae Park --- mm/internal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/internal.h b/mm/internal.h index 0d240e876831..248224369b34 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -508,6 +508,7 @@ 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 void mlock_page_drain(int cpu) { } static inline void vunmap_range_noflush(unsigned long start, unsigned long end) { } -- 2.17.1