From owner-svn-src-head@freebsd.org Sun Aug 28 13:53:28 2016 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 9C9EFB774FF; Sun, 28 Aug 2016 13:53:28 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CC6CAEE; Sun, 28 Aug 2016 13:53:28 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1be0A8-000H0U-7k; Sun, 28 Aug 2016 16:30:12 +0300 Date: Sun, 28 Aug 2016 16:30:12 +0300 From: Slawa Olhovchenkov To: Adrian Chadd Cc: Bruce Simpson , Ryan Stone , "svn-src-head@freebsd.org" , Ryan Stone , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" Subject: Re: svn commit: r304436 - in head: . sys/netinet Message-ID: <20160828133012.GN88122@zxy.spb.ru> References: <20160826144926.GE88122@zxy.spb.ru> <3dba1b70-54cc-0bb1-5cc8-8c56cd750bec@fastmail.net> <20160826151324.GF88122@zxy.spb.ru> <20160826213613.GH88122@zxy.spb.ru> <20160826220255.GI88122@zxy.spb.ru> <20160827004617.GJ88122@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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: Sun, 28 Aug 2016 13:53:28 -0000 On Sat, Aug 27, 2016 at 07:05:01PM -0700, Adrian Chadd wrote: > On 26 August 2016 at 17:46, Slawa Olhovchenkov wrote: > > On Fri, Aug 26, 2016 at 04:55:34PM -0700, Adrian Chadd wrote: > > > >> Hi, > >> > >> I use the kernel lock profiling debugging, > > > > I am already have 100% utilise all CPU cores, I think this is drop > > performance? > > > >> but you can use dtrace to > >> get an idea: > >> > >> dtrace -n 'lockstat:::adaptive-block { @[stack()] = sum(arg1); }' > > > > How to interpret results (how to distinct lock contention from lock > > cost/overhead (LOCK CMPXCGQ is very expensive))? > > well, paste the results? :) OK, thanks! http://m.uploadedit.com/ba3s/1472390519813.txt > the lock is expensive because it's contended. :) As I am understund lock contended: 1. Multiple thread wait same lock. 2. Performance not scaled by adding CPU power As I understund lock expensive: Intel cache coherence protocol is expensive and take lock 800K per second take too much cpu/memory bandwidth w/o any contention. Memory latency at cache miss too. Adding mory CPU power (more cores, more GHz) take me performane boost. I am think my case is not lock contended. > >> (https://wiki.freebsd.org/DTrace/One-Liners) > >> > >> > >> > >> -adrian