From: Alex Shi Subject: Re: [PATCH v3 3/7] mm/lru: replace pgdat lru_lock with lruvec lock Date: Tue, 19 Nov 2019 18:08:04 +0800 Message-ID: References: <1573874106-23802-1-git-send-email-alex.shi@linux.alibaba.com> <1573874106-23802-4-git-send-email-alex.shi@linux.alibaba.com> <3f179d84-85e2-bace-2dbc-e77f73883c71@linux.alibaba.com> <20191118123138.GL20752@bombadil.infradead.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20191118123138.GL20752@bombadil.infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="utf-8" To: Matthew Wilcox Cc: Shakeel Butt , Cgroups , LKML , Linux MM , Andrew Morton , Mel Gorman , Tejun Heo , Hugh Dickins , Konstantin Khlebnikov , Daniel Jordan , Yang Shi , Johannes Weiner , Michal Hocko , Vladimir Davydov , Roman Gushchin , Chris Down , Thomas Gleixner , Vlastimil Babka , Qian Cai , Andrey Ryabinin , Kirill A. Shute 在 2019/11/18 下午8:31, Matthew Wilcox 写道: >> Thanks for comments, Shakeel. >> >> lruvec lifetime is same as memcg, which allocted in mem_cgroup_alloc()->alloc_mem_cgroup_per_node_info() >> I have read Hugh's patchset, even not every lines. But what's point of you here? > I believe Shakeel's point is that here: > > struct lruvec *mem_cgroup_page_lruvec(struct page *page, struct pglist_data *pgdat) > { > ... > memcg = page->mem_cgroup; > > there is nothing pinning the memcg, and it could be freed before > dereferencing memcg->nodeinfo in mem_cgroup_page_nodeinfo(). That's right! I will send the fix patches for review. Thanks a lot!