svn commit: r298580 - in head/sys/riscv: include riscv

Ruslan Bukin ruslan.bukin at cl.cam.ac.uk
Tue Apr 26 14:40:14 UTC 2016


On Mon, Apr 25, 2016 at 06:50:44PM +0300, Konstantin Belousov wrote:
> On Mon, Apr 25, 2016 at 02:47:51PM +0000, Ruslan Bukin wrote:
> > +/* An entry in the list of all pmaps */
> > +struct pmap_list_entry {
> > +	SLIST_ENTRY(pmap_list_entry) pmap_link;
> > +	struct pmap *pmap;
> > +};
> 
> This is weird. Why do you need separate structure to track the all
> pmaps list, instead of embedding the list link into pmap itself ? In
> particular, the pmap_list_entry.pmap pointing to the pmap looks strange.
> 
> And why do you use single-linked list for the container where you need
> to remove elements ?  The cost is the iteration over the whole container
> on removal, vs. additional pointer in each pmap.
> 

Many thanks. I have committed the fix (same way as i386 do).

Ruslan


More information about the svn-src-all mailing list