From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758735AbZD0UcU (ORCPT ); Mon, 27 Apr 2009 16:32:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755435AbZD0UcJ (ORCPT ); Mon, 27 Apr 2009 16:32:09 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:47241 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752148AbZD0UcI (ORCPT ); Mon, 27 Apr 2009 16:32:08 -0400 Date: Mon, 27 Apr 2009 13:27:22 -0700 From: Andrew Morton To: balbir@linux.vnet.ibm.com Cc: kosaki.motohiro@jp.fujitsu.com, dave@linux.vnet.ibm.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ebmunson@us.ibm.com, mel@linux.vnet.ibm.com, cl@linux-foundation.org Subject: Re: meminfo Committed_AS underflows Message-Id: <20090427132722.926b07f1.akpm@linux-foundation.org> In-Reply-To: <20090415084713.GU7082@balbir.in.ibm.com> References: <20090415105033.AC29.A69D9226@jp.fujitsu.com> <20090415033455.GS7082@balbir.in.ibm.com> <20090415130042.AC3D.A69D9226@jp.fujitsu.com> <20090415084713.GU7082@balbir.in.ibm.com> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.20; i486-pc-linux-gnu) 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 Wed, 15 Apr 2009 14:17:13 +0530 Balbir Singh wrote: > * KOSAKI Motohiro [2009-04-15 13:10:06]: > > > > * KOSAKI Motohiro [2009-04-15 11:04:59]: > > > > > > > committed = atomic_long_read(&vm_committed_space); > > > > + if (committed < 0) > > > > + committed = 0; > > > Is there a reason why we can't use a boring old percpu_counter for vm_committed_space? That way the meminfo code can just use percpu_counter_read_positive(). Or perhaps just percpu_counter_read(). The percpu_counter code does a better job of handling large cpu counts than the mysteriously-duplicative open-coded stuff we have there.