linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Ray Bryant <raybry@sgi.com>
Cc: Con Kolivas <kernel@kolivas.org>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	riel@redhat.com, piggin@cyberone.com.au, mbligh@aracnet.com
Subject: Re: swapping and the value of /proc/sys/vm/swappiness
Date: Wed, 8 Sep 2004 16:30:36 -0300	[thread overview]
Message-ID: <20040908193036.GH4284@logos.cnet> (raw)
In-Reply-To: <413F5EE7.6050705@sgi.com>

On Wed, Sep 08, 2004 at 02:35:03PM -0500, Ray Bryant wrote:
> 
> 
> Marcelo Tosatti wrote:
> 
> >
> >
> >Huh, that changes the meaning of the dirty limits. Dont think its suitable
> >for mainline.
> >
> >
> 
> The change is, in fact, not much different from what is already actually 
> there.  The code in get_dirty_limits() adjusts the value of the user 
> supplied parameters in /proc/sys/vm depending on how much mapped memory 
> there is.  If you undo the convoluted arithmetic that is in there, one 
> finds that if you are using the default dirty_ratio of 40%, then if the 
> unmapped_ratio is between 80% and 10%, then
> 
>    dirty_ratio = unmapped_ratio / 2;
> 
> and, a little bit of algebra later:
> 
>    dirty = (total_pages - wbs->nr_mapped)/2
> 
> and
> 
>    background = dirty_background_ratio/vm_background_ratio * (total_pages
> 	- wbs->nr_mapped)
> 
> That is, for a wide range of memory usage, you are really running with an
> dirty ratio of 50% stated in terms of the number of unmapped pages, and 
> there is no direct way to override this.

OK I see, yes. 

> Of course, at the edges, the code changes these calculations.  It just 
> seems to me that rather than continue the convoluted calculation that is in
> get_dirty_limits(), we just make the outcome more explicit and tell the user
> what is really going on.
> 
> We'd still have to figure out how to encourage a minimum page cache size of
> some kind, which is what I understand the 5% min value for dirty_ratio is 
> in there for.
 
For the user "dirty_ratio" and "dirty_background_ratio" means "percentage
of total memory" (thats how it has been traditionally in Linux). And right now,
 as you noted, we dont do that way.

There's probably a good reason for the "no more than half of unmapped memory".
Andrew ?
--
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:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2004-09-08 19:30 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-06 19:11 Ray Bryant
2004-09-06 20:10 ` Andrew Morton
2004-09-06 21:22   ` Ray Bryant
2004-09-06 21:36     ` Andrew Morton
2004-09-06 22:37     ` William Lee Irwin III
2004-09-06 23:51       ` Nick Piggin
2004-09-07  0:31         ` Ray Bryant
2004-09-06 22:48 ` William Lee Irwin III
2004-09-06 23:09 ` Con Kolivas
2004-09-06 23:27   ` Andrew Morton
2004-09-06 23:34     ` Con Kolivas
2004-09-07  0:03       ` Marcelo Tosatti
2004-09-07  1:34         ` Con Kolivas
2004-09-07 10:38         ` Nick Piggin
2004-09-07 10:56           ` Con Kolivas
2004-09-08 16:45             ` Marcelo Tosatti
2004-09-09  1:12               ` Con Kolivas
2004-09-07 17:03           ` Ray Bryant
2004-09-07 21:20         ` Marcelo Tosatti
2004-09-08  2:18           ` Marcelo Tosatti
2004-09-08 14:20           ` Ray Bryant
2004-09-08 16:54             ` Marcelo Tosatti
2004-09-08 19:35               ` Ray Bryant
2004-09-08 19:30                 ` Marcelo Tosatti [this message]
2004-09-09  3:06                   ` Ray Bryant
2004-09-09  2:14                     ` Marcelo Tosatti
2004-09-09 14:21                       ` Ray Bryant
2004-09-09  3:09                     ` William Lee Irwin III
2004-09-09 14:16                       ` Ray Bryant
2004-09-09 17:23                         ` William Lee Irwin III
2004-09-28  1:54                       ` Ray Bryant
2004-09-28  3:36                         ` Nick Piggin
2004-09-29  0:36                           ` Nick Piggin
2004-09-29  4:23                             ` Ray Bryant
2004-09-30 17:15                             ` Ray Bryant
2004-09-08 17:31             ` Martin J. Bligh
2004-09-08 18:04               ` Rik van Riel
2004-09-08 19:50                 ` Diego Calleja
2004-09-08 21:10                   ` Martin J. Bligh
2004-09-08 21:55                     ` Diego Calleja
2004-09-08 22:20                       ` Martin J. Bligh
2004-09-08 23:22                         ` Rik van Riel
2004-09-08 22:28                     ` Alan Cox
2004-09-08 23:42                       ` Martin J. Bligh
2004-09-08 19:54               ` Ray Bryant
2004-09-08 15:19           ` Ray Bryant

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=20040908193036.GH4284@logos.cnet \
    --to=marcelo.tosatti@cyclades.com \
    --cc=akpm@osdl.org \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@aracnet.com \
    --cc=piggin@cyberone.com.au \
    --cc=raybry@sgi.com \
    --cc=riel@redhat.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