linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Subject: Re: Use ZVC counters to establish exact size of dirtyable pages
Date: Wed, 14 Feb 2007 14:49:49 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0702141448170.3326@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0702141433190.3228@schroedinger.engr.sgi.com>

On Wed, 14 Feb 2007, Christoph Lameter wrote:

> > This function will return zero.  Which I think we'll happen to handle OK.
> 
> One would expect the function to return 10. The 10 pages are on the LRU.
> If we really have zero dirtyable pages then we will get a division by 
> zero problem.

Well we do not have the division by zero problem due to this 
expression that really should also use available_memory

       unmapped_ratio = 100 - ((global_page_state(NR_FILE_MAPPED) +
                                global_page_state(NR_ANON_PAGES)) * 100) /
                                        vm_total_pages;

If we would change the basis here too (which is probably a good thing to 
do) then we may have the division by zero issue.

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2007-02-14 22:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12 18:16 Use ZVC counters to establish exact size of dirtyable pages Christoph Lameter
2007-02-13  8:04 ` Andrew Morton
2007-02-13 17:43   ` Christoph Lameter
2007-02-13 18:03     ` Andrew Morton
2007-02-14 22:24     ` Andrew Morton
2007-02-14 22:41       ` Christoph Lameter
2007-02-14 22:49         ` Christoph Lameter [this message]
2007-02-14 23:19         ` Andrew Morton
2007-02-14 23:35           ` Christoph Lameter
2007-02-14 23:44             ` Andrew Morton
2007-02-15  0:00               ` Christoph Lameter

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=Pine.LNX.4.64.0702141448170.3326@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    /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;
as well as URLs for NNTP newsgroup(s).