From: Steven Walter <srwalter@yahoo.com>
To: Daniel Phillips <phillips@bonn-fries.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Addendum to Daniel Phillips [RFC] use-once patch
Date: Fri, 27 Jul 2001 21:14:59 -0500 [thread overview]
Message-ID: <20010727211459.A13603@hapablap.dyn.dhs.org> (raw)
In-Reply-To: <Pine.SV4.4.21.0107271524310.4696-100000@wipro.wipsys.sequent.com> <0107271638180F.00285@starship>
In-Reply-To: <0107271638180F.00285@starship>; from phillips@bonn-fries.net on Fri, Jul 27, 2001 at 04:38:18PM +0200
On Fri, Jul 27, 2001 at 04:38:18PM +0200, Daniel Phillips wrote:
> > may be
> > + * it is the best candidate for swapping.
> > + */
> > + if ((page->age > PAGE_AGE_MAX) && (page_count(page)
> > <= 1)) {
> > + page->age = PAGE_AGE_START;
> > + } else {
> > + page->age += PAGE_AGE_ADV;
> > + if (page->age > PAGE_AGE_MAX) {
> > + page->age = PAGE_AGE_MAX;
> > + }
> > + return;
> > + }
>
> I noticed your good benchmark results below, but I'm having some
> trouble understanding how this works. How can page->age ever become
> greater than PAGE_AGE_MAX? Also, I don't see any reference to
> PAGE_MAX_USE. Comments?
What if page->age is equal to PAGE_AGE_MAX when it hits the 'else'
statement. It will be unconditionally incremented by PAGE_AGE_ADV, and
then it will be greater than PAGE_AGE_MAX. The inner 'if' statement
catches this, and sets the age back to PAGE_AGE_MAX
--
-Steven
In a time of universal deceit, telling the truth is a revolutionary act.
-- George Orwell
prev parent reply other threads:[~2001-07-28 2:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-27 9:57 Addendum to Daniel Phillips [RFC] use-once patch Balbir Singh
2001-07-27 14:38 ` Daniel Phillips
2001-07-27 14:49 ` Balbir Singh
2001-07-28 2:14 ` Steven Walter [this message]
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=20010727211459.A13603@hapablap.dyn.dhs.org \
--to=srwalter@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=phillips@bonn-fries.net \
/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