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 B3031C433EF for ; Mon, 28 Mar 2022 21:39:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0862A8D0002; Mon, 28 Mar 2022 17:39:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 033F28D0001; Mon, 28 Mar 2022 17:39:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E3DCF8D0002; Mon, 28 Mar 2022 17:39:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id D5F3B8D0001 for ; Mon, 28 Mar 2022 17:39:20 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 8718818287BBA for ; Mon, 28 Mar 2022 21:39:20 +0000 (UTC) X-FDA: 79295111280.17.FE66E8B Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by imf21.hostedemail.com (Postfix) with ESMTP id F3F731C0041 for ; Mon, 28 Mar 2022 21:39:19 +0000 (UTC) Received: by mail-qk1-f178.google.com with SMTP id 85so12596500qkm.9 for ; Mon, 28 Mar 2022 14:39:19 -0700 (PDT) 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=ZMkNRPnAswmQwnzC9tBCWN0d9K/Tuq/KhdrPUuaz0L4=; b=IF4JOF0xk69Y0ZXhi0VpDnQsLL3/jPIUosOl+1hrHO0YYRpMM0d4rSaH73NYA4rAH6 fqLAZT9D9X38FFl//qML+NQm2GJEaw2/xISZoCU/faB18IpSoMDbeJmTPwwSSrzfDxMZ ozL28/JUqrS8RKOPRBM/eVGsQQIYyxf0OsQRAQohQkxqxLsPWho3EYP9dU3torC1ngBE swSikCRmoPMFTyK8mvDtPV+E/L0uz3WpJa9a8uL200Oto0idzRYZijB6uL3D0qVoW45n 6S9Oe7ytPuGMD0YLIhwpOx/+a0ZrCJ7xdgldNxhslP6EHVQJ+U2Ox7tQpF9WXK12D8Ad cJoQ== 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=ZMkNRPnAswmQwnzC9tBCWN0d9K/Tuq/KhdrPUuaz0L4=; b=hmO4SlfnvZCAjG4fkH/4K1CGT+AQ211FnMAsQ3up/5mF89A/V2dxTQeBk421bkox2d 4iC5DgzAIJHTlqnOAxd2uJer+YQrwqSlmuGusMP05rx9wDStob668f9qjngKlQolM54t p/7RjW8mkedluHXXo0W0jDgt7vQF7ccEIJ91Lu8p2xANtZLtRz5rPbqBdA/Ujt7dMrPe Gp3ZrC6EzgN12R5aIh/ewh6HIsVY9M/NbSE/rudS0NpgUWj28wPFilImybPYnDn+keUL SS/qdNfqfyipllZDwbQbU1dGfBywt5izIL1U5uiCWYo3DMIYrnft2D83DTjzBYwDPA8K nmKA== X-Gm-Message-State: AOAM532aOhCqNVbM2p6VI7A2HjIFqfytZv5RYxta+iPvuFqNaiDuYlvq PY77YMi1ru26Zd7GukFuEQJV5A== X-Google-Smtp-Source: ABdhPJxMzZ8nzhrfCS+cRRrJkRKVWkxBWGmQv1JEKQiw+KZuAOx2hBM/rHyGAbOampUv7sj6LhPDtg== X-Received: by 2002:a05:620a:bd5:b0:67d:15ed:2fcd with SMTP id s21-20020a05620a0bd500b0067d15ed2fcdmr18041898qki.81.1648503558618; Mon, 28 Mar 2022 14:39:18 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id x6-20020a376306000000b0067b32a8568esm8820059qkb.101.2022.03.28.14.39.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 14:39:17 -0700 (PDT) Date: Mon, 28 Mar 2022 14:39:08 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.anvils To: Mike Galbraith cc: Andrew Morton , Vlastimil Babka , Hugh Dickins , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: new ltp memcg gripe bisects to b67bf49ce7aa ("post mm/munlock: delete FOLL_MLOCK and FOLL_POPULATE") In-Reply-To: <90eb31fa-69f7-e320-d8a6-6227fecb780@google.com> Message-ID: References: <969a2030a492f3cecdb7d0095478f1b779c643c3.camel@gmx.de> <90eb31fa-69f7-e320-d8a6-6227fecb780@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Stat-Signature: sbmdc7q7cawwx8wmqpqu75f8sxp3zngi X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: F3F731C0041 Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=IF4JOF0x; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf21.hostedemail.com: domain of hughd@google.com designates 209.85.222.178 as permitted sender) smtp.mailfrom=hughd@google.com X-Rspam-User: X-HE-Tag: 1648503559-480974 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 Fri, 25 Mar 2022, Hugh Dickins wrote: > On Fri, 25 Mar 2022, Mike Galbraith wrote: > > > Greetings, > > > > $subject bisected in a kvm ala: > > > > leap153:/usr/local/ltp # cat testme > > export PATH=$PATH:`pwd`/testcases/bin > > memcg_stat_test.sh > > leap153:/usr/local/ltp # . ./testme > > > > Usually leads to... > > memcg_stat_test 3 TINFO: Test unevictable with MAP_LOCKED > > memcg_stat_test 3 TINFO: Running memcg_process --mmap-lock1 -s 135168 > > memcg_stat_test 3 TINFO: Warming up pid: 3460 > > memcg_stat_test 3 TINFO: Process is still here after warm up: 3460 > > memcg_stat_test 3 TFAIL: unevictable is 122880, 135168 expected > > ...but may lead to... > > memcg_stat_test 4 TINFO: Test unevictable with mlock > > memcg_stat_test 4 TINFO: Running memcg_process --mmap-lock2 -s 135168 > > memcg_stat_test 4 TINFO: Warming up pid: 4271 > > memcg_stat_test 4 TINFO: Process is still here after warm up: 4271 > > memcg_stat_test 4 TFAIL: unevictable is 122880, 135168 expected > > ...or both. A wee bit flaky. > > > > I wanted to verify with a revert on top of 85c7000fda00, but while the > > revert patch applied, the result didn't boot. Config is full distro. > > Thanks a lot for spotting that. I'll have no trouble reproducing it here, > looking through my old LTP test results. I never noticed because I'm used > to memcg_stat failing - but looking closer, that's been because I'm usually > running with THP shmem_enabled "force", which causes memcg_stat_test 1 to > fail with a bigger number than expected (understandably): memcg_stat_test > 3 and 4 failures are new to mlock/munlock changes. > > It will (almost certainly) be a pagevec draining issue, to be fixed by a > strategically placed lru_add_drain() or mlock_page_drain(). I did have > more of those in for a while, before understanding and arriving at > b74355078b65 ("mm/munlock: page migration needs mlock pagevec drained"); > and with that fix, hadn't noticed the need for more, so left them out > until proven desirable. > > If it's as I expect, then it's worth doing: not just to pass an LTP test, > but more generally a good thing. I'll play around in the next few days > and post a patch once I'm satisfied. > > Regarding your bisection and revert of b67bf49ce7aa ("mm/munlock: delete > FOLL_MLOCK and FOLL_POPULATE"). I'm glad to hear that you got a build > error trying to revert that one commit: not a supported combination! > Maybe not too far wrong, but I wouldn't trust it. > > But yes, I can see that the revert will bring in an lru_add_drain() > per page, so that fits with my guess above. Right, I was easily able to reproduce those failures; and happily the patch I had earlier, but left out, indeed fixes them as expected: follows now. Thanks, Hugh