Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/uvm



On Tue, Dec 24, 2019 at 03:22:54AM +0000, Taylor R Campbell wrote:

> > Module Name:    src
> > Committed By:   ad
> > Date:           Sat Dec 21 14:41:44 UTC 2019
> > 
> > - Add inlines to set/get locator values in the unused lower bits of
> >   pg->phys_addr.  Begin by using it to cache the freelist index, because
> >   computing it is expensive and that shows up during profiling.  Discussed
> >   on tech-kern.
> 
> So I guess we won't be switching pg->phys_addr from paddr to pfn?
> Speaking of which, any plans for expanding to >32-bit (or >31-bit, if
> signed) pfns in the rest of uvm?

That's not part of my current plans for UVM, which right now extend only as
far as breaking the back of the performance problems with builds.  31 bit
pfns get us into the terabyte range I think.  I have a couple of thoughts
here, firstly SVR4 or Solaris has a pfn_t and pgcnt_t or something like that
and it would would be nice to have an analogue.  Kind of surprised we didn't
inherit something like that from Mach.  Secondly in the comments above those
functions:

 * None of this is set in stone; it can be adjusted as needed.

What I have put in there is only a means to an end, to get some extra fields
without putting too much pressure on old systems with small memory.

> Can you use __BITS/__SHIFTIN/__SHIFTOUT for this instead of magic hex
> masks?

Good suggestion, I'll make that change.

Cheers,
Andrew


Home | Main Index | Thread Index | Old Index