linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Roger Larsson <roger.larsson@norran.net>
To: Min San Co <mc343@hotmail.com>, linux-mm@kvack.org
Subject: Re: questions about LRU
Date: Sat, 18 Nov 2000 00:13:29 +0100	[thread overview]
Message-ID: <00111800132900.01321@dox> (raw)
In-Reply-To: <LAW-F137bdkSmLAztxc000006da@hotmail.com>

On Saturday 18 November 2000 00:02, Min San Co wrote:
> Hi!
>
> I am trying to implement the LRU page replacement scheme (Least-Recently
> Used).  My idea is to what create a queue that contains pointers to every
> page held by every process in the system.  This queue should be sorted to
> reflect the most recently used pages, which should be at the front.  I am
> thinking of manipulating this list on every timer interrupt (ie 10 msec).

pages are already placed in a ring using the page struct field lru(!)

> After every interrupt, the ordering of pages on the queue will be updated
> based on what pages have been accessed since the last timer interrupt.  I
> am thinking of using the reference bit to determine which page has been
> accessed since the last timer interrupt.  The pages that have been recently
> used will be moved to the front of the queue.

This will not scale - think about 64GB machines... You would need to scan all
pages every timer interrupt...

>
> Any ideas on where to put the queue?
>
Use the existing queues - like active_list (introduced in 2.4.0-test9)
It is scanned but slower than you suggest...

> Cheers!
>
> Max C.
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
> --
> 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/

-- 
--
Home page:
  http://www.norran.net/nra02596/
--
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/

      reply	other threads:[~2000-11-17 23:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-17 23:02 Min San Co
2000-11-17 23:13 ` Roger Larsson [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=00111800132900.01321@dox \
    --to=roger.larsson@norran.net \
    --cc=linux-mm@kvack.org \
    --cc=mc343@hotmail.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