Date: Sat, 26 Nov 2016 23:19:19 +0000 From: Rick Macklem <rmacklem@uoguelph.ca> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Alan Somers <asomers@freebsd.org>, FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: NFSv4 performance degradation with 12.0-CURRENT client Message-ID: <YQBPR01MB0180676AF7B593C2348D868DDD880@YQBPR01MB0180.CANPRD01.PROD.OUTLOOK.COM> In-Reply-To: <20161125135725.GD54029@kib.kiev.ua> References: <CAOtMX2jJ2XoQyVG1c04QL7NTJn1pg38s=XEgecE38ea0QoFAOw@mail.gmail.com> <20161124090811.GO54029@kib.kiev.ua> <YTXPR01MB0189E0B1DB5B16EE6B388B7DDDB60@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM> <CAOtMX2hBXAJN_udED-u5%2B6UznR2%2BW88xgb=RqKSZL65Z3%2BcKOw@mail.gmail.com> <YTXPR01MB0189C3E11821E4F7B7DF1814DDB60@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM> <20161125084106.GX54029@kib.kiev.ua> <YTXPR01MB018969FB21212700C4043AEADD890@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM>, <20161125135725.GD54029@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Konstantin Belousov wrote: [stuff snipped] >I thought that the issue was in tracking any opens and mmaps, but from thi= s >reply it is not that clear. Do you need callback when all opens and mmaps >have ended, or only opens and mmaps for write ? If later, we already have >a suitable mechanism VOP_ADD_WRITECOUNT(). Not quite. The NFSv4 client needs to Close the NFSv4 Open after all I/O on the file has been done. This applies to both reads and writes. Since mmap'd files can generate I/O after the VOP_CLOSE(), the NFSv4 client can't do the NFSv4 Close in VOP_CLOSE(). Since it can't do it then, it waits until VOP_INACTIVE() to do the NFSv4 Cl= ose. This might be improved by: - A flag that indicates that an open file descriptor has been mmap()d, whic= h VOP_CLOSE() could check to decide if it can do the NFSv4 Close. (ie. It could do the NFSv4 Close if the file descriptor hasn't been mmap(= )d.) - If the system knows when mmap()d I/O is done (the process has terminated?= ), it could do a VOP_MMAP_IO_DONE() and the NFSv4 client would do the NFSv4 = Close in it. --> I don't know if this is feasible and I suspect if it could be done, t= hat it would usually happen just before VOP_INACTIVE(). { This case of nullfs ca= ching was an exception, I think? } Does this clarify it? rick
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YQBPR01MB0180676AF7B593C2348D868DDD880>