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 X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D24FC433E1 for ; Thu, 20 Aug 2020 17:15:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 11722206B5 for ; Thu, 20 Aug 2020 17:15:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OfBzuLHZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11722206B5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8B34A6B0082; Thu, 20 Aug 2020 13:15:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 888B36B0085; Thu, 20 Aug 2020 13:15:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 79FAF6B0087; Thu, 20 Aug 2020 13:15:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0006.hostedemail.com [216.40.44.6]) by kanga.kvack.org (Postfix) with ESMTP id 65B0A6B0082 for ; Thu, 20 Aug 2020 13:15:30 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 2146D2AAE for ; Thu, 20 Aug 2020 17:15:30 +0000 (UTC) X-FDA: 77171598420.06.loaf08_0e0925727032 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id B33A11003F9CF for ; Thu, 20 Aug 2020 17:15:29 +0000 (UTC) X-HE-Tag: loaf08_0e0925727032 X-Filterd-Recvd-Size: 5196 Received: from mail-il1-f196.google.com (mail-il1-f196.google.com [209.85.166.196]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Thu, 20 Aug 2020 17:15:29 +0000 (UTC) Received: by mail-il1-f196.google.com with SMTP id p18so2270831ilm.7 for ; Thu, 20 Aug 2020 10:15:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=MOQmfZn9DA4QXnKxyQeBWYBG/mA3vxQqGH4PKhYLc5o=; b=OfBzuLHZ2eSHGCtzyhVtTLqGYyG1Up4rJEWA0nr8ye40oTw8lvfrlQJXFRysqMYoDt eOGvCWmxBFoWGMLHQXoBHqnzSy4h2NC9VOv3VeXXQu1kI/PhBB+F+2MKDFp1BIXr78HS Vk33HZ2ECIEDzTQu95hzffvCTm5bzMONFui3vlVPtr7YAlnSkn55SMJ1RCht2TTIMMOh zEeiOHkWMWGWHZdpzhItd55aQryuPukj72Ij6RXsM2UGmfaFWCtz7UAePAj3B/nHqWRt 7Dat4Z8Yb74jW1xR4XiSMT9Ho29VZs0MO7r5ePNd999lahMd89om26IvTh5fLLk0Dctf AWvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=MOQmfZn9DA4QXnKxyQeBWYBG/mA3vxQqGH4PKhYLc5o=; b=NSNq2O0xJiNpCZXH/OdfZPkTtRkU+wAAnd0Eow7IwIc+9WauJCEmo8JEcNhxR7PdIH 7CeKjiwSd61TWfbsFElcO6Jx+YSh8t7mjCBQRMQCrRLkL/vLIjOwZg7yOQGaJbGuwyEA SKas2WxibpzQ73/cTcC4zgOK7BLefgToSAiKvpDe4T7q+EE4NMxybSu9gVDlScw/oOWf 9DSswpghhDmwyuKJR+UjzpTqWxMYQoyk4NQYGUI7BUc4glXpINolKUD+x7pfkuZmXT3B /iZctagbRL4nCh5302yPPxZp4uJ6Uq+O5Fds4j2G/kbD3i39ygzPsiZF1mp76Ekz9/Le ++9w== X-Gm-Message-State: AOAM531j3aURTiiCqDr1oYQQAGdqMvroHPldoVJLlT+fnyVxV2p8IoVa cm8imvWu2RxH65A4ozLiXJw8za6CVKv2/z7+v8I= X-Google-Smtp-Source: ABdhPJzhT90NxQEDROP7MsMMwa4plorb/IpX1WdMHQHJMHCNn3LrLx1qXWTMcLhjtdyEkwkUV8Fqvrkh7A6b529fmDI= X-Received: by 2002:a92:ae06:: with SMTP id s6mr3311682ilh.64.1597943728468; Thu, 20 Aug 2020 10:15:28 -0700 (PDT) MIME-Version: 1.0 References: <20200819041852.23414.95939.stgit@localhost.localdomain> <20200819042738.23414.60815.stgit@localhost.localdomain> <084c58a7-7aac-820c-9606-19391c35b9b5@linux.alibaba.com> <87ded438-e908-117d-ecfb-1af7224d46da@linux.alibaba.com> In-Reply-To: <87ded438-e908-117d-ecfb-1af7224d46da@linux.alibaba.com> From: Alexander Duyck Date: Thu, 20 Aug 2020 10:15:17 -0700 Message-ID: Subject: Re: [RFC PATCH v2 5/5] mm: Split move_pages_to_lru into 3 separate passes To: Alex Shi Cc: Yang Shi , kbuild test robot , Rong Chen , Konstantin Khlebnikov , "Kirill A. Shutemov" , Hugh Dickins , LKML , Daniel Jordan , linux-mm , Shakeel Butt , Matthew Wilcox , Johannes Weiner , Tejun Heo , cgroups@vger.kernel.org, Andrew Morton , Wei Yang , Mel Gorman , Joonsoo Kim Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: B33A11003F9CF X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 Thu, Aug 20, 2020 at 2:58 AM Alex Shi wrote= : > > > > =E5=9C=A8 2020/8/19 =E4=B8=8B=E5=8D=8810:42, Alexander Duyck =E5=86=99=E9= =81=93: > >> It's actually changed the meaning from current func. which I had seen = a bug if no relock. > >> but after move to 5.9 kernel, I can not reprodce the bug any more. I a= m not sure if 5.9 fixed > >> the problem, and we don't need relock here. > > So I am not sure what you mean here about "changed the meaning from > > the current func". Which function are you referring to and what > > changed? > > > > From what I can tell the pages cannot change memcg because they were > > isolated and had the LRU flag stripped. They shouldn't be able to > > change destination LRU vector as a result. Assuming that, then they > > can all be processed under same LRU lock and we can avoid having to > > release it until we are forced to do so to call putback_lru_page or > > destroy the compound pages that were freed while we were shrinking the > > LRU lists. > > > > I had sent a bug which base on 5.8 kernel. > https://lkml.org/lkml/2020/7/28/465 > > I am not sure it was fixed in new kernel. The original line was introduce= d by Hugh Dickins > I believe it would be great if you can get comments from him. When I brought this up before you had pointed to the relocking being due to the fact that the function was reacquiring the lruvec for some reason. I wonder if the fact that the LRU bit stripping serializing things made it so that the check for the lruvec after releasing the lock became redundant. - Alex