From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755753AbZGIUqt (ORCPT ); Thu, 9 Jul 2009 16:46:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754476AbZGIUqm (ORCPT ); Thu, 9 Jul 2009 16:46:42 -0400 Received: from smtp3.ultrahosting.com ([74.213.175.254]:38247 "EHLO smtp.ultrahosting.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753826AbZGIUql (ORCPT ); Thu, 9 Jul 2009 16:46:41 -0400 Date: Thu, 9 Jul 2009 16:46:36 -0400 (EDT) From: Christoph Lameter X-X-Sender: cl@gentwo.org To: KOSAKI Motohiro cc: LKML , linux-mm , Andrew Morton , Wu Fengguang , David Rientjes , Rik van Riel , Hugh Dickins Subject: Re: [PATCH 5/5] add shmem vmstat In-Reply-To: <20090709171452.23C9.A69D9226@jp.fujitsu.com> Message-ID: References: <20090709165820.23B7.A69D9226@jp.fujitsu.com> <20090709171452.23C9.A69D9226@jp.fujitsu.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 9 Jul 2009, KOSAKI Motohiro wrote: > Recently, We faced several OOM problem by plenty GEM cache. and generally, > plenty Shmem/Tmpfs potentially makes memory shortage problem. " Recently we encountered OOM problems due to memory use of the GEM cache. Generally a large amuont of Shmem/Tmpfs pages tend to create a memory shortage problem. " > We often use following calculation to know shmem pages, > shmem = NR_ACTIVE_ANON + NR_INACTIVE_ANON - NR_ANON_PAGES > but it is wrong expression. it doesn't consider isolated page and > mlocked page. " We often use the following calculation to determine the amount of shmem pages: shmem = NR_ACTIVE_ANON + NR_INACTIVE_ANON - NR_ANON_PAGES however the expression does not consider isoalted and mlocked pages. " > Then, This patch make explicit Shmem/Tmpfs vm-stat accounting. " This patch adds explicit accounting for pages used by shmem and tmpfs. " Reviewed-by: Christoph Lameter From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail202.messagelabs.com (mail202.messagelabs.com [216.82.254.227]) by kanga.kvack.org (Postfix) with SMTP id 12BCF6B005A for ; Thu, 9 Jul 2009 16:27:31 -0400 (EDT) Received: from localhost (smtp.ultrahosting.com [127.0.0.1]) by smtp.ultrahosting.com (Postfix) with ESMTP id 3896182C518 for ; Thu, 9 Jul 2009 17:05:15 -0400 (EDT) Received: from smtp.ultrahosting.com ([74.213.175.254]) by localhost (smtp.ultrahosting.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nb6dutoN8m6k for ; Thu, 9 Jul 2009 17:05:15 -0400 (EDT) Received: from gentwo.org (unknown [74.213.171.31]) by smtp.ultrahosting.com (Postfix) with ESMTP id 6890F82C517 for ; Thu, 9 Jul 2009 17:05:08 -0400 (EDT) Date: Thu, 9 Jul 2009 16:46:36 -0400 (EDT) From: Christoph Lameter Subject: Re: [PATCH 5/5] add shmem vmstat In-Reply-To: <20090709171452.23C9.A69D9226@jp.fujitsu.com> Message-ID: References: <20090709165820.23B7.A69D9226@jp.fujitsu.com> <20090709171452.23C9.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org To: KOSAKI Motohiro Cc: LKML , linux-mm , Andrew Morton , Wu Fengguang , David Rientjes , Rik van Riel , Hugh Dickins List-ID: On Thu, 9 Jul 2009, KOSAKI Motohiro wrote: > Recently, We faced several OOM problem by plenty GEM cache. and generally, > plenty Shmem/Tmpfs potentially makes memory shortage problem. " Recently we encountered OOM problems due to memory use of the GEM cache. Generally a large amuont of Shmem/Tmpfs pages tend to create a memory shortage problem. " > We often use following calculation to know shmem pages, > shmem = NR_ACTIVE_ANON + NR_INACTIVE_ANON - NR_ANON_PAGES > but it is wrong expression. it doesn't consider isolated page and > mlocked page. " We often use the following calculation to determine the amount of shmem pages: shmem = NR_ACTIVE_ANON + NR_INACTIVE_ANON - NR_ANON_PAGES however the expression does not consider isoalted and mlocked pages. " > Then, This patch make explicit Shmem/Tmpfs vm-stat accounting. " This patch adds explicit accounting for pages used by shmem and tmpfs. " Reviewed-by: Christoph Lameter -- 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