Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jun 2019 11:28:20 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Alan Somers <asomers@FreeBSD.org>, "Rodney W. Grimes" <rgrimes@FreeBSD.org>, src-committers <src-committers@FreeBSD.org>, svn-src-all <svn-src-all@FreeBSD.org>, svn-src-head <svn-src-head@FreeBSD.org>
Subject:   Re: svn commit: r348737 - head/sys/kern
Message-ID:  <201906061828.x56ISKJI059207@gndrsh.dnsmgr.net>
In-Reply-To: <c6d9a869-d678-212b-0bc6-d0046f892e76@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
[ Charset UTF-8 unsupported, converting... ]
> On 6/6/19 10:39 AM, Alan Somers wrote:
> > On Thu, Jun 6, 2019 at 11:35 AM Rodney W. Grimes
> > <freebsd@gndrsh.dnsmgr.net> wrote:
> >>
> >>> Author: asomers
> >>> Date: Thu Jun  6 15:04:50 2019
> >>> New Revision: 348737
> >>> URL: https://svnweb.freebsd.org/changeset/base/348737
> >>>
> >>> Log:
> >>>   Add a testing facility to manually reclaim a vnode
> >>>
> >>>   Add the debug.try_reclaim_vnode sysctl. When a pathname is written to it, it
> >>>   will be reclaimed, as long as it isn't already or doomed. The purpose is to
> >>>   gain test coverage for vnode reclamation, which is otherwise hard to
> >>>   achieve.
> >>>
> >>>   Add the debug.ftry_reclaim_vnode sysctl.  It does the same thing, except
> >>>   that its argument is a file descriptor instead of a pathname.
> >>
> >> Should not this all be wrapped in some #ifdef or other protection,
> >> is it really a good idea to have this on every single box running
> >> FreeBSD?
> > 
> > I initially thought so too, but kib thought that it could be useful
> > for debugging problems in the field.  The potential downside is
> > limited, because only root can write to the sysctls, and the
> > worse-case damage is similar to a "umount -f".
> 
> A compromise might be to stick this in a kernel module instead of in the
> base kernel.  You could still kldload it in the field for debugging but
> not necessarily have it directly available out of the box.

Oh, yes, I like this solution, then avaliable on demand at anytime
to anyone, but not present by default.

> John Baldwin
-- 
Rod Grimes                                                 rgrimes@freebsd.org



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