Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Dec 2020 05:46:32 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        J David <j.david.lists@gmail.com>, "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   Re: Major issues with nfsv4
Message-ID:  <X9Q9GAhNHbXGbKy7@kib.kiev.ua>
In-Reply-To: <YQXPR0101MB0968B17010B3B36C8C41FDE1DDC90@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
References:  <CABXB=RRB2nUk0pPDisBQPdicUA3ooHpg8QvBwjG_nFU4cHvCYw@mail.gmail.com> <YQXPR0101MB096849ADF24051F7479E565CDDCA0@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <CABXB=RSyN%2Bo2yXcpmYw8sCSUUDhN-w28Vu9v_cCWa-2=pLZmHg@mail.gmail.com> <YQXPR0101MB09680D155B6D685442B5E25EDDCA0@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <CABXB=RSSE=yOwgOXsnbEYPqiWk5K5NfzLY=D%2BN9mXdVn%2B--qLQ@mail.gmail.com> <YQXPR0101MB0968B17010B3B36C8C41FDE1DDC90@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 12, 2020 at 03:40:55AM +0000, Rick Macklem wrote:
> J David wrote:
> >On Fri, Dec 11, 2020 at 6:28 PM Rick Macklem <rmacklem@uoguelph.ca> wrote:
> >> I am afraid I know nothing about nullfs and jails. I suspect it will be
> >> something related to when file descriptors in the NFS client mount
> >> get closed.
> >
> >What does NFSv4 do differently than NFSv3 that might upset a low-level
> >consumer like nullfs?
> The opens for one. When a file is opened it finds its way to VOP_OPEN().
> --> For NFSv3 all it does is some client side cache consistency checks.
> --> For NFSv4, it must acquire or update a NFSv4 Open, which is a form
>        of lock that is acquired/updated by an Open operation in an RPC.
>        Then the client stores this locking info in a structure in a linked list
>         off of the mount point.
>        Once all file descriptors for the vnode are closed, then, and only
>        then can a Close operation be done against the server and the linked
>        list data structure be free'd.
>        --> Does having nullfs between the file descriptors and the NFS vnodes
>               for the same file affect when the v_usecount decrements to 0 on
>               the NFS vnode?
>               I don't know. but if it delays it, then these linked list structures
>               will not be free'd as soon and might accumulate.
>               --> The more structures the longer the linked list and the more
>                      overhead/cpu will be used prcessing them.
>        The fact that processes are spending a long time in exit() might
>        be a hint that there are a large # of these NFSv4 Opens to deal with
>        when files are being closed implicitly during exit.
> 
>        As I mentioned, "nfsstat -c -E" will tell you how many Opens there
>        are under the "OpenOwners ..." line.
Nullfs vnodes keep a reference on the lower vnode.  When nullfs vnode
caching is enabled, nullfs vnodes survive after a vfs syscall is finished.

NFSv4 mount automatically sets flag MNTK_NULL_NOCACHE that disables nullfs
vnode cache.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?X9Q9GAhNHbXGbKy7>