lkml.org 
[lkml]   [2003]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] make vm_enough_memory more efficient
"Martin J. Bligh" <mbligh@aracnet.com> wrote:
>
> vm_enough_memory seems to call si_meminfo just to get the total
> RAM, which seems far too expensive. This replaces the comment
> saying "this is crap" with some code that's less crap.
>
> Not heavily tested (compiles and boots), but seems pretty obvious.

Yup, obviously correct.

The really hurtful part of vm_enough_memory() is the call to
get_page_cache_size(), which has to go over every CPU's local VM statistics
in get_page_state().

But I guess you're running with sysctl_overcommit_memory != 0.


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

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.033 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site