l4-hurd@gnu.org
[Top] [All Lists]

Re: self-paging

Subject: Re: self-paging
From: "Jonathan S. Shapiro"
Date: Sat, 10 Dec 2005 15:30:00 -0500
On Sat, 2005-12-10 at 11:46 +0100, Emmanuel Colbus wrote:
> >>I meant : why does the kernel needs to collect the data *anyway*, that is,
> >>even if we don't use any kind of LRU. Clearly, if this data has to be 
> >>collected,
> >>only the kernel can do it.
> >>    
> >>
> >
> >Because if it doesn't, it cannot tell which pages are active.
> >
> What do you mean, an active page? A page which is actively used? I
> though the kernel should not care about that, except for LRU-like memory 
> management. A page which is used by an application? Well, for this 
> purpose, the kernel just needs to recall which pages he hasn't given to 
> anybody, doesn't he?

In order to support checkpoint, the kernel needs to track dirty pages in
any case. Once you are doing this, the marginal effort required to
determine which pages are recently used is essentially zero.

> >>> Well, if the keeper doesn't know the order of page arrival, how
> >>> does it decide what to throw out? Suppose we wanted to implement
> >>> LRU in the keeper, for example. How does it know?
> >>>      
> >>>
> >>It uses the "accessed" bit in the page table entry : if it is 0, the page
> >>hasn't been accessed since the last time the keeper set it to 0, so its
> >>new age is "previous age + 1 keeper cycle time"; if it is 1, its new age
> >>is 0. At page arrival, "previous age" is set to 0 (or was set to 0 for 
> >>long,
> >>because it is also the value for unused pages); but the keeper can't
> >>differentiate such a page from a recently accessed one.
> >>    
> >>
> >
> >The keeper is not in the kernel. It does not have the ability to examine
> >the hardware page table state.
> >  
> >
> 
> Oh, it's not in the kernel... That's more difficult (for me! :-) ). But
> I continue to think that, to implement a LRU, the keeper needs to know 
> the age of last use of the pages, but not their order of arrival. He may 
> just need to be notified when some new pages are coming (but maybe it 
> was the point you were refering to?).

So how do you propose that it learn the age of the page? What interface
do you have in mind?

shap



_______________________________________________
L4-hurd mailing list
L4-hurd@xxxxxxx
http://lists.gnu.org/mailman/listinfo/l4-hurd

<Prev in Thread] Current Thread [Next in Thread>