Re: please revert bogus patch to vmscan.c

Paul Mackerras
2001-10-31T00:40:45Z

Andrea Arcangeli writes:

> On Tue, Oct 30, 2001 at 06:23:26PM +0100, Giuliano Pochini wrote:
> >
> > >> #ifdef ?
> > >
> > > yes, but not for ppc, for alpha and all other archs without accessed bit
> > > provided in hardware (and cached in the tlb).
> >
> > PPCs have that bits. I'm not sure if they are cached in the tbl.
>
> yes, this is why it won't need to define the HAVE_NO_ACCESS_BIT_IN_TLB,
> only alpha will. but again I'm not sure if it worth given we just
> reduced the flush frequency of an order of magnitude.

I don't think it has to do with whether the accessed bit is maintained
by hardware or by software. On PPC, we actually maintain the accessed
and dirty bits in software - we don't use the hardware-maintained
R (referenced) and C (changed) bits, because they are in the HPTEs
(the PTEs in the hash table), and it is hard to get back from a linux
pte value to the corresponding HPTE. The performance impact of
maintaining the accessed and dirty bits in software is negligible
according to the benchmarks I have done, and it is much much simpler
than trying to use the hardware R and C bits.

Paul.