From owner-svn-src-head@freebsd.org Tue Feb 21 00:56:05 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 A317FCE62DB; Tue, 21 Feb 2017 00:56:05 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 380F21C34; Tue, 21 Feb 2017 00:56:05 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id c85so95433316wmi.1; Mon, 20 Feb 2017 16:56:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=30X8Rrjb9tn49VaZdlvT5CwxLb8hgBpobtFg4wGDte8=; b=sYKK9MccTv5dvLwKiysmpUr8JoDJ89TdfFOEAuoqXZ0mQv82dw+oK3useRDeWxaJh6 vUUiSk6KREOOaHt/KxPyF3ZoX895R7c376VDAsfQo/gRKPHifUSfFpS3dAgN5dKEwFOI Mp8VpCCQgD9bULuEilGmd4s4OBmXJzKYjznmWY+e+ZIarkNQKSKev2eEEU+XQlPj+yts f4bL+/v5M8Rv+z/SOx4EYRxyv6XQN+65rxjwW0R2AJ8U7Skvul5jnq/NR1BnEhYtVMqi WHU2pwx1ZXGl2DZ8OehPpX2uJDd0cGne5MmvI2BgznUnlTK0ZTHp/19V9pg84i8TvZD9 KsEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=30X8Rrjb9tn49VaZdlvT5CwxLb8hgBpobtFg4wGDte8=; b=UX40kQ8lGoLS0uEsvoAJtS67hcuoCJebpf0ddORqDxkNmxIDGq5H1kxI3xeqsllIaX CmCCVmyU7b4YZue8L5ArwNG1WzyOz9+ib5UgqtDtcKYWbo7uhPFg+e1ALEPaSqGdPU+0 SsQRPwoZxLPYdaaYKUcLsmkfX6lbRFj2f/EsT8rOYhyzV/KiVrJHarKx+avqZH7XFFnT 8jPvk5OiiHsrxmg751mOfwrBfC7tmZT4fZhQaDz6dhS8ae7MjdEsi7aj3S2YjciGi2Gg AyK5vq3uuO4bxcQlARLuzOugwEEAcWBnWcGOeqCZ8MDdDIUfncs0PksV+bP3Y7vs8ZuG odww== X-Gm-Message-State: AMke39nHf/OyG3yDs3bKro+5KEDJbyHMMJJ/7MdZMDW03iNzMPjrtlRlfEFLBp8bVBDUNg== X-Received: by 10.28.47.7 with SMTP id v7mr20765598wmv.138.1487638563490; Mon, 20 Feb 2017 16:56:03 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id w30sm26783057wrb.5.2017.02.20.16.56.02 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 20 Feb 2017 16:56:02 -0800 (PST) Date: Tue, 21 Feb 2017 01:56:00 +0100 From: Mateusz Guzik To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313878 - head/sys/kern Message-ID: <20170221005600.GE26759@dft-labs.eu> References: <201702171540.v1HFeOAs074991@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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: Tue, 21 Feb 2017 00:56:05 -0000 On Mon, Feb 20, 2017 at 04:24:50PM -0800, Bryan Drewery wrote: > On 2/17/2017 7:40 AM, Mateusz Guzik wrote: > > Author: mjg > > Date: Fri Feb 17 15:40:24 2017 > > New Revision: 313878 > > URL: https://svnweb.freebsd.org/changeset/base/313878 > > > > Log: > > mtx: get rid of file/line args from slow paths if they are unused > > > > This denotes changes which went in by accident in r313877. > > I really wish people would just revert their changes and recommit them > properly. The 'svn blame' on the code in r313877 will never show the > commit message here (r313878). So a person would only find this > explanation if they read 'svn log' on the file, which in the case of > sys/kern/kern_mutex.c there are 273 commits for. Are we expected to > read 'svn log' (in the future) for all changes in the hopes that a later > commit happens to mention it? > > As someone who so often is 'svn blame'ing code to understand it better > and to track regressions, commits like this that explain other commits > might as well have never been done. > In general I agree, but also don't think the change was worth any additional churn. It only removed 2 args when not under LOCK_DEBUG. The commit message above is only to note KBI is covered as this could be of concern for a casual reader. I would not do this if the change was doing anything non-trivial. > > > > On most production kernels both said parameters are zeroed and have nothing > > reading them in either __mtx_lock_sleep or __mtx_unlock_sleep. Thus this change > > stops passing them by internal consumers which this is the case. > > > > Kernel modules use _flags variants which are not affected kbi-wise. > > > > Modified: > > head/sys/kern/kern_mutex.c > > > > Modified: head/sys/kern/kern_mutex.c > > ============================================================================== > > --- head/sys/kern/kern_mutex.c Fri Feb 17 15:34:40 2017 (r313877) > > +++ head/sys/kern/kern_mutex.c Fri Feb 17 15:40:24 2017 (r313878) > > @@ -622,7 +622,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, > > LOCKSTAT_RECORD1(adaptive__block, m, sleep_time); > > > > /* > > - * Only record the loops spinning and not sleeping. > > + * Only record the loops spinning and not sleeping. > > */ > > if (lda.spin_cnt > sleep_cnt) > > LOCKSTAT_RECORD1(adaptive__spin, m, all_time - sleep_time); > > > > > -- > Regards, > Bryan Drewery > -- Mateusz Guzik