From: Linus Torvalds <torvalds@transmeta.com>
To: Rik van Riel <riel@conectiva.com.br>
Cc: "Juan J. Quintela" <quintela@fi.udc.es>, linux-mm@kvack.org
Subject: Re: Estrange behaviour of pre9-1
Date: Tue, 16 May 2000 07:03:38 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.10.10005160653380.1398-100000@penguin.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0005152147490.20410-100000@duckman.distro.conectiva>
On Mon, 15 May 2000, Rik van Riel wrote:
> >
> > linus> Think of it as "this user can allocate a few pages, but it's on credit.
> > linus> They have to be paid back with the appropriate 'try_to_free_pages()'".
>
> I don't think this will help. Imagine a user firing up 'ls', that
> will need more than one page. Besides, the difference isn't that
> we have to free pages, but that we have to deal with a *LOT* of
> dirty pages at once, unexpectedly.
The reason it will help is that we can usethe "credit" to balance out the
spikes.
Think of how people use credit cards. They get paid once or twice a month,
andthen they have lots of money. But sometimes there's a big item like a
cruise in the caribbean, and that rum ended up being more expensive than
you thought.. Not to mention all those trinkets.
So what do you do? Do you pay it off immediately? Maybe you cannot afford
to, right then. You'll have to pay it off partially each month, but you
don't have to pay it all at once. And you have to pay interest.
This is a similar situation. We will have to pay interest (== free more
pages than we actually allocated), and we'll have to do it each month (==
call try_to_free_pages() on every allocation that happens while we have an
outstanding balance). But we don't have to pay it all back immediately (==
a single negative return from try_to_free_pages() does not kill us).
Right now "try_to_free_pages()" tries to always "pay back" something like
8 or 16 pages for each page we "borrowed". That's good. But let's face it,
we might be asked to pay back during a market slump when all the pages are
dirty, and while we have the "money", it's locked up right now. It would
be ok to pay off just one or two pages (== miniumum monthly payment), as
long as we pay back the rest later.
See?
Linus
--
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.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-05-16 14:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-15 22:56 Juan J. Quintela
2000-05-15 23:59 ` Linus Torvalds
2000-05-16 0:20 ` Juan J. Quintela
2000-05-16 0:34 ` Linus Torvalds
2000-05-16 0:54 ` Juan J. Quintela
2000-05-16 1:15 ` Rik van Riel
2000-05-16 13:53 ` Linus Torvalds
2000-05-16 14:20 ` Juan J. Quintela
2000-05-16 16:37 ` Roger Larsson
2000-05-16 0:55 ` Rik van Riel
2000-05-16 14:03 ` Linus Torvalds [this message]
2000-05-16 1:03 ` Rik van Riel
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.10.10005160653380.1398-100000@penguin.transmeta.com \
--to=torvalds@transmeta.com \
--cc=linux-mm@kvack.org \
--cc=quintela@fi.udc.es \
--cc=riel@conectiva.com.br \
/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