mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@bonn-fries.net>
To: Jan Harkes <jaharkes@cs.cmu.edu>, Rik van Riel <riel@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix page aging (2.4.9-ac12)
Date: Thu, 20 Sep 2001 15:32:26 +0200	[thread overview]
Message-ID: <20010920132504Z16271-2758+295@humbolt.nl.linux.org> (raw)
In-Reply-To: <Pine.LNX.4.33L.0109191454570.8191-100000@imladris.rielhome.conectiva> <20010919143958.A1466@cs.cmu.edu>
In-Reply-To: <20010919143958.A1466@cs.cmu.edu>

On September 19, 2001 08:40 pm, Jan Harkes wrote:
> On Wed, Sep 19, 2001 at 03:25:29PM -0300, Rik van Riel wrote:
> > No more mr. overcareful, obviously that doesn't work ;)
> 
> Finally ;)
> 
> >  static inline void age_page_down(struct page *page)
> >  {
> ...
> > +	unsigned long age = page->age;
> > +	if (age > 0)
> > +		age -= PAGE_AGE_DECL;
> > +	page->age = age;
> >  }
> 
> Perhaps the following would be better, just in case anyone sets
> PAGE_AGE_DECL to something other than 1.
> 
>     static inline void age_page_down(struct page *page)
>     {
> 	unsigned long age = page->age;
> 	if (age > PAGE_AGE_DECL)
> 		age -= PAGE_AGE_DECL;
> 	else
> 		age = 0;
> 	page->age = age;
>     }


     static inline void age_page_down(struct page *page)
     {
 	page->age = max((int) (age - PAGE_AGE_DECL), 0);
     }

;-)

--
Daniel

  parent reply	other threads:[~2001-09-20 13:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-19 18:25 Rik van Riel
2001-09-19 18:40 ` Jan Harkes
2001-09-19 18:44   ` Rik van Riel
2001-09-20 13:32   ` Daniel Phillips [this message]
2001-09-20 13:29     ` Rik van Riel
2001-09-20 13:31     ` Martin Josefsson

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=20010920132504Z16271-2758+295@humbolt.nl.linux.org \
    --to=phillips@bonn-fries.net \
    --cc=jaharkes@cs.cmu.edu \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®