Messages in this thread | | | Date | Mon, 27 Apr 2009 13:27:22 -0700 | From | Andrew Morton <> | Subject | Re: 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.
| |