From: "Stephen C. Tweedie" <sct@redhat.com>
To: Andrea Arcangeli <andrea@e-mind.com>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
linux-kernel@vger.rutgers.edu, linux-mm@kvack.org,
Rik van Riel <H.H.vanRiel@phys.uu.nl>,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: 2.1.130 mem usage.
Date: Fri, 11 Dec 1998 14:05:30 GMT [thread overview]
Message-ID: <199812111405.OAA02292@dax.scot.redhat.com> (raw)
In-Reply-To: <Pine.LNX.3.96.981210235427.309E-100000@laser.bogus>
Hi,
On Fri, 11 Dec 1998 01:38:47 +0100 (CET), Andrea Arcangeli
<andrea@e-mind.com> said:
>>>> + if (atomic_read(&page->count) != 1 ||
>>>> + (!page->inode && !page->buffers))
>>>> count_min--;
> My idea is that your patch works well due subtle reason. The effect of the
> patch is that we try on a few freeable pages so we remove only a few
> refernce bits and so we don' t throw away aging (just the opposite you
> wrote in the comment :). The reason it works is that there are many more
> not freeable pages than orphaned not-used ones.
> So basically it' s the same of setting count_min to 100 200 (instead of
> 10000/20000) pages and decrease count_min when we don' t decrease it with
> your patch.
No, no, not at all. The whole point is that this patch does indeed
behave as you describe if the cache is small or moderately sized, but
if you have something like a "cat /usr/bin/* > /dev/null" going on,
the large fraction of cached but referenced pages will cause the new
code to become more aggressive in its scanning (because the pages
which contribute to the loop exit condition become more dilute). This
is exactly what you want for self-balancing behaviour.
> For the s/free_page_and_swap_cache/free_page/ I agree with it completly. I
> only want to be sure that other mm parts are well balanced with the
> change.
Please try 2.1.131-ac8, then, as it not only includes the patches
we're talking about here, but it also adds Rik's swap readahead stuff
extended to do aligned block readahead for both swap and normal mmap
paging.
> It would also be nice to not have two separate mm cycles (one that
> grow the cache until borrow percentage and the other one that shrink
> and that reach very near the limit of the working set). We should
> have always the same level of cache in the system if the mm stress
> is constant. This could be easily done by a state++ inside
> do_try_to_free_pages() after some (how many??) susccesfully returns.
I'm seeing a pretty stable cache behaviour here, on everything from
4MB to 64MB systems.
--Stephen
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org
next prev parent reply other threads:[~1998-12-11 14:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <199812021749.RAA04575@dax.scot.redhat.com>
1998-12-11 0:38 ` 2.1.130 mem usage Andrea Arcangeli
1998-12-11 14:05 ` Stephen C. Tweedie [this message]
1998-12-11 18:08 ` Andrea Arcangeli
1998-12-12 15:14 ` Andrea Arcangeli
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=199812111405.OAA02292@dax.scot.redhat.com \
--to=sct@redhat.com \
--cc=H.H.vanRiel@phys.uu.nl \
--cc=andrea@e-mind.com \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=torvalds@transmeta.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