From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53E3BECDE3B for ; Wed, 17 Oct 2018 21:06:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F96F2145D for ; Wed, 17 Oct 2018 21:06:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F96F2145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727275AbeJRFER (ORCPT ); Thu, 18 Oct 2018 01:04:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52610 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726412AbeJRFER (ORCPT ); Thu, 18 Oct 2018 01:04:17 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7727D30C9EF7; Wed, 17 Oct 2018 21:06:47 +0000 (UTC) Received: from llong.remote.csb (dhcp-17-8.bos.redhat.com [10.18.17.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC6795C8BD; Wed, 17 Oct 2018 21:06:46 +0000 (UTC) Subject: Re: [PATCH 1/2] locking/qspinlock_stat: Count instances of nested lock slowpaths To: Peter Zijlstra Cc: Ingo Molnar , Will Deacon , linux-kernel@vger.kernel.org References: <1539697507-28084-1-git-send-email-longman@redhat.com> <20181017073833.GE3121@hirez.programming.kicks-ass.net> From: Waiman Long Organization: Red Hat Message-ID: Date: Wed, 17 Oct 2018 17:06:46 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20181017073833.GE3121@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 17 Oct 2018 21:06:47 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/17/2018 03:38 AM, Peter Zijlstra wrote: > On Tue, Oct 16, 2018 at 09:45:06AM -0400, Waiman Long wrote: >> Queued spinlock supports up to 4 levels of lock slowpath nesting - >> user context, soft IRQ, hard IRQ and NMI. However, we are not sure how >> often the nesting happens. So 3 more per-cpu stat counters are added >> to track the number of instances where nesting index goes to 1, 2 and >> 3 respectively. >> >> On a dual-socket 64-core 128-thread Zen server, the following were stat >> counter values under different circumstances. >> >> State slowpath index1 index2 index3 >> ----- -------- ------ ------ ------- >> After bootup 1,012,150 82 0 0 >> After parallel build + perf-top 125,195,009 82 0 0 > Would probably be good to check a network workload. Do you have any suggestion of what network workload? I usually don't test on network related workload. The only way to have a nesting level of 3 is when there is lock contention in user context, soft IRQ and hard IRQ simultaneously which is very rare, I think. Native qspinlock has a pending path and so even a slightly contented lock will not cause entry into the slowpath. PV qspinlock doesn't have a pending path, so there may be a slightly higher chance of hitting that. Cheers, Longman