Thread (3 messages) 3 messages, 2 authors, 2003-01-16

Re: [PATCH] make vm_enough_memory more efficient

From: Andrew Morton <hidden>
Date: 2003-01-16 08:04:54
Also in: lkml

"Martin J. Bligh" [off-list ref] 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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help