Re: [PATCH 6/9] clockpro-clockpro.patch

IWAMOTO Toshihiro
2006-02-09T07:22:40Z

At Wed, 08 Feb 2006 21:00:10 +0100,
Peter Zijlstra wrote:
>
> On Wed, 2006-02-08 at 19:05 +0900, IWAMOTO Toshihiro wrote:
> > I've noticed the way page_replace_reinsert puts pages to a list is
> > different from what the paper (TR-05-3.pdf) says.
>
> I reread the paper, and you seem to have found a detail I had not
> noticed before. Thanks!
>
> It concerns section 4.3 paragraph 2 and the use of list head as defined
> in section 4.2 paragraph 2.
>
> The way I read it is that pages that have their reference bit set are
> moved to the list head, which according to 4.2.2 is the page right in
> front of hand hot (which would correspond to the tail of the HAND_HOT
> list).
>
> So I agree the current code is wrong. However I read it differently.
>
> In your patch you move all Hot pages to the head of the hot list, which
> effectively leaves them in place. The other pages are moved to the head
> of the cold list, which is right behind hand hot.
>
> So I don't see your condition nor the placement. Could you explain your
> reasoning?

My patch should be okay for pages which are already hot when Hcold
passes, but I found that the paper says pages which are turned hot by
Hcold should be placed at the list head, which requires a page flag to
implement. I think the PG_test bit could be abused for this purpose.

> > I wonder if this divergence is intended or not, but the attached patch
> > gave a major improvement.

The paper doesn't have cold to cold test page state transition,
although Song said otherwise in the mailing list. I thought this
reinsert behavior is a part of the divergence.

--
IWAMOTO Toshihiro