Source-Changes-D archive

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

Re: CVS commit: src/sys/uvm



yamt%mwd.biglobe.ne.jp@localhost (YAMAMOTO Takashi) wrote:
> >> > Log Message:
> >> > amap_copy(): Keep the source amap locked until its lock has been
> >> > copied.
> >> 
> >> btw, this code seems to assume that uvm_anfree does not release the
> >> lock even temporarily while the comment on uvm_anfree1 says the
> >> opposite.
> > 
> > http://www.netbsd.org/~rmind/uvm_anon_freelst.diff
> > 
> > Looks good?
> 
> i don't understand what it solves.  can you explain a little?

Here is the updated patch after your changes:

http://www.netbsd.org/~rmind/uvm_anon_freelst2.diff

As you noted, uvm_anfree() can temporarily release the amap lock - that can
happen in amap_copy().  Patch closes the race by moving uvm_anfree() further,
and changes the semantics of the function, now called uvm_anon_freelst(), to
return with amap lock released (plus free anons without lock held).

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index