troubleshooting dragonfly after compiling kernel

YONETANI Tomokazu qhwt+dfly at les.ath.cx
Thu Sep 2 15:45:55 PDT 2010


On Fri, Sep 03, 2010 at 07:29:26AM +0900, YONETANI Tomokazu wrote:
> On Thu, Sep 02, 2010 at 06:27:57PM +0000, Pratyush Kshirsagar wrote:
> > diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
> > index a326037..4eb9026 100644
> > --- a/sys/vm/vm_map.c
> > +++ b/sys/vm/vm_map.c
> > @@ -3657,3 +3657,20 @@ DB_SHOW_COMMAND(procvm, procvm)
> >  }
> >  
> >  #endif /* DDB */
> > +
> > +long vmap_resident_count(vm_map_t v)
> > +{
> > +	vm_map_entry_t entry;
> > +	vm_map_object_t *mobj;
> > +	vm_object_t obj;
> > +	long pres = 0;
> > +	entry = &(v->header);
> > +	while(entry->next != NULL){
> > +		mobj = &entry->object;
> > +		if(mobj->vm_object != NULL) {
> > +			obj = mobj->vm_object;
> > +			pres = pres + (long) (obj->agg_pv_list_count / obj->resident_page_count);
> > +		}
> > +	}
> > +	return pres;
> > +}
> 
> The variable `entry' is not advanced in the loop, so it doesn't terminate
> until a new element is appended to the current one.

I mean, it doesn't terminate unless there's no next entry, or
until the next entry is removed all of a sudden.





More information about the Kernel mailing list