Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3960347ybl; Mon, 3 Feb 2020 09:47:11 -0800 (PST) X-Google-Smtp-Source: APXvYqznB4zId+KaY5DLvKCmYw8bECgZKWVTpY+RmQabqJ8dKbT7jRloF9Lr/hvaIgfSUAT2Zq9J X-Received: by 2002:aca:c646:: with SMTP id w67mr118075oif.171.1580752031497; Mon, 03 Feb 2020 09:47:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580752031; cv=none; d=google.com; s=arc-20160816; b=d2nuW7bhQmVOMmMG+PtW0WrcG8zN4TEYuEnzcthMM7qL3i0BeICzkqZaDD1fTjOYr8 +PGv4lAnEcJhYKXfee41OBsFzYviXXXEvvJ3AO6S5X3xRovs0IuTtJH8GeVu4qawxVc5 tC1c8pemQFk2kqHM7LVmUl7pur4QrcIvkwqijPZUkRroJ4MI8twveKcRRWTWSvUBAPuA eAcklo7wYm2+wDDKPE2klDnVMIdsQZ4bTAJCOJBNRNltR2Cq+9bMP3dE12ABSYd2Ief8 DgIfe4M45PvcyrUZcSEGgChag72l9i4ar8OVE3m1LD6jLqo0OgeFjxp1Ru1wCZ5sFF0B MLEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature; bh=hXZe6FEUmH9hjk4hufHYUU+BgVLORNyZ1sbApPlRBeU=; b=YU7HF8dMnjyt8sj6tMaafmPEtZkLmdOX6sF2ArY6b4z8kB8+3UvhgmZfxPbR+beIkh Yevx5HdbKx1k34Z0kMVWdtC5hJ/BS22h3O4ae4gGODu9epUgxonJ+pchl34XplfypTJm McP7E+z4hbjc7ZsDeJIBjkDTPZpXzIg7V2C2QKu+3JwiC6VC8sRi5lLvvNoaRsP7d/HJ IdnbXUYz//17gLmNLWfQElUKfl0tM73OmpVFOJu5fUQh5vuHki9otdrhpKwlotYUVr9H NCi08kBTcMf1dM0IC0WVaatBqDm0YnBMtoOTieXu2NTc0GbNs6fH2fj7VhHDAYExS7/k 7Q8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="bl/tRYss"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k66si7737205oih.200.2020.02.03.09.46.59; Mon, 03 Feb 2020 09:47:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="bl/tRYss"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728070AbgBCPr3 (ORCPT + 99 others); Mon, 3 Feb 2020 10:47:29 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:45559 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728047AbgBCPr3 (ORCPT ); Mon, 3 Feb 2020 10:47:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580744848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hXZe6FEUmH9hjk4hufHYUU+BgVLORNyZ1sbApPlRBeU=; b=bl/tRYssUdg7HivggzHPDcQhHyrqcqrFaSUFeXoTVyswe03h/bmlft9uYdD1absZYmW0Ro 5tvP8ySKZXoyvsS10lKIrl7q8iJT4Zx8srWkg9CO5tlKGiIC69TtZ6mMmWvvVVwxwzInaR nij/eJKmZSATtk3lnnZz6BqvXUEJiVU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-161-aeDC1h7MNYCqXuy0WDdweg-1; Mon, 03 Feb 2020 10:47:24 -0500 X-MC-Unique: aeDC1h7MNYCqXuy0WDdweg-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5959D800D4E; Mon, 3 Feb 2020 15:47:21 +0000 (UTC) Received: from llong.remote.csb (dhcp-17-59.bos.redhat.com [10.18.17.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 095D55C1B5; Mon, 3 Feb 2020 15:47:15 +0000 (UTC) Subject: Re: [PATCH v8 4/5] locking/qspinlock: Introduce starvation avoidance into CNA To: Peter Zijlstra Cc: Alex Kogan , linux@armlinux.org.uk, Ingo Molnar , Will Deacon , Arnd Bergmann , linux-arch@vger.kernel.org, linux-arm-kernel , linux-kernel@vger.kernel.org, Thomas Gleixner , Borislav Petkov , hpa@zytor.com, x86@kernel.org, Hanjun Guo , Jan Glauber , Steven Sistare , Daniel Jordan , dave.dice@oracle.com References: <20200124075235.GX14914@hirez.programming.kicks-ass.net> <2c6741c5-d89d-4b2c-cebe-a7c7f6eed884@redhat.com> <48ce49e5-98a7-23cd-09f4-8290a65abbb5@redhat.com> <8D3AFB47-B595-418C-9568-08780DDC58FF@oracle.com> <714892cd-d96f-4d41-ae8b-d7b7642a6e3c@redhat.com> <1669BFDE-A1A5-4ED8-B586-035460BBF68A@oracle.com> <20200125111931.GW11457@worktop.programming.kicks-ass.net> <20200203134540.GA14879@hirez.programming.kicks-ass.net> <6d11b22b-2fb5-7dea-f88b-b32f1576a5e0@redhat.com> <20200203152807.GK14914@hirez.programming.kicks-ass.net> From: Waiman Long Organization: Red Hat Message-ID: <15fa978d-bd41-3ecb-83d5-896187e11244@redhat.com> Date: Mon, 3 Feb 2020 10:47:15 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20200203152807.GK14914@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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/3/20 10:28 AM, Peter Zijlstra wrote: > On Mon, Feb 03, 2020 at 09:59:12AM -0500, Waiman Long wrote: >> On 2/3/20 8:45 AM, Peter Zijlstra wrote: >>> Presumably you have a workload where CNA is actually a win? That is, >>> what inspired you to go down this road? Which actual kernel lock is so >>> contended on NUMA machines that we need to do this? >> Today, a 2-socket Rome server can have 128 cores and 256 threads. If we >> scale up more, we could easily have more than 1000 threads in a system. >> With that many logical cpus available, it is easy to envision some heavy >> spinlock contention can happen fairly regularly. This patch can >> alleviate the congestion and improve performance under that >> circumstance. Of course, the specific locks that are contended will >> depend on the workloads. > Not the point. If there isn't an issue today, we don't have anything to > fix. > > Furthermore, we've always adressed specific issues by looking at the > locking granularity, first. You are right in that. Unlike ticket spinlock where performance can drop precipitately over a cliff when there is heavy contention, qspinlock won't have this kind of performance drop. My suspicion is that slowdowns caused by heavy spinlock contention in actual workloads are likely to be more transient in nature and harder to pinpoint. These days, I seldom get bug report that is related to heavy spinlock contention. > > So again, what specific lock inspired all these patches? > Maybe Alex has some data to share. Cheers, Longman