tech-kern archive

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

Re: ZFS vs NetBSD vnode recycling



On Tue, Oct 13, 2009 at 12:02:58PM +0200, Adam Hamsik wrote:
> 1) Defer calling of zfs_zinactive, to system taskq, which can later  
> destroy znode. I have tested this version and it works but I'm getting  
> deadlock. I need to investigate it, if it is caused by my change or not.

Can that cause temporary resource starvation if a lot of vnodes need to
be allocated and the taskq is not currently active?

> 2) Some sort of vreclaim patch(disable vnode recycling and just call  
> vnalloc in getnewvnode), which will be done right this time. I'm  
> willing to do it but I'm not sure how it should be done.

Do you propose to remove the global vnode table and associate vnodes
directly with the invidiual file-system? The BSD 4.4 book claims this
bad because you can end up having a lot of vnodes used by a file-system
that is currently idle.

> 3) Do it like FreeBSD does it. They do almost the same like we in 1.  
> But they do it differently.

Let me see if I understand this code:
1.) If it can get the locks it immediately reclaims the vnode.
2.) If it cannot get the lock it defers reclaiming the vnode to
    a taskq.

That sounds like a better approach than your first suggestion because
it will (hopefully) avoid the overhead and delay in most cases.

        Kind regards

-- 
Matthias Scheler                                  http://zhadum.org.uk/


Home | Main Index | Thread Index | Old Index