Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1553747ybl; Sat, 25 Jan 2020 03:18:51 -0800 (PST) X-Google-Smtp-Source: APXvYqxDDbWqMxKPmR5VoNYCvqq2Q/fjSeE6RjWaKx9aVC3y0BsFgr/EKedhXN8hDvEK2Q3WBD4X X-Received: by 2002:a9d:760e:: with SMTP id k14mr5734278otl.344.1579951130941; Sat, 25 Jan 2020 03:18:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579951130; cv=none; d=google.com; s=arc-20160816; b=Rwga5rqkzxXk5c2yrxt5u9BEYAWLc2BO/qb6Vxji6DJaH4vr/8iDasy0uL/+UianZx G5WlcVhM3pQbSmU+snPCdJ4zYYS07TdQ9xNR6m6w1aLy3jUwS8bqoYGKLSgSNFI/ilMy lzhMoN/1pMlQZnom7FRLMVaw5emKVqqR/KqxYcF1P05Q6yvlbhvJOsWtyW8gNaxvQLT8 ulvvAc6opHP1vZOSqgfoeiVCq4uV1nVfB/rTKQ4S3CAO+VWwKfRSdgcj9pNfsBTj2/N9 hcD7+Sq1Af1vswwbDJqvSfEZLezGwx1DIYo8O8i5xiyxYfdPV2aLLj59PIvqUMIuAnSD lAzQ== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0K7FHm/jXt3sYjxl/BYCvfq5e9RGc0mSngX+VselMGs=; b=wz5y/Jz7/wsCJUiuuf80ukIBR78J4hQDZRhNwPtL1CsrUaPD9HzKL3A59MINk9SYAM 6Fej8Kc7RNoPSBxOzbVynxH+YNN5I/GLeJWqYknZAk4NaWC5f11CBGGGkzJM+e80WrlQ Cc7oUGc4rDkoWzrn0YVmxZG1NTMbDhhMi0DaLU0LM0vmhi+045q/wsyyxtPyS7Z24fAH 1WKfkaQrMrRQAwJOHT/8KsaT53s7SLXkqV5q/A/HZMeSIAFQ4GFFhv/L/gjtCnNP9/e9 JrAF+ju+yCUraZdxXjRUwc+UtJokma8b8IJuFqV2SWUpJLLUpJiRbGY0JLFzjyFmb8o/ WkWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cav0QDGI; 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 u8si4394801otq.262.2020.01.25.03.18.26; Sat, 25 Jan 2020 03:18:50 -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=bombadil.20170209 header.b=cav0QDGI; 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 S1726191AbgAYLQp (ORCPT + 99 others); Sat, 25 Jan 2020 06:16:45 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:48402 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbgAYLQp (ORCPT ); Sat, 25 Jan 2020 06:16:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0K7FHm/jXt3sYjxl/BYCvfq5e9RGc0mSngX+VselMGs=; b=cav0QDGILCdG7ehnLk00deKdT 5xrXMDWMCZgSFXHw29IlP4xxsGvztiH09Fhn/OVzxM+oJiW+NySEwNwcVp79cOfwHh1G/EoxhtkH8 K0xz+edL99zobCb1bgmOj3Q6Pc2R2TC6JqVkk5ESw3bDyXKCkamepneg1LcB3mqP8jem76Stb5jsL Evu9GhKDlUFEWyXniG9UQqIzWCjgan+yKRkk4lxKv91GxrqbTyTM6221BoZRLMwVbCCHzrTMFPvc4 aVSpcOzixOvlaQ9n/GlI7lWPJScrM7o38qYfkJGFWejeu+53wHU4dj8gyiC+yiHO0SkV9xzP9wlPS tbLTEhiLA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1ivJQG-00032F-LC; Sat, 25 Jan 2020 11:16:16 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id B8AFF980BB0; Sat, 25 Jan 2020 12:16:07 +0100 (CET) Date: Sat, 25 Jan 2020 12:16:07 +0100 From: Peter Zijlstra To: Waiman Long 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 Subject: Re: [PATCH v8 4/5] locking/qspinlock: Introduce starvation avoidance into CNA Message-ID: <20200125111607.GV11457@worktop.programming.kicks-ass.net> References: <20191230194042.67789-1-alex.kogan@oracle.com> <20191230194042.67789-5-alex.kogan@oracle.com> <20200121132949.GL14914@hirez.programming.kicks-ass.net> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <714892cd-d96f-4d41-ae8b-d7b7642a6e3c@redhat.com> 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 Fri, Jan 24, 2020 at 11:46:53AM -0500, Waiman Long wrote: > I also thought about that. As you said, it can be hard to guarantee that > reliable time value can be retrieved in a timely manner across all the > archs. Rememer that this code is limited to 64bit archs that have NUMA, my quick grep says that is limited to: alpha, arm64, ia64, mips, powerpc, s390, sparc, x86 afaict, x86 is the one with the worst clocks between the lot of them (with exception of ia64, which has been completely buggered for a while and nobody cares). > Even if we can do that, we will introduce latency to important > tasks or contexts. I like the first approach better. In general, the kernel has no clues what is actually important.