Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3843145ybl; Mon, 3 Feb 2020 07:34:18 -0800 (PST) X-Google-Smtp-Source: APXvYqy0ATB3hR9AXVihIXICxbCTa7JiVwqpxLctI0tuC/+t0++UD+WZXdpE5Xf/JGjAk5IDheZb X-Received: by 2002:a9d:6b03:: with SMTP id g3mr18227134otp.200.1580744057937; Mon, 03 Feb 2020 07:34:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580744057; cv=none; d=google.com; s=arc-20160816; b=ibcI3RJK+fLNeuikqs1fLbSS2iuYapRQ5Zm3lwICjg4Zzl8yHWuZAgKb+/VsnN+YSt vRtUYm90/rGLcCQ8y5dDISqgFs98mUWvuxFLcWkgicHtp+xNUwJGVhTjVM5HBKcH8eoR m8O6uJxTQ13JiL7DjmQppAmgVS2Z5K0ZqxqvLLouXYAL27yUIu3tHh/kzIjuDfFM6VDz VWNCsB29x1zFyPFTbylMI/fl4+dNcASQzpEmUHdQo0KCsNcDXFr0u7WmcmmhUlyeEq3q RSw0IinLqMMs9j1Z3JAK5uKp9hMmapADDr+peMwh7l4bZ/Sdr0FVbDKsBseu5rHBxvay qmgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ydJSIlzM2hfUd3hl9T8tzcAmF2kYDsfmAnSpEAfBJFE=; b=iP9EYGnFx65ZeL0PsPeCGuq8p6+/WRFnlXQ/PL7zbBGqoRped5vBI16f91vV3RG3tQ q2MQ9gK5q1IFtZCm5axWSnMbX2dwwVSvQXB994MeFSGtjjJm4ZEVPr6plyFpKJ01XTAb QmwMOUcMUgSVkgaEgByrUZ0PQvieYMOvTDapWVM2aKfBRA86wqD8cBv9MxPklxU+oCtt ceU3xvJLWsG2zMrYT+wqzsBbk0IAlzV2Iefuo0Y8erFQvOlzzp1huTKAybwF7liuFs4X 1I7I6OZ701QrqBYm04cu54iCWKfpbMd/rlZoC13OGeS87I0qk5dH/MZ7D1r5mLuP2Tly f1rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Ifgv49xE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j20si9566630otp.147.2020.02.03.07.33.55; Mon, 03 Feb 2020 07:34:17 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Ifgv49xE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728154AbgBCNqY (ORCPT + 99 others); Mon, 3 Feb 2020 08:46:24 -0500 Received: from merlin.infradead.org ([205.233.59.134]:40260 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728143AbgBCNqW (ORCPT ); Mon, 3 Feb 2020 08:46:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=ydJSIlzM2hfUd3hl9T8tzcAmF2kYDsfmAnSpEAfBJFE=; b=Ifgv49xEstpI6IK+7zuM3iAvmJ jr82lguHcDCP1cXc5T81M5VxnAYuFDas9953pxIHOCtEMmJ43fiGkeyF5+hY1TOStG3WChXAhdu6M 4bVDMfZkJo3oib3cWXIwf99ZG4eOFvzz9UTYlQB+6ZmTi7lOUJYvzrW3Gewcz/1GI3YuwmF/1zfCB WDbZYc43ExER/r5rjtWqf6hxqhSyOu3QU/xD6Zhgcc8P8SgPg7BA7VOhYR4+tk0xtGx2ypu41t1Id ht8N7MaR+waqTk32jUpD1OYtU/VURox040tiS7juhC4s045+nmg4kGNNZWIvu7JPUlqWEKGTC0QWo c3w0IGbw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iyc2p-0004pA-2r; Mon, 03 Feb 2020 13:45:43 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 53105305803; Mon, 3 Feb 2020 14:43:55 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5F4B82B63D250; Mon, 3 Feb 2020 14:45:40 +0100 (CET) Date: Mon, 3 Feb 2020 14:45:40 +0100 From: Peter Zijlstra To: Alex Kogan Cc: Waiman Long , 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 Subject: Re: [PATCH v8 4/5] locking/qspinlock: Introduce starvation avoidance into CNA Message-ID: <20200203134540.GA14879@hirez.programming.kicks-ass.net> References: <3862F8A1-FF9B-40AD-A88E-2C0BA7AF6F58@oracle.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 30, 2020 at 05:05:28PM -0500, Alex Kogan wrote: > > > On Jan 25, 2020, at 6:19 AM, Peter Zijlstra wrote: > > > > On Fri, Jan 24, 2020 at 01:19:05PM -0500, Alex Kogan wrote: > > > >> Is there a lightweight way to identify such a “prioritized” thread? > > > > No; people might for instance care about tail latencies between their > > identically spec'ed worker tasks. > > I would argue that those users need to tune/reduce the intra-node handoff > threshold for their needs. Or disable CNA altogether. I really don't like boot time arguments (or tunables in generic) for a machine to work as it should. The default really should 'just work'. > In general, Peter, seems like you are not on board with the way Longman > suggested to handle prioritized threads. Am I right? Right. 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?