From owner-freebsd-current@freebsd.org Fri Nov 25 13:57:31 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95C99C54289 for ; Fri, 25 Nov 2016 13:57:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D1BC31B; Fri, 25 Nov 2016 13:57:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id uAPDvPNU060868 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 25 Nov 2016 15:57:26 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua uAPDvPNU060868 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id uAPDvP1w060867; Fri, 25 Nov 2016 15:57:25 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 25 Nov 2016 15:57:25 +0200 From: Konstantin Belousov To: Rick Macklem Cc: Alan Somers , FreeBSD CURRENT Subject: Re: NFSv4 performance degradation with 12.0-CURRENT client Message-ID: <20161125135725.GD54029@kib.kiev.ua> References: <20161124090811.GO54029@kib.kiev.ua> <20161125084106.GX54029@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 13:57:31 -0000 On Fri, Nov 25, 2016 at 12:54:07PM +0000, Rick Macklem wrote: > Well, ideally theer would be a VOP_MMAPDONE() or something like that, which > would tell the NFSv4 client that I/O is done on the vnode so it can close it. > If there was some way for the NFSv4 VOP_CLOSE() to be able to tell if the file > has been mmap'd, that would help since it could close the ones that are not > mmap'd on the last descriptor close. > (A counter wouldn't be as useful, since NFSv4 would have to keep checking it to > see if it can do the close yet, but it might still be doable.) I thought that the issue was in tracking any opens and mmaps, but from this 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().