On Mon, Feb 17, 2014 at 05:02:34PM +0800, Kieran Devlin wrote: > Probably get a better response if you explained what this diff does and/or fixes...
-ml > Index: uvm/uvm_pmemrange.c > =================================================================== > RCS file: /cvs/src/sys/uvm/uvm_pmemrange.c,v > retrieving revision 1.37 > diff -p -u -r1.37 uvm_pmemrange.c > --- uvm/uvm_pmemrange.c 6 Feb 2014 16:40:40 -0000 1.37 > +++ uvm/uvm_pmemrange.c 13 Feb 2014 22:28:29 -0000 > @@ -1647,7 +1647,7 @@ uvm_pmr_rootupdate(struct uvm_pmemrange > * Cache the lower page, so we can page-walk later. > */ > low = root; > - low_next = RB_RIGHT(low, objt); > + low_next = RB_LEFT(low, objt); > while (low_next != NULL && PMR_INTERSECTS_WITH( > atop(VM_PAGE_TO_PHYS(low_next)), > atop(VM_PAGE_TO_PHYS(low_next)) + low_next->fpgsz, > @@ -1655,8 +1655,11 @@ uvm_pmr_rootupdate(struct uvm_pmemrange > low = low_next; > if (uvm_pmr_pg_to_memtype(low) == memtype) > return low; > - low_next = RB_RIGHT(low, objt); > + low_next = RB_LEFT(low, objt); > } > + > + if (low == high) > + return NULL; > > /* > * Ack, no hits. Walk the address tree until to find something usable. >