From owner-svn-src-all@freebsd.org Thu Jun 6 18:35:58 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 BC94F15BC62A; Thu, 6 Jun 2019 18:35:57 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (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 4EF4281F18; Thu, 6 Jun 2019 18:35:57 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io1-xd44.google.com with SMTP id n5so996668ioc.7; Thu, 06 Jun 2019 11:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KwsHt2yqefjW9j3PDas+CEWouX1RqORRnurjyP596vA=; b=YNMtMfI2036HHrvyQycjLSlJzsKxsFtIVhgOg99fW2r/Yg1gEK44VJhCCDQwNBHJK7 6KUhrBFK6sWAohDcLGEltcweGCTzebN5rhS6nyktqTduvbspAnvE3+Wlo8mnHKUoIaMS WpjthTRs9wC2hP2PMVPVEnJOZRbXO+Vpj/sr0JkHvS19GouFicziC/DH4M6rja3Q6SE4 p37ceYXg+2kw4FfXzVcWvc3FkhaF+1VF6tiJG4ewprX61ziVQU5017x2GmsxTOct6lcG lTn4PyYjBE8fWdj4qMDCx5QJ3PsqO0V7RM6ML0Nuu5rKVpRa/hO7jEh+hfAufbbqq/Hd NG5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=KwsHt2yqefjW9j3PDas+CEWouX1RqORRnurjyP596vA=; b=hHcr1Ue0YkACVHoMTyEFLWcw8cW/+7JDUNxTiKOjpCGZC0+jPv/yI67dWBBj1HfjvM RWNUHDtM18e948Gj6EFWwttfBNTlim8g7yAAG5fa21OMYQFXvXO3BRYHSD9ZnoIfY+Ic cHkc97h443MVADkb2CycUUbyfG38w4+QCQKmgg2JMtVGYpn++7A5HLoZBdgoPOpCKsYX Dfpw7YaaX5GBzegukmxlml4Ajy2WR8u0MHFpUcmrE+c/1tUlgnn3j1vQtYnd8+2eE9d3 2mfo4Qb6rP+ITlgcduFiDgDMS6HQMpw34NEOWvqxknlOpNfpKPdCMFkXFcrfz7SijjZd Nxbg== X-Gm-Message-State: APjAAAWWPztWEucGw2JhUj9YKT95NQzGkdSQH+0qLtaFrcvrX+TedbOu MSlazbpCTVNkBYGC7f6ekg+xSdx3 X-Google-Smtp-Source: APXvYqyrndu1duQgdkOxSQGE1rl0WOO0siLECGAv+SrFtTYw6s6Ni5W2N1/dC1TXdiLQrF6XXnpHXg== X-Received: by 2002:a6b:e608:: with SMTP id g8mr797098ioh.88.1559846156049; Thu, 06 Jun 2019 11:35:56 -0700 (PDT) Received: from raichu (toroon0560w-lp130-12-70-50-22-99.dsl.bell.ca. [70.50.22.99]) by smtp.gmail.com with ESMTPSA id z202sm621869itb.2.2019.06.06.11.35.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jun 2019 11:35:54 -0700 (PDT) Sender: Mark Johnston Date: Thu, 6 Jun 2019 14:35:52 -0400 From: Mark Johnston To: Alan Somers Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r348737 - head/sys/kern Message-ID: <20190606183552.GD3015@raichu> References: <201906061504.x56F4odw034764@repo.freebsd.org> <201906061735.x56HZGIJ058845@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Rspamd-Queue-Id: 4EF4281F18 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,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:35:58 -0000 On Thu, Jun 06, 2019 at 12:04:52PM -0600, Alan Somers wrote: > 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. +1 to making it unconditional. We already have lots of debugging sysctls enabled in !INVARIANTS kernels, and these sorts of things end up being handy in unexpected ways. For a long time I've carried a patch which unconditionally compiles debug.vm_lowmem because I kept having to recompile to get it.