Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752242Ab1CJQS7 (ORCPT ); Thu, 10 Mar 2011 11:18:59 -0500 Received: from smtp-out.google.com ([74.125.121.67]:53523 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751249Ab1CJQS6 convert rfc822-to-8bit (ORCPT ); Thu, 10 Mar 2011 11:18:58 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=QO5BXPYevNr2iXNZFY9hxFO36mpeobUVbu0vE8iv3nwNgXRGUNwzz24ZvhdHEeNIwH 2VbIEVnvz9p2bAzcE0Sw== MIME-Version: 1.0 In-Reply-To: <20110228114018.390ce291.kamezawa.hiroyu@jp.fujitsu.com> References: <1298669760-26344-1-git-send-email-gthelen@google.com> <1298669760-26344-7-git-send-email-gthelen@google.com> <20110227170143.GE3226@barrios-desktop> <20110228114018.390ce291.kamezawa.hiroyu@jp.fujitsu.com> From: Greg Thelen Date: Thu, 10 Mar 2011 08:18:33 -0800 Message-ID: Subject: Re: [PATCH v5 6/9] memcg: add kernel calls for memcg dirty page stats To: KAMEZAWA Hiroyuki Cc: Minchan Kim , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, containers@lists.osdl.org, Andrea Righi , Balbir Singh , Daisuke Nishimura , Ciju Rajan K , David Rientjes , Wu Fengguang , Chad Talbott , Justin TerAvest , Vivek Goyal Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1501 Lines: 40 On Sun, Feb 27, 2011 at 6:40 PM, KAMEZAWA Hiroyuki wrote: > On Mon, 28 Feb 2011 02:01:43 +0900 > Minchan Kim wrote: > >> On Fri, Feb 25, 2011 at 01:35:57PM -0800, Greg Thelen wrote: > ? ? ? ? ? ? ? ?spin_unlock_irqrestore(&mapping->tree_lock, flags); >> > ? ? } else { >> > @@ -1365,6 +1368,7 @@ int test_set_page_writeback(struct page *page) >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? PAGECACHE_TAG_WRITEBACK); >> > ? ? ? ? ? ? ? ? ? ? if (bdi_cap_account_writeback(bdi)) >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? __inc_bdi_stat(bdi, BDI_WRITEBACK); >> > + ? ? ? ? ? ? ? ? ? mem_cgroup_inc_page_stat(page, MEMCG_NR_FILE_WRITEBACK); >> >> Question: >> Why should we care of BDI_CAP_NO_WRITEBACK? >> > Hmm, should we do .. > == > ? ? ? ?if (!ret) { > ? ? ? ? ? ? ? ?account_page_writeback(page); > + ? ? ? ? ? ? ? mem_cgroup_inc_page_stat(page, MEMCG_NR_FILE_WRITEBACL); > ? ? ? ?} > == Yes, I agree with Minchan that this is an issue. I think Kame's fix is good. I will apply Kame's fix to test_set_page_writeback(). I also found that test_clear_page_writeback() has the same issue and it will also be fixed. I will be posting v6 shortly (hopefully today) with these fixes. > Thanks, > -Kame > > -- 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/