From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755107Ab0FQG2E (ORCPT ); Thu, 17 Jun 2010 02:28:04 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:47288 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753966Ab0FQG2B (ORCPT ); Thu, 17 Jun 2010 02:28:01 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Thu, 17 Jun 2010 15:23:12 +0900 From: KAMEZAWA Hiroyuki To: Christoph Hellwig Cc: Mel Gorman , Rik van Riel , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Dave Chinner , Chris Mason , Nick Piggin , Johannes Weiner , Andrew Morton Subject: Re: [PATCH 12/12] vmscan: Do not writeback pages in direct reclaim Message-Id: <20100617152312.43e84eb0.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20100617061647.GA21277@infradead.org> References: <1276514273-27693-13-git-send-email-mel@csn.ul.ie> <4C16A567.4080000@redhat.com> <20100615114510.GE26788@csn.ul.ie> <4C17815A.8080402@redhat.com> <20100615135928.GK26788@csn.ul.ie> <4C178868.2010002@redhat.com> <20100615141601.GL26788@csn.ul.ie> <20100616091755.7121c7d3.kamezawa.hiroyu@jp.fujitsu.com> <20100616050640.GA10687@infradead.org> <20100617092538.c712342b.kamezawa.hiroyu@jp.fujitsu.com> <20100617061647.GA21277@infradead.org> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 3.0.2 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 17 Jun 2010 02:16:47 -0400 Christoph Hellwig wrote: > On Thu, Jun 17, 2010 at 09:25:38AM +0900, KAMEZAWA Hiroyuki wrote: > > > > BTW, why xbf_buf_create() use GFP_KERNEL even if it can be blocked ? > > memory cgroup just limits pages for users, then, doesn't intend to > > limit kernel pages. > > You mean xfs_buf_allocate? It doesn't in the end. It goes through the > xfs_kmem helper which clear __GFP_FS if we're currently inside a > filesystem transaction (PF_FSTRANS is set) or a caller specificly > requested it to be disabled even without that by passig the > XBF_DONT_BLOCK flag. > Ah, sorry. My question was wrong. If xfs_buf_allocate() is not for pages on LRU but for kernel memory, memory cgroup has no reason to charge against it because we can't reclaim memory which is not on LRU. Then, I wonder I may have to add following check if (!(gfp_mask & __GFP_RECLAIMABLE)) { /* ignore this. we just charge against reclaimable memory on LRU. */ return 0; } to mem_cgroup_charge_cache() which is a hook for accounting page-cache. Thanks, -Kame From mboxrd@z Thu Jan 1 00:00:00 1970 From: KAMEZAWA Hiroyuki Subject: Re: [PATCH 12/12] vmscan: Do not writeback pages in direct reclaim Date: Thu, 17 Jun 2010 15:23:12 +0900 Message-ID: <20100617152312.43e84eb0.kamezawa.hiroyu@jp.fujitsu.com> References: <1276514273-27693-13-git-send-email-mel@csn.ul.ie> <4C16A567.4080000@redhat.com> <20100615114510.GE26788@csn.ul.ie> <4C17815A.8080402@redhat.com> <20100615135928.GK26788@csn.ul.ie> <4C178868.2010002@redhat.com> <20100615141601.GL26788@csn.ul.ie> <20100616091755.7121c7d3.kamezawa.hiroyu@jp.fujitsu.com> <20100616050640.GA10687@infradead.org> <20100617092538.c712342b.kamezawa.hiroyu@jp.fujitsu.com> <20100617061647.GA21277@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Mel Gorman , Rik van Riel , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Dave Chinner , Chris Mason , Nick Piggin , Johannes Weiner , Andrew Morton To: Christoph Hellwig Return-path: In-Reply-To: <20100617061647.GA21277@infradead.org> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 17 Jun 2010 02:16:47 -0400 Christoph Hellwig wrote: > On Thu, Jun 17, 2010 at 09:25:38AM +0900, KAMEZAWA Hiroyuki wrote: > > > > BTW, why xbf_buf_create() use GFP_KERNEL even if it can be blocked ? > > memory cgroup just limits pages for users, then, doesn't intend to > > limit kernel pages. > > You mean xfs_buf_allocate? It doesn't in the end. It goes through the > xfs_kmem helper which clear __GFP_FS if we're currently inside a > filesystem transaction (PF_FSTRANS is set) or a caller specificly > requested it to be disabled even without that by passig the > XBF_DONT_BLOCK flag. > Ah, sorry. My question was wrong. If xfs_buf_allocate() is not for pages on LRU but for kernel memory, memory cgroup has no reason to charge against it because we can't reclaim memory which is not on LRU. Then, I wonder I may have to add following check if (!(gfp_mask & __GFP_RECLAIMABLE)) { /* ignore this. we just charge against reclaimable memory on LRU. */ return 0; } to mem_cgroup_charge_cache() which is a hook for accounting page-cache. Thanks, -Kame -- 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