From owner-svn-src-all@freebsd.org Thu Jun 6 18:05:06 2019 Return-Path: Delivered-To: svn-src-all@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 3354015BB4A7; Thu, 6 Jun 2019 18:05:06 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A925080558; Thu, 6 Jun 2019 18:05:05 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-f194.google.com with SMTP id m15so2894869ljg.13; Thu, 06 Jun 2019 11:05:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qNUUyCnd1So/6UxEWlM97/ku+fqnwAqOgS0O28JNK0E=; b=EUGmbh8kM8oakc2212QbXh70o4ajQA3JMGMOMDBxPKB9yL/jKSFfY+f6xzUnmWxY0w SSvewEpzSeb10h20SUEsCDQ56t3dn/7jE/qNU4k21VnwR4PV2BOqW/kCAbxY2iO1cAwD w1AknyZFTZYD1yQIuBXxxyWhOlgIVKeOmOG2w7WbZh051tebtI/y/rOk6lmfcBgtV2oN su1/U0Z6cuksdfQFMicyDC555cJ+VGTpbMokHuaplN00Ngk+Dr2MHNugh7BobWOTPi7V rPHQ02jocDx9SovrkIPnhns/qUz8cUIknsYQVIf6gUfouUAw6P1hpfxKJBlALYoNo0kM ZTHw== X-Gm-Message-State: APjAAAUw6OcPV45aNj+VNIvDG5H0JMSM7HieQ1leiaxO8YFhs4ejNsjo XDQxIBiZVFQMNZywLQ3A/ylArUj4odfFR6FI6XbhF5d8d24= X-Google-Smtp-Source: APXvYqweFGkfvAgjbYtckUfBxK5M4XoQTyqhWBePy5JZmDkOJAh7TxlP/06QiTLsRdV3tiJ6BRyVpPh/Z6X5vIdEKnE= X-Received: by 2002:a2e:635d:: with SMTP id x90mr15849758ljb.140.1559844303655; Thu, 06 Jun 2019 11:05:03 -0700 (PDT) MIME-Version: 1.0 References: <201906061504.x56F4odw034764@repo.freebsd.org> <201906061735.x56HZGIJ058845@gndrsh.dnsmgr.net> In-Reply-To: From: Alan Somers Date: Thu, 6 Jun 2019 12:04:52 -0600 Message-ID: Subject: Re: svn commit: r348737 - head/sys/kern To: John Baldwin Cc: "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: A925080558 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.989,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jun 2019 18:05:06 -0000 On Thu, Jun 6, 2019 at 12:01 PM John Baldwin wrote: > > On 6/6/19 10:39 AM, Alan Somers wrote: > > On Thu, Jun 6, 2019 at 11:35 AM Rodney W. Grimes > > 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. > > -- > John Baldwin If we already had such a module, it would make sense to put these sysctls in there. But I don't want to create an entire module for just a few dozen LOC. Nor do I want to mediate a bike shed. So let's vote. kib already registered a vote for making them available all of the time. rgrimes voted to guard them by INVARIANTS. Anybody else who cares can reply to this thread. I'll count the votes in 24 hours. -Alan