tech-kern archive

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

Re: physical address space management



On Fri, Mar 28, 2008 at 04:03:29PM -0500, David Young wrote:
 > enum pmem_type {
 >      , PMEM_T_RAM            = 0x01
 >      , PMEM_T_ROM            = 0x02
 >      , PMEM_T_PCI            = 0x04
 > };

Should the last be PMEM_T_PCI or something like PMEM_T_BUS?

Also, I don't see any obvious way to specify how NUMA address regions
map to cpus, which is surely something you'd want to be able to reason
about. (Or alternatively, if you assume each processor already knows
which arena is its own RAM, you might want to be able to allocate
following interconnections... or something like that. I'm not sure
what'll really be wanted, but *something* will be.)

You might also reasonably want to be able to allocate/find regions
that do *not* have certain properties, particularly BROKEN but also
perhaps ROM or PROT_EXEC. Unfortunately, this would double the length
of the calling sequence.

I'm also wondering if all these enums should be folded together into
one set of property flags, partly because of the preceding but also
because it'll be all too easy to mix the different types of flags
together and end up with problems.

 > void pmem_incref(pmem_region_t r);
 > void pmem_decref(pmem_region_t r);

:-)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index