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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 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 7ECBCC33CB1 for ; Tue, 14 Jan 2020 09:30:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4A361207FF for ; Tue, 14 Jan 2020 09:30:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A361207FF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D40858E0006; Tue, 14 Jan 2020 04:30:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CF0E48E0003; Tue, 14 Jan 2020 04:30:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BDF698E0006; Tue, 14 Jan 2020 04:30:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0169.hostedemail.com [216.40.44.169]) by kanga.kvack.org (Postfix) with ESMTP id A947B8E0003 for ; Tue, 14 Jan 2020 04:30:53 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 5C3298790 for ; Tue, 14 Jan 2020 09:30:53 +0000 (UTC) X-FDA: 76375720386.11.swing92_24b4f261ace45 X-HE-Tag: swing92_24b4f261ace45 X-Filterd-Recvd-Size: 2683 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Jan 2020 09:30:50 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R781e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04397;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0TnibyCd_1578994246; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0TnibyCd_1578994246) by smtp.aliyun-inc.com(127.0.0.1); Tue, 14 Jan 2020 17:30:46 +0800 Subject: Re: [PATCH v7 00/10] per lruvec lru_lock for memcg From: Alex Shi To: Hugh Dickins , hannes@cmpxchg.org Cc: Andrew Morton , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mgorman@techsingularity.net, tj@kernel.org, khlebnikov@yandex-team.ru, daniel.m.jordan@oracle.com, yang.shi@linux.alibaba.com, willy@infradead.org, shakeelb@google.com References: <1577264666-246071-1-git-send-email-alex.shi@linux.alibaba.com> <20191231150514.61c2b8c8354320f09b09f377@linux-foundation.org> <944f0f6a-466a-7ce3-524c-f6db86fd0891@linux.alibaba.com> <24d671ac-36ef-8883-ad94-1bd497d46783@linux.alibaba.com> <641e4c96-c79f-fbdd-9762-f4608961423c@linux.alibaba.com> Message-ID: <39a72184-c864-4a40-49fd-c27893dd2002@linux.alibaba.com> Date: Tue, 14 Jan 2020 17:29:17 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <641e4c96-c79f-fbdd-9762-f4608961423c@linux.alibaba.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: =E5=9C=A8 2020/1/14 =E4=B8=8B=E5=8D=885:14, Alex Shi =E5=86=99=E9=81=93: > Anyway, although I didn't reproduced the bug. but I found a bug in my > debug function: > VM_BUG_ON_PAGE(lruvec_memcg(lruvec) !=3D page->mem_cgroup, page); >=20 > if !page->mem_cgroup, the bug could be triggered, so, seems it's a bug > for debug function, not real issue. The 9th patch should be replaced by > the following new patch.=20 If !page->mem_cgroup, means the page is on root_mem_cgroup, so lurvec's memcg is root_mem_cgroup, not NULL. that trigger the issue. Hi Johannes, So I have a question about the lock_page_memcg in this scenario, Should we lock the page to root_mem_cgroup? or there is no needs as no tasks move to a leaf memcg from root? Thanks Alex