Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4993050ybl; Tue, 14 Jan 2020 01:32:53 -0800 (PST) X-Google-Smtp-Source: APXvYqzC1kcYWgneJ6H9imv3cBdiOLlVsk6OUaBhAc1gaFUg3xTnmVOJOyHl3P5/dSAXF6I/AeXt X-Received: by 2002:a9d:24ea:: with SMTP id z97mr16582756ota.345.1578994373437; Tue, 14 Jan 2020 01:32:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578994373; cv=none; d=google.com; s=arc-20160816; b=qA8H34NSkPRUu2+l3ED88cxN5Kj4zFZeWyUcflYNNkf8YpXtodnfpYw2E4YIVqFIDY Du/F2F8zWugZrIReXlqfCMgjHqeuLLc3CS+DNoBqlMdxS6DhB++/CeenZxH5/ietH2kn b2YRU7fY7P+k7LyYMK0DQ2Z76GZYSfEBjVacQSrsRcqQDNc3/JsEdp4rpd8/jk5Mr7ni 0qkt+u2GUaBEuC0dMg0+DaK/mv0tW6UHnGXUU+wVwSVcnIu0v6s6OnG2bcjB1O2I5WfS MyjmqE3Hb83tq7VHEJmXBjkOaKy8klxdyREasgzt0Pd+pRTBNDxSg5sORs8dJVH2Qj9M vzXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:references:cc:to:from :subject; bh=xm69Qv5qa0JxodjbCgve4eXdUbby8AISm/x1rUcNQ8c=; b=CTWMZJyNlHns+ROytAM20wLfBzOJxkSh2RxmGc3uhyHf2oFz9A/VVBdb+Ksn6mX6qw P+vJbvpbKF/yeZ6GgKBzV1yVInXFZnQKEkZMiXuGU1nivneAt2lYS1GkCwEgUud30f9u yCkPgjowb1GOJoelvuRJGBIJ6MqpLQng+zBs6K7WR44hkN4IMFw0TFxtzxY2xMyHz338 ydb5een4Nnp7c2lnjMP8G5+EyFHSKx9jbJhc6ipvF9Kr2RM8XyGo4zyfpDD7tVHntDCZ R9BT9Txm4DOGckfw7umQxOSB1Qar7NUDcn7bbHwvW4VYzDvHnoBiDT1d6x04Qslj4Y1A lI9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r14si6649009oic.12.2020.01.14.01.32.41; Tue, 14 Jan 2020 01:32:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728914AbgANJau (ORCPT + 99 others); Tue, 14 Jan 2020 04:30:50 -0500 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:59301 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbgANJau (ORCPT ); Tue, 14 Jan 2020 04:30:50 -0500 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: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2020/1/14 下午5:14, Alex Shi 写道: > Anyway, although I didn't reproduced the bug. but I found a bug in my > debug function: > VM_BUG_ON_PAGE(lruvec_memcg(lruvec) != page->mem_cgroup, page); > > 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. 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