Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3659744pxj; Tue, 1 Jun 2021 10:11:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfyeW5ZnuKNLzJiF4W5syrRypDhHI5GWdxEI2xbgoRltivZ3K1VPs+vDu4pIocSlmic4RU X-Received: by 2002:a05:6e02:13ad:: with SMTP id h13mr22461155ilo.169.1622567473406; Tue, 01 Jun 2021 10:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622567473; cv=none; d=google.com; s=arc-20160816; b=QG7NlJYH1ltw32XgJO2uciei0++P81cnWlddhjFjAlLJPUxCvqdLfUrow1PoUB3C/W IDnUZL7TOd+hezn6ug745hrsHx+ZdVwIHLFr8jniVreXNIV/ZJH88jwaRe/pQD9kOt88 +VWv5qaiFqsFpXRaNNDjkykfYpLKhSdZu9pOcnMpqCa4CfJSgZbOUuq5WN0pOJanS1Ee kr2PMUMI7TquksHTNrWO4vuvvtUL1GEiDBzfb/yJpmNuILmN0jo0jIB9pulr6D96kM5u QwwoQmP+sOU37aW0JARf7b7SqbcItfkoCeY5SsugVji+737XbrfQ3Qfzgmuuq7chJ2US LpPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=DwIQ5fCKbS7lruW8uPgbsFvtLwOq8AmghQE1Ktq1gtk=; b=gHbf/9ni6ZYNvVvSoKYjTpdR/H6N6w7SyCb9/TaunJ9bJjMdqlpZSeSe/sxEeDLOLK K0oTa0JZkPtHOEljGEpu9JKeM+tGvOaDtiyBifpZUFoLk7r8KDpI3gSL4+Zvu5sK8ZjB 6YmyI9uUp5KfgDzD/GLkBoylKAw93+ZI+kOTyPCWM5cxfQ6hISKdvcCDRLJWhEen1qXa U+fBc7+ixxw6C8h+9y6022p24PrpjAAQabQmlosOw64yWzsUEpLtR6yZx8QroeuXh56y UbMA61cZK3PsaSiBndorg2NJ/1Z9jiLoJ/7PFVXlNV04z5QcfBNj210lnpH2Zpt65T2+ N6VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fvTpPsh3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w12si15469427ill.144.2021.06.01.10.10.58; Tue, 01 Jun 2021 10:11:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fvTpPsh3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234570AbhFARLo (ORCPT + 99 others); Tue, 1 Jun 2021 13:11:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:56184 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234228AbhFARLn (ORCPT ); Tue, 1 Jun 2021 13:11:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 215E8613CD; Tue, 1 Jun 2021 17:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622567402; bh=Pe14x4wYEjy5Woh+XA7xkKOEsS+4eNlZfe0uzDsv9+E=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=fvTpPsh3V6l2qm2oRMS7RNJyzR2mTKGIFSeuityttlia9IiG8YMztTz/b84FqKOmE S0j+ckcnoXriiiKPIVQZMjIoYWg3h+v/x6iUDjM20QIIZzC7zQc5quGMsX+WCAwLlK aaOwYIKSjae7QZXWXjGd6f3cuXbvRE0vj3B1mUWh41QjiyJ0QUHqu2PBTYZ3dLcTSR HjGLFmerfS9z0wfzJvIwkjfT7cQT8konIzjVye5/ZPcXXXPnvM/XPY+hFN3osp/t6P bLoB/hBtAzyGmpYwDS76Bt8mI/PGZJI1aCDfDOBR5exR3botdeDrommk6weooiUE9b 3UFWQzBAn3ICw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id EAF7C5C08EB; Tue, 1 Jun 2021 10:10:01 -0700 (PDT) Date: Tue, 1 Jun 2021 10:10:01 -0700 From: "Paul E. McKenney" To: Andi Kleen Cc: Matthew Wilcox , Feng Tang , kernel test robot , John Stultz , Thomas Gleixner , Stephen Boyd , Jonathan Corbet , Mark Rutland , Marc Zyngier , Xing Zhengjun , Chris Mason , LKML , Linux Memory Management List , lkp@lists.01.org, lkp@intel.com, ying.huang@intel.com, zhengjun.xing@intel.com Subject: Re: [clocksource] 8901ecc231: stress-ng.lockbus.ops_per_sec -9.5% regression Message-ID: <20210601171001.GN4397@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20210521135617.GT4441@paulmck-ThinkPad-P17-Gen-1> <20210522160827.GA2625834@paulmck-ThinkPad-P17-Gen-1> <20210526064922.GD5262@shbuild999.sh.intel.com> <20210526134911.GB4441@paulmck-ThinkPad-P17-Gen-1> <20210527182959.GA437082@paulmck-ThinkPad-P17-Gen-1> <138f81df-08e1-f96e-1915-c58b44f96a41@linux.intel.com> <20210527191923.GD4397@paulmck-ThinkPad-P17-Gen-1> <20210527210524.GE4397@paulmck-ThinkPad-P17-Gen-1> <7bda8e6a-2179-b431-973b-d074cd8d93db@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7bda8e6a-2179-b431-973b-d074cd8d93db@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 27, 2021 at 05:58:53PM -0700, Andi Kleen wrote: > > > Only those cloud provides making heavy use of the aforementioned "poorly > > designed" hardware, correct? > > If any such hardware is deployed in non homeopathic quantities, we probably > need to support it out of the box. So far I'm not seeing any evidence that > it does not. > > That would argue for including the patch in the patch series. > > Especially since stress-ng is somewhat popular for system testing. Except that different use cases need different out-of-the-box settings. In addition, there is a range of consequences for undesired settings across these use cases. Fortunately, the various distros and other kernel delivery mechanisms act as different boxes, and can provide their chosen out-of-box setting. Of course, it would be better to avoid adding an additional setting. But as we will see when considering the following use cases and corresponding consequences, that setting needs to be to mark the clocksource unstable if that clocksource exhibits persistent read delays, that is, as the v15 series does -without- the out-of-tree patch. To see this, consider the following use cases: o Bringup testing for new silicon, firmware, and clock drivers. In this case, it is critically important that any serious problem be unmistakably flagged. After all, these activities are all too often carried out under severe time pressure, which means that subtle messages are likely to be ignored. If there is a hardware, firmware, or driver issue that results in persistent delays, this issue must not be ignored. Hence the absolute need to mark the clocksource unstable in this case, in order to avoid releasing hardware, firmware, and clock-driver bugs into the wild. o System test for new hardware, including multisocket hardware such as that denigrated by stress-ng. Although this use case might prefer that clocksource read delays be ignored (as they would be with my out-of-tree patch [1]), there are a number of good-and-sufficient ways to deal with the current state of the v15 series [2], including marking the TSC stable, specifying HPET at boot time, or simply ignoring the fact that the clocksource gets marked unstable. o Applications running in production that suffer from stress-ng-like properties. Such applications might well prefer that high-speed fine-grained clocksources not be marked unstable, but the workarounds for system test apply here as well. Furthermore, such applications are likely to perform better on a single-socket system than on a larger and more expensive multi-socket system. Thus, marking clocksources unstable would be a good hint that adjustments would be helpful, whether these adjustments be confining such applications to lower-cost hardware on which they are likely to perform better, or reading a certain book [3] and applying its lessons in order to adjust the application to improve performance and scalability and to reduce the interference with clocksources. o Scalable applications running in production, as in those that do not suffer from stress-ng-like properties. Any such applications that are sensitive to clock skew in excess of 100 microseconds really want the v15 series without the extra patch. After all, if there is a problem with clock-related hardware, firmware, or device-driver bugs, it is far better to have that problem unambiguously diagnosed than to have to wade through strange and misleading application problems caused by clock skew. And please note that this is not a theoretical problem. After all, an earlier version of this series already spotted a very real problem that was addressed by an upgrade. So if there is only a single out-of-the box option, it really does need to be that provided by v15 of the patch series. There are already settings that can be used in the use cases that care, but if these prove inadequate, again, I can add another setting via a new patch, perhaps based on my out-of-tree patch. Thanx, Paul [1] https://lore.kernel.org/lkml/20210527182959.GA437082@paulmck-ThinkPad-P17-Gen-1/ [2] https://lore.kernel.org/lkml/20210527190042.GA438700@paulmck-ThinkPad-P17-Gen-1/ [3] https://mirrors.edge.kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html