From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 16:03:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D660F1065676; Fri, 1 Jun 2012 16:03:38 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 736118FC0A; Fri, 1 Jun 2012 16:03:38 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so3393795pbb.13 for ; Fri, 01 Jun 2012 09:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+eDBw9uMaaaNn+bdmvx0pi4kP9L+ZZklG4RHpifqmsQ=; b=r73GWz3ccdSm2uP9tIomvMJjFe0QXNRoZ4AzazNIild1lZhsJ8bd+EQxSA+momy1jf ryP5Q1bxIr9IOXBqTSdIRaK6Osojm+qmJZ9QdYWil3jPHy+2soBefThBUDcEVPUmnYYN 6k2z6GdEtlBIUpsdvDmziplKsllKxgy9TLLYaZq+W6tEi8iEoFtBa67q2ZkgZTpDWReJ ajh4KC1NM29hVTCmryEaU+bixjotm7l7R96E2vDM7RF5be52aPt1wWrBf9m4gSFDhulo mxC6o8Mh9pQ9tkKmReWLx7lOGI7JzOdwUWjgFVH85Wx8a9lZCwh7FQUup5gemjud+1Ae 0Y5w== MIME-Version: 1.0 Received: by 10.68.233.102 with SMTP id tv6mr11227157pbc.153.1338566618302; Fri, 01 Jun 2012 09:03:38 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.237.226 with HTTP; Fri, 1 Jun 2012 09:03:38 -0700 (PDT) In-Reply-To: <20120601175403.H1865@besplex.bde.org> References: <201206010442.q514gqqv084148@svn.freebsd.org> <20120601175403.H1865@besplex.bde.org> Date: Fri, 1 Jun 2012 09:03:38 -0700 X-Google-Sender-Auth: pZSIdGr5fGtTZUDh66FJ439fGtM Message-ID: From: mdf@FreeBSD.org To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, Sergey Kandaurov , src-committers@freebsd.org Subject: Re: svn commit: r236380 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 01 Jun 2012 16:03:38 -0000 On Fri, Jun 1, 2012 at 2:14 AM, Bruce Evans wrote: >>> +SYSCTL_OID(_vm, OID_AUTO, swap_free, >>> CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_MPSAFE, >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 NULL, 0, sysctl_vm_swap_free, "Q", >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 "Blocks of free swap storage."); > > > Bug 9 is a style bug. =A0I didn't even know that the raw SYSCTL_OID() cou= ld > be misused like this. =A0The normal SYSCTL_PROC() is identical with > SYSCTL_OID() except it checks that the access flags are not 0. =A0Few or = no > SYSCTL_FOO()s have no access flags, and this is not one. =A0It has rather > excessive access flags (I think CTLFLAG_MPSAFE is unnecessary. I wanted to correct this one point. CTLFLAG_MPSAFE is helpful, because its use prevents kern_sysctl from taking Giant before calling the sysctl handler. It's probably nearing the case, now, that any sysctl *without* CTLFLAG_MPSAFE is incorrect, except perhaps for a few that set/get text strings that don't want to roll their own serialization. Cheers, matthew