Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756242Ab1FHPFA (ORCPT ); Wed, 8 Jun 2011 11:05:00 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34605 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751703Ab1FHPE5 (ORCPT ); Wed, 8 Jun 2011 11:04:57 -0400 Date: Wed, 8 Jun 2011 17:04:47 +0200 From: Michal Hocko To: Johannes Weiner Cc: Hiroyuki Kamezawa , KAMEZAWA Hiroyuki , Daisuke Nishimura , Balbir Singh , Ying Han , Andrew Morton , Rik van Riel , Minchan Kim , KOSAKI Motohiro , Mel Gorman , Greg Thelen , Michel Lespinasse , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [patch 8/8] mm: make per-memcg lru lists exclusive Message-ID: <20110608145002.GB9936@tiehlicka.suse.cz> References: <1306909519-7286-1-git-send-email-hannes@cmpxchg.org> <1306909519-7286-9-git-send-email-hannes@cmpxchg.org> <20110602142408.GB28684@cmpxchg.org> <20110602175702.GI28684@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110602175702.GI28684@cmpxchg.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1470 Lines: 37 On Thu 02-06-11 19:57:02, Johannes Weiner wrote: > On Fri, Jun 03, 2011 at 12:54:39AM +0900, Hiroyuki Kamezawa wrote: > > 2011/6/2 Johannes Weiner : > > > On Thu, Jun 02, 2011 at 10:16:59PM +0900, Hiroyuki Kamezawa wrote: [...] > > > But it may put a page onto wrong memcgs if we do link a page to > > another page's page->lru > > because 2 pages may be in different cgroup each other. > > Yes, I noticed that. If it splits a huge page, it does not just add > the tailpages to the lru head, but it links them next to the head > page. > > But I don't see how those pages could ever be in different memcgs? > pages with page->mapping pointing to the same anon_vma are always in > the same memcg, AFAIU. Process can be moved to other memcg and without move_charge_at_immigrate all previously faulted pages stay in the original group while all new (not faulted yet) get into the new group while mapping doesn't change. I guess this might happen with thp tailpages as well. But I do not think this is a problem. The original group already got charged for the huge page so we can keep all tail pages in it. -- Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/