From owner-svn-src-head@freebsd.org Thu Jun 6 19:40:15 2019 Return-Path: Delivered-To: svn-src-head@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 B99B215BE18E for ; Thu, 6 Jun 2019 19:40:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) (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 2154384A91 for ; Thu, 6 Jun 2019 19:40:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-lj1-x22b.google.com with SMTP id k18so1743295ljc.11 for ; Thu, 06 Jun 2019 12:40:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M2T7QC7j9LLpfl7lUKLkA7xVGFZXggy1Trus31U5HXk=; b=xHEWTmGMW4UF1fKXjhURmVLDk3lwaKSVUPwbdkcxhBeiHAMj9loVqmYlIvD9uyFYkC rGOTdtUQKQEytU0Aj+EHvmJXi1L5So5djLJayuIN5GcDp0rd7ywqyvBj8sN3XQ4AXt9O fJb3ELrOO+xTh8BpMI7sxct4toLNASPoqCfnOtedKdxYvYCaf9pUq32K9xDIZBWzNGzt Ti6Y5cgXmGzbSZjYaX6oYAfLPMg7vle7VWMmhW1ftevqmFNp8N8RvtxFQhTvGBBF85dN RNOIh3TTMe1oico1qFc+cBZ0ITF49XuakmQzPDuz0Rr6hc+9lg8Xw7oe+qa/ZO0yjyKQ uzNA== 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=M2T7QC7j9LLpfl7lUKLkA7xVGFZXggy1Trus31U5HXk=; b=LGaQSMcutVtieXrwPOcrRzIpB1pVCPSYf+nezLdId8Ofh/XVrXX++E7P2ylQS42LCa HbKn3bC4P16pre+BQ3iFYB1Ekg9x61HaHFvHUEGTC8RiK/025gkrUGmrk0tJ85ocxSay 9/TLwsel/8WztRdcwbOB3gapwPuZLx9HNaFsIespuXZkGmOib2qOXdDkiUOj+KRagVQ2 Welz3hNbAG3HWjEODQbNhCH0qhWJSzMx19p2KArJD9ViEXbptnA+MiZMr1n6m88WfoLS rc+swj2akL1fcJEomA4cVrZ4MEs1ceARNt6Lb0oq9ua3z7PwxHtrBKeW5QdpRoZp/CBj wX9g== X-Gm-Message-State: APjAAAWbsFmqKO4Xl11D+Hq5mInANTYEHJcpxaVeL0xDbSvSML7ODjzx +jG4SyA3Mo53QkjO2v85P3gsB7OwhUNRjpJ6TgCg1g== X-Google-Smtp-Source: APXvYqy2Pg8q1uJDNpxA5mLuo68OwvaUbIHH1Av15n+Q+ikR1NIc9376xe1dPLVxFw4emB7E9pF1+8PVGEmV2jTwFrc= X-Received: by 2002:a2e:8850:: with SMTP id z16mr26456245ljj.69.1559850013337; Thu, 06 Jun 2019 12:40:13 -0700 (PDT) MIME-Version: 1.0 References: <201906061504.x56F4odw034764@repo.freebsd.org> <201906061735.x56HZGIJ058845@gndrsh.dnsmgr.net> <20190606183552.GD3015@raichu> In-Reply-To: <20190606183552.GD3015@raichu> From: Warner Losh Date: Thu, 6 Jun 2019 13:39:59 -0600 Message-ID: Subject: Re: svn commit: r348737 - head/sys/kern To: Mark Johnston Cc: Alan Somers , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 2154384A91 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jun 2019 19:40:16 -0000 On Thu, Jun 6, 2019, 12:36 PM Mark Johnston wrote: > 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. > Unconditional. I strongly disagree that things useful for diagnosis of a problem don't belong in the kernel. It's not the 80s or 90s where a few bytes would help. Having run a huge network of machines that have weird random stuff happen has convinced me the more tools to debug the better. Especially for random stuff that goes away when I reboot the debug kernel. Warner >