lkml.org 
[lkml]   [2009]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: meminfo Committed_AS underflows
On Wed, 15 Apr 2009 14:17:13 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> [2009-04-15 13:10:06]:
>
> > > * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> [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.




\
 
 \ /
  Last update: 2009-04-27 22:35    [W:0.085 / U:2.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site