Re: [PATCH] meminfo: add Cached underflow check

From: Martin Hicks
Date: Mon Apr 04 2005 - 17:56:43 EST



On Mon, Apr 04, 2005 at 03:10:49PM -0700, Andrew Morton wrote:
> Martin Hicks <mort@xxxxxxx> wrote:
> >
> > Working on some code lately I've been getting huge values
> > for "Cached". The cause is that get_page_cache_size() is an
> > approximate value, and for a sufficiently small returned value
> > of get_page_cache_size() the value underflows.
>
> OK..
>
> I think I'd prefer to do it this way - it's simpler and the original patch
> had a teeny race wrt changes in total_swapcache_pages.

Fine by me.

mh

--
Martin Hicks || Silicon Graphics Inc. || mort@xxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/