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 48C5BC433EF for ; Wed, 9 Feb 2022 15:45:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C4A126B0074; Wed, 9 Feb 2022 10:45:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BD2066B0075; Wed, 9 Feb 2022 10:45:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A732F6B0078; Wed, 9 Feb 2022 10:45:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0026.hostedemail.com [216.40.44.26]) by kanga.kvack.org (Postfix) with ESMTP id 910B36B0074 for ; Wed, 9 Feb 2022 10:45:21 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 4561A824CA01 for ; Wed, 9 Feb 2022 15:45:21 +0000 (UTC) X-FDA: 79123665642.08.516BAD4 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by imf27.hostedemail.com (Postfix) with ESMTP id E016A40002 for ; Wed, 9 Feb 2022 15:45:20 +0000 (UTC) Received: by mail-qt1-f179.google.com with SMTP id b5so2094716qtq.11 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=DZ8w8ovDvTwq3NEIyYfCRafcpxWy8kHtV77VmwokMpZl+TpPHy/bROpAhafFMzUH1X QRgFvM2+WHuTLII/1ZnEPhGb6mvww4n8kmwU8XrrDTTQUgVy9VHpBgJr4WfUpvtX6R3m ejTZbw29z0DKhZUn4mY5EaJwke05A7fdZT420AV/EQsobhi3A540j6sJ8qxqifnH1XL6 jRSb5MRaDsoe87mJSR0Ll/JvxbNn7cnIwp+JCzTbY25hKZPS6bqzA0/8B9ute0wsxZc4 p2pU3/wXHnUtSlouBJiTd1cXAV6nkqb8qwYlSPc5leXdTRAVt1izCT+fOB2Zm/n5h8VD 9SlQ== X-Gm-Message-State: AOAM532jl7O2l6FplA5SmoZ2KdQB1yJrdtv0CaV8onBYfekCJT05bTs0 xQw7L9Yz0nYF2yZJOFsgfONurA== X-Google-Smtp-Source: ABdhPJx6JfoHHNsav36cW9YJ1pnn6SfZ0KNlilDme2t/kXl3V92r+dLYqvXtT5zUA/I1UT6bWFVvnw== 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-Rspamd-Queue-Id: E016A40002 X-Stat-Signature: sdc5po3jcxs51xboen6dro6bt5i6x8m7 X-Rspam-User: Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=EHKiLFCo; spf=pass (imf27.hostedemail.com: domain of hughd@google.com designates 209.85.160.179 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam05 X-HE-Tag: 1644421520-93450 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: 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--