From owner-svn-src-head@freebsd.org Tue Feb 7 20:35:01 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 0E0FECD5A26; Tue, 7 Feb 2017 20:35:01 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (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 C9D7B147B; Tue, 7 Feb 2017 20:35:00 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x244.google.com with SMTP id f200so13577509itf.3; Tue, 07 Feb 2017 12:35:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=MDLX4XnWJ75iAfmDoYte7wOXqnNZJ+gsXRDy12UhHVY=; b=Xzx2Ea6ACMfhRAu89iEiVlWIlEWAmehP2080isdM5pKJC4J/ZTReKg/9H6qebDxIMX ChO+GbL+qmbprSztZlWDMFyjf34zcW8FEJTT606XaOBs7uTMN04IpedkfuT/y53XWhuA nsG0cgV06CTruqkNhbJYMX3XCiKMGiz7je07+KwslkTaZWHETqzIkMfw3G75Vr+MU8Gk nilViDK9rhcBm53gmG+psCZLR2wBm5A3jMAPHcKkHhqhpzztczacgta0y27tlEtj9Mh8 Rjk5ntA/+7FJxgmQ6FfMhBPV4GcCBcCfAmhxnjh/ZjRnUxadibGet4ccjQN65UAyrr6t bohg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=MDLX4XnWJ75iAfmDoYte7wOXqnNZJ+gsXRDy12UhHVY=; b=WIJ6roNE9rxLQo/wwNoq358JKr3G+KPxa8mp5GvJnAwF2TrgZhAAgazZzjSiOUnvF/ xefT0K7kB+Vvd7/2ZQd/i8LiU21KdaAXDrllrIvnfrhNeFrTzbXn0+os03rS2clhbPnb LpxSXwdnfcH3BfYpi7CSu3Q+fh82F+P3CAND3/W119JSWhulbm8yTzTFDwNg5LBzYISw RBNCiOjgsSKKZANeJckbOHdXj/r6571JzluWuEE4h/TyuIk6ehHGL8IcAxr0zMMjPq4c PnEmo7/j3shS2lCXdqNZfvAhRbbWM9InUHI3zbzDkGdZniBdW/qb4orgzXRSrR9dWOmK nB4A== X-Gm-Message-State: AIkVDXJ/lxhk/kohtjq8ty7XQULiJvkKK4/1Y6yVAXvzhaJqCwl7F5fgg4T1POAfe37uprfyKiovfOOVlb0dwQ== X-Received: by 10.36.10.3 with SMTP id 3mr13167850itw.108.1486499700266; Tue, 07 Feb 2017 12:35:00 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.175.159 with HTTP; Tue, 7 Feb 2017 12:34:39 -0800 (PST) In-Reply-To: <8e0f5a4c-16ec-842d-f4f7-32c830f43553@multiplay.co.uk> References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> <20170205151746.GA6841@FreeBSD.org> <20170207145750.GD4772@dft-labs.eu> <8e0f5a4c-16ec-842d-f4f7-32c830f43553@multiplay.co.uk> From: Ed Maste Date: Tue, 7 Feb 2017 15:34:39 -0500 X-Google-Sender-Auth: 10M2DALlQA02Qf7sWbArlbJXsPw Message-ID: Subject: Re: svn commit: r313260 - head/sys/kern To: Steven Hartland Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Mateusz Guzik Content-Type: text/plain; charset=UTF-8 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, 07 Feb 2017 20:35:01 -0000 On 7 February 2017 at 10:30, Steven Hartland wrote: > All I'm suggesting is, while one could guess this may be a performance or > possibly a compatibility thing, the reason is not obvious, so a small piece > of detail on why the change was done should always be included. > > For this one something like the following would be nice: > > Switch fget_unlocked to atomic_fcmpset > > Improve performance under contention by switching fget_unlocked to > use atomic_fcmpset. I agree, and one of the key reasons to do this is so that there's this tiny bit of context if someone later runs "git blame" or "svn annotate" and discovers this change for the line containing atomic_fcmpset. Comments containing "eliminate memory leak" or "remove unused variable" have a self-evident reason, but I don't believe that's true for "switch to atomic_fcmpset." Repeating the "switch fget_unlocked to..." in the proposed commit message above feels redundant to me though, and I would suggest: | Switch fget_unlocked to atomic_fcmpset | | Improves performance under contention. or just: | Use atmoic_fcmpset to improve performance under contention