From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 28 15:37:13 2013 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 61B47C08; Fri, 28 Jun 2013 15:37:13 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ee0-x22a.google.com (mail-ee0-x22a.google.com [IPv6:2a00:1450:4013:c00::22a]) by mx1.freebsd.org (Postfix) with ESMTP id C4DB81306; Fri, 28 Jun 2013 15:37:12 +0000 (UTC) Received: by mail-ee0-f42.google.com with SMTP id c4so1101025eek.15 for ; Fri, 28 Jun 2013 08:37:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=n5sRHnBvVfx2gdJKoqkieMouKy2V1G5gGz5zcJyPnA0=; b=coEnr0d5Y5ZWT3UVPO41cy9G0r1ICJH4WXgNuwuW+KVZr64n1/VA7AhghrvkhBX+ga SCygtahgQsFu18SpEBc5YE/SjQAV0wxPBt6G7CiXGDrOtzz2yUcaDwAudiJFGe+0U9b5 tJgeVz6yzFbnwah825O37n1wc9nZa4V+g3F2mW7+YtTlrJbFaeTuzyWOD22fUiGuhkLW J/n8oTcqQGhJ4SXbu7OhQkyd7oPr2RbxXYD6d+eGKyC40dcZs4dbWLZA0Mq4EWSf/lTe YaZ9KLInCNcwcwhaDcfJS+lyigIHq1VVookQodfK0gHt84ZohJJ6ev3VF6NMDUuIV+NG KXmg== X-Received: by 10.15.43.11 with SMTP id w11mr14414589eev.27.1372433831793; Fri, 28 Jun 2013 08:37:11 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPSA id i2sm11226855eeu.4.2013.06.28.08.37.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Jun 2013 08:37:10 -0700 (PDT) Sender: Alexander Motin Message-ID: <51CDADA4.9090803@FreeBSD.org> Date: Fri, 28 Jun 2013 18:37:08 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130616 Thunderbird/17.0.6 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: b_freelist TAILQ/SLIST References: <51CCAE14.6040504@FreeBSD.org> <20130628065732.GL91021@kib.kiev.ua> <51CD4FEA.7030605@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jun 2013 15:37:13 -0000 On 28.06.2013 18:14, Adrian Chadd wrote: > .. i'd rather you narrow down _why_ it's performing better before committing it. If you have good guesses -- they are welcome. All those functions are so small, that it is hard to imagine how congestion may happen there at all. I have strong feeling that lock spinning there consumes incomparably much more CPU time then the locked region itself could consume. > Otherwise it may just creep up again after someone does another change > in an unrelated part of the kernel. Big win or small, TAILQ is still heavier then STAILQ, while it is not needed there at all. > You're using instructions-retired; how about using l1/l2 cache loads, > stores, etc? There's a lot more CPU counters available. I am using unhalted-cycles, that is more reasonable then instructions-retired. What's about other counters, there are indeed a lot of them, but it is not always easy to get something useful out of them. > You have a very cool problem to solve. If I could reproduce it locally > I'd give you a hand. You'd need a lot of hardware and patches to reproduce it in full. But if you like to see this with your own eyes, I can give you an SSH access to my test machine. -- Alexander Motin