Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1992415pxb; Wed, 9 Feb 2022 08:41:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMaIwdMEG8uR8jujg/kMa6O2KOpMf9JPvHhEpBdV79fGmly9abU+DT/tlk4+8o74FQqeU/ X-Received: by 2002:a65:679a:: with SMTP id e26mr948584pgr.182.1644424907487; Wed, 09 Feb 2022 08:41:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644424907; cv=none; d=google.com; s=arc-20160816; b=roUdkRy5hgXX1R4mmOaKL00aRRbSUEDTs4/qd8hMjtcl6sDbGMqbkB+p4azmoQAAzb SpIGlfI+atgE/OuKbcg/sAAqHLAy1cpuI9KoEZgQTZOaRNLLoau8AVZtVADgt8UfhZm8 0jQY6rXLABsNUS3CWVH385VZJuBVGGF3B7LgSlZSUElibpy4sBJ6iomZsn3BSa9n5dyg F90I5L46pXesM10jOIrXU702JgJ8Aa7KKzaUj1cG/PTlKDB0494zIZm95SyptNgzsgug VhTVDsnTKQZheutvm4uAH3wuOTR70s+os4TbCidxs4CQKWBJqJerYE9ljjYaGntyawV/ 9zlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=3shrmB0H/pTmuf5G/5yvegYTbR9AsKh3PxNaIWIn02w=; b=Ug6AJAJWULog4Q8bm8nPJWno+X9bXk3cX1QJ6bPn1boW8u9qSJJf7ijmmnGHIRIjBa uwBll8qZGb2LWji+sYq+V6nrU2my/u7KeamlJqF5QLxUOTqWqqnTd3OGk48lf5a7ZFv3 CBNRGXm6FFYafZ3/+nkDkIZxpr3e5pyBAHn4FJpWYFg6zFdfl8C+IKzfv9txqvldC1Ia dviHuqmm54BNuFMhd8bIlkNkkQdjjWaIJ545JY6HxVQ3ziOGmQtGUwFFAbJsfCkeAzZq dAV/HErT7t37ulFX041oCOIZ6UNdpj4/bynN/BeLeGhBYej+jSekuprno9F+DJfkuVdX n3fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=EHKiLFCo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m1si22988877pgu.609.2022.02.09.08.41.33; Wed, 09 Feb 2022 08:41:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=EHKiLFCo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236244AbiBIPpU (ORCPT + 99 others); Wed, 9 Feb 2022 10:45:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232680AbiBIPpS (ORCPT ); Wed, 9 Feb 2022 10:45:18 -0500 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECAF6C0613CA for ; Wed, 9 Feb 2022 07:45:20 -0800 (PST) Received: by mail-qt1-x835.google.com with SMTP id t1so2082093qtq.13 for ; Wed, 09 Feb 2022 07:45:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=3shrmB0H/pTmuf5G/5yvegYTbR9AsKh3PxNaIWIn02w=; b=EHKiLFCoaGny39YZO5//42CchKuutldtOI0Aa5XAsYwIjfkgAHdpW6t9yqA5RxStk6 CLg+cwRvAXGb3kwQXp9D5ASK0ef5xOysJxqdtxRZjS8ye11zRD7oh6iu8xHe7rIpLn8P YqPsmwxbOajeIzqLUh9yvnMjxrCLwy7x099u1f1jrkluuxXZcNnHK2352KQxlAXW6hsl 9oh6dKFc4iz1F/+wzT91rbZ3GZB7+irg+P47EaMGZCGWsKU1SwamvAQLx5Ep6JOinRvd xe7YozFGz7c/y0ZD/SUGI7nHZchjIps307xqW/ptQYdeXf26nRVQDGviQvpFMx2ArjLs EECg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=3shrmB0H/pTmuf5G/5yvegYTbR9AsKh3PxNaIWIn02w=; b=C4keTi4S2ahGUfMZ1Q1/G21R1AHSr8m6wz4gao+0EpDg+Bug8GGaEZtQNIncC0kUaW juSIYTq3Jy35hqZBMM+w7FaMCsjSRp6rUiORVE/kvXRNMdr9bAz1GuSQ1Lp2LFuAgA6N e+b4DVqtYEvordfsMGRnCQRTTVHFl7eGIG1tH63v28LQZdQC6bjCjOHU+wcc1qweneDL C+V15kGQX25MqWhjVWCa7YIblB3fo4GMHeAsQDufvjxo6mOwhFYxauJV8GQVYJV352N0 BPlCW9c4cSHr73s8btkCqDlKiQXYKmnQd9MSJFNZtjbkzZ2LFZG8V8VvXpsJ72y4QEm7 ixNQ== X-Gm-Message-State: AOAM532l84aJC8bG4pGEQ9q4HvzhlkI9VhdCBbSyxLlfm6ryNPT6jQpp ZVyrMlhz1rcpab7+H3jCJd6TyA== X-Received: by 2002:a05:622a:34f:: with SMTP id r15mr1733163qtw.614.1644421519793; Wed, 09 Feb 2022 07:45:19 -0800 (PST) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id bl1sm8465658qkb.16.2022.02.09.07.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 07:45:17 -0800 (PST) Date: Wed, 9 Feb 2022 07:45:14 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@ripple.anvils To: Geert Uytterhoeven cc: Hugh Dickins , Andrew Morton , Michal Hocko , Vlastimil Babka , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Alistair Popple , Johannes Weiner , Rik van Riel , Suren Baghdasaryan , Yu Zhao , Greg Thelen , Shakeel Butt , SeongJae Park , Linux Kernel Mailing List , Linux MM Subject: Re: [PATCH 10/13] mm/munlock: mlock_page() munlock_page() batch by pagevec In-Reply-To: Message-ID: References: <8e4356d-9622-a7f0-b2c-f116b5f2efea@google.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1892591577-1644421517=:6994" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1892591577-1644421517=:6994 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 9 Feb 2022, Geert Uytterhoeven wrote: >=20 > Thanks for your patch, which is now commit cbaf47432c909044 > ("mm/munlock: mlock_page() munlock_page() batch by pagevec") in > next-20220209. >=20 > > --- a/mm/internal.h > > +++ b/mm/internal.h > > @@ -402,7 +402,8 @@ extern int mlock_future_check(struct mm_struct *mm,= unsigned long flags, > > * > > * mlock is usually called at the end of page_add_*_rmap(), > > * munlock at the end of page_remove_rmap(); but new anon > > - * pages are managed in lru_cache_add_inactive_or_unevictable(). > > + * pages are managed by lru_cache_add_inactive_or_unevictable() > > + * calling mlock_new_page(). > > * > > * @compound is used to include pmd mappings of THPs, but filter out > > * pte mappings of THPs, which cannot be consistently counted: a pte > > @@ -425,6 +426,9 @@ static inline void munlock_vma_page(struct page *pa= ge, > > (compound || !PageTransCompound(page))) > > munlock_page(page); > > } > > +void mlock_new_page(struct page *page); > > +bool need_mlock_page_drain(int cpu); > > +void mlock_page_drain(int cpu); >=20 > This is inside an #ifdef CONFIG_MMU section. >=20 > > --- a/mm/swap.c > > +++ b/mm/swap.c >=20 > > @@ -640,6 +634,7 @@ void lru_add_drain_cpu(int cpu) > > pagevec_lru_move_fn(pvec, lru_lazyfree_fn); > > > > activate_page_drain(cpu); > > + mlock_page_drain(cpu); >=20 > noreply@ellerman.id.au reported for m5272c3_defconfig: >=20 > mm/swap.c:637:2: error: implicit declaration of function > =E2=80=98mlock_page_drain=E2=80=99 [-Werror=3Dimplicit-function-declarati= on] >=20 > http://kisskb.ellerman.id.au/kisskb/buildresult/14694567/ Hi Geert, thanks for your report: SeongJae has posted a fix https://lore.kernel.org/lkml/20220209094158.21941-2-sj@kernel.org/ but there I'm wondering if it's complete: I'll settle it later today. Hugh --0-1892591577-1644421517=:6994--