From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by kanga.kvack.org (Postfix) with ESMTP id C34B96B0036 for ; Wed, 23 Jul 2014 11:19:37 -0400 (EDT) Received: by mail-wg0-f43.google.com with SMTP id l18so1308603wgh.2 for ; Wed, 23 Jul 2014 08:19:36 -0700 (PDT) Received: from mx2.suse.de (cantor2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id u9si5804046wiy.4.2014.07.23.08.19.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Jul 2014 08:19:26 -0700 (PDT) Date: Wed, 23 Jul 2014 17:19:09 +0200 From: Michal Hocko Subject: Re: [patch 13/13] mm: memcontrol: rewrite uncharge API Message-ID: <20140723151909.GC16721@dhcp22.suse.cz> References: <20140715082545.GA9366@dhcp22.suse.cz> <20140715121935.GB9366@dhcp22.suse.cz> <20140718071246.GA21565@dhcp22.suse.cz> <20140718144554.GG29639@cmpxchg.org> <20140719173911.GA1725@cmpxchg.org> <20140722150825.GA4517@dhcp22.suse.cz> <20140723143847.GB16721@dhcp22.suse.cz> <20140723150608.GF1725@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140723150608.GF1725@cmpxchg.org> Sender: owner-linux-mm@kvack.org List-ID: To: Johannes Weiner Cc: Miklos Szeredi , Andrew Morton , Hugh Dickins , Tejun Heo , Vladimir Davydov , linux-mm@kvack.org, cgroups@vger.kernel.org, Kernel Mailing List On Wed 23-07-14 11:06:08, Johannes Weiner wrote: > On Wed, Jul 23, 2014 at 04:38:47PM +0200, Michal Hocko wrote: [...] > > OK, thanks for the clarification. I had this feeling but couldn't wrap > > my head around the indirection of the code. > > > > It seems that checkig PageCgroupUsed(new) and bail out early in > > mem_cgroup_migrate should just work, no? > > If the new page is already charged as page cache, we could just drop > the call to mem_cgroup_migrate() altogether. Yeah, it is just that we do not want to do all the page->page_cgroup->PageCgroupUsed thing in replace_page_cache_page. -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org