linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] make vm_enough_memory more efficient
Date: Thu, 16 Jan 2003 00:14:47 -0800	[thread overview]
Message-ID: <20030116001447.07337e9e.akpm@digeo.com> (raw)
In-Reply-To: <66360000.1042703224@titus>

"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, 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/

  reply	other threads:[~2003-01-16  8:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-16  7:47 Martin J. Bligh
2003-01-16  8:14 ` Andrew Morton [this message]
2003-01-16 15:22   ` Martin J. Bligh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030116001447.07337e9e.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@aracnet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox