From owner-svn-src-head@freebsd.org Fri Oct 13 21:01:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C723E2CD70; Fri, 13 Oct 2017 21:01:47 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qk0-x235.google.com (mail-qk0-x235.google.com [IPv6:2607:f8b0:400d:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13DF374D88; Fri, 13 Oct 2017 21:01:47 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qk0-x235.google.com with SMTP id m189so6537777qke.4; Fri, 13 Oct 2017 14:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=g1a3zljyY/QJKiwyaoLYoGd+HUjU436xp0AdzzAJw/8=; b=u6jkEWsL8STll8u6LxjukvT4Kijhu4GCO4RYkY3cwJnaJvTSV1KLFB0j0xjvj+b5vv A9drLQIqnji8ANvYme/N2J/sPhOhCTGyL3Zq68dQmhB+G3FbtHOsu355F4SYvyNVUh0E 3AQcAuNRFEqh7fraUoyvqlHRXQtjJ18Z2d12poi5RgUWeApov1eEqLnCj6OiDzX8PH2D /v1zDXrbDGkopNrQiCdREWGbiJyc6XEkyPKB9/DpUKrdQ5P6IaJ88JqrVKPDnZ6FRjrM rBtpYqXDhnks2q5UUwx0ACmT4tmhgvRXHZ9zr2N9UO3S/5be9gts8uyqWihjmGW8404F rKEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=g1a3zljyY/QJKiwyaoLYoGd+HUjU436xp0AdzzAJw/8=; b=Vijz3Sz2jmdm2xvBzx8yN/cEXWLgAW1A5AI4ikEoT+GH//KIiVw0GLwb0YcowVzEhk 3o7ZHg6waP/UaJ2n9ir9wilG4RvK2hnK//AevXWXDYCOB42mPLYWtTP5lwcQqpC3VniE Q+lvz3bEXFN0R7IedoqAKoYV5p8DskzhMgDKTGLfho2aV0NVNJVCk/djWMy13gNxAE4J fk6EPP3I2p2oU/ZPX6rUd6/KrJrraZN8U/JGfnvulJt6i4Bf5wKJCwq3iKk8+uX9wTKR HSDGGq0RWd7ayzUL9ZlKAgA2BPubriCWxnCEm4/4+N2q0a1pT5WvL4gSC290Dx64Yeb2 HV/Q== X-Gm-Message-State: AMCzsaVXPaBqF1hmgvOlsjmVxu44LwQUVXuDJ9mS1a1tjTHKarEB+QPH gfp9NZT5V46gIYDVxrSG3tDHBco7wCNGIrFRKYdTjg== X-Google-Smtp-Source: ABhQp+SOyNEUMSNMIVAx6Ur1M+9SB/Ow+TUoTHDYr7ifq4RmTlJkJfs7eyFjyjZ2yVrApJuqj/Y4z8koxcZVoDT86LM= X-Received: by 10.55.204.157 with SMTP id n29mr3604197qkl.243.1507928505814; Fri, 13 Oct 2017 14:01:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.51.167 with HTTP; Fri, 13 Oct 2017 14:01:45 -0700 (PDT) In-Reply-To: <1507928067.8386.84.camel@freebsd.org> References: <201710132031.v9DKVueS089009@repo.freebsd.org> <1507928067.8386.84.camel@freebsd.org> From: Mateusz Guzik Date: Fri, 13 Oct 2017 23:01:45 +0200 Message-ID: Subject: Re: svn commit: r324609 - head/sys/sys To: Ian Lepore Cc: Mateusz Guzik , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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, 13 Oct 2017 21:01:47 -0000 On Fri, Oct 13, 2017 at 10:54 PM, Ian Lepore wrote: > On Fri, 2017-10-13 at 20:31 +0000, Mateusz Guzik wrote: > > Author: mjg > > Date: Fri Oct 13 20:31:56 2017 > > New Revision: 324609 > > URL: https://svnweb.freebsd.org/changeset/base/324609 > > > > Log: > > mtx: change MTX_UNOWNED from 4 to 0 > > > > The value is spread all over the kernel and zeroing a register is > > cheaper/shorter than setting it up to an arbitrary value. > > > > Reduces amd64 GENERIC-NODEBUG .text size by 0.4%. > > > > MFC after: 1 week > > > > If you MFC this, won't that break the ABI for modules compiled against > earlier versions of the branch? > > Also, won't this trigger a need to recompile out of tree modules such > as video drivers, virtualbox, etc? Does that need an UPDATING entry? > > -- Ian > > All modules (even ones provided with base) always call dedicated primitives, i.e. they never inspect the lock value. The only non-opaque part of locks (and annoying at that) is placememnt of the lock word, which right not is at the very end. This happens to matter when passing the lock around to funcs like _sleep which automagically determine what it is. I am considering a change for head which moves the word to the beginning instead and that probably wont be MFCable unless I come up with a reasonably non-terrible kludge. -- Mateusz Guzik