From owner-freebsd-hackers@freebsd.org Sat Mar 16 11:59:58 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30C431527ED8 for ; Sat, 16 Mar 2019 11:59:58 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A859856B8; Sat, 16 Mar 2019 11:59:57 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x2GBxjjx019025 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 16 Mar 2019 13:59:48 +0200 (EET) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x2GBxjjx019025 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x2GBxjOC019024; Sat, 16 Mar 2019 13:59:45 +0200 (EET) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Sat, 16 Mar 2019 13:59:45 +0200 From: Konstantin Belousov To: Rozhuk Ivan Cc: Alan Somers , FreeBSD Hackers Subject: Re: VOP_INACTIVE(9): reclaiming space for open but deleted files? Message-ID: <20190316115945.GE96870@kib.kiev.ua> References: <20190315151920.GC96870@kib.kiev.ua> <20190316035507.02f75436@rimwks> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190316035507.02f75436@rimwks> User-Agent: Mutt/1.11.3 (2019-02-01) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2019 11:59:58 -0000 On Sat, Mar 16, 2019 at 03:55:07AM +0300, Rozhuk Ivan wrote: > On Fri, 15 Mar 2019 17:19:20 +0200 > Konstantin Belousov wrote: > > > On Fri, Mar 15, 2019 at 08:44:57AM -0600, Alan Somers wrote: > > > VOP_INACTIVE(9) says that the vop can "be used to reclaim space for > > > ‘open but deleted’ files". What does that mean? How can you > > > reclaim space for open files? I assume it's just a mistake, but I > > > want to check before I fix the man page. SVN archaeology shows > > > that the line has been present since a mass import of man pages in > > > 1997. > > > > VOP_INACTIVE() call means that the last use count for the vnode is > > dereferenced. This can only happen when there is no more open files > > using the vnode. > > > > I was seen another use case: app allocate file to 10gb, Another case of what ? > mmap() 4mb, write(), unmap()...many times. 10gb writed. close(). > And FreeBSD keep all 10g ram as incative/wired, and dot not allow use it. > Untill file readed or deleted. > That was on 10x, without swap. So what is the problem ?