> On 25. May 2020, at 00:53, Andrew Doran <a...@netbsd.org> wrote:
> 
> On Sat, Apr 04, 2020 at 09:33:26PM +0000, Andrew Doran wrote:
> 
>> This change makes vcache_tryvget() do its work by means of a single atomic
>> operation, which removes the need to take v_interlock beforehand.
> 
> I re-did this one more elegantly.  Assuming no problems I plan to commit
> some time this week.
> 
>       http://www.netbsd.org/~ad/2020/vget.diff
> 
> The basic idea: have a "gate" bit in v_usecount that's only set when the
> vnode is LOADED.  vcache_tryvget() needs to see this otherwise it fails and
> we go down the slow path instead.  The state transition for reclaiming is
> then:
> 
>       ...
>       LOADED
>       -> BLOCKED
>       confirm that caller still holds the last vnode reference
>       -> RECLAIMING
>       ...

Looks good to me -- please go ahead ...

--
J. Hannken-Illjes - hann...@eis.cs.tu-bs.de - TU Braunschweig (Germany)

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to