Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1079201pxb; Wed, 6 Apr 2022 08:13:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwE6FdLweIVlI8CM12RjHvYOYc1psHr3eKoX11hGOnYAysbhNqdgDb5D+m6HZpeFmD6k5Zy X-Received: by 2002:a05:6a00:1687:b0:4e1:45d:3ded with SMTP id k7-20020a056a00168700b004e1045d3dedmr9423646pfc.0.1649258010457; Wed, 06 Apr 2022 08:13:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649258010; cv=none; d=google.com; s=arc-20160816; b=qO+OwFeJEqqdQSVp9/pr6UCi86HIATMHHCroRCgBAd2S++2NWfsYTd5KVBx3Mi5K+W tFnckhrsAxiFW51bl0vfLn6bEAIpdYL4xo0kVHBO5RGwP2sF7e5t6ot9mzbILvnSVTFg tUjulgMqaOPh+zlP8kKoGfuDvdh4gefAVW0EC0T2NqLgh1/E2s77+hXmiBmX8vhHUQxM achfD7QVyJakI+Z6iH0OClrNgZX21S3JGHRXR8Bf25up9EXMog/wLj6M5T8Mz8Gp+Ixs EOU7ytadq199VYojFruc3WHeHY76PdnT0dc8RwjpR4+BS8pN5FnM9seXn/l0PFhp/7La cIrA== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=xNgJ94p4O9/k4M97cHEVb1as3sdFhq6bklaCMoaeeII=; b=m9KQ9GjLiS5cNy8wcrilkbfd03DrzLOoZvhdaAMYIoiAKG0dL+gUnU5+HeLT+XOdCe CKO+Hd1qXjUkocQwvijNAKh32d1quMuDzBkv0lw5Ynk+1tUusD9lq/te/0Zj7RhG95ad hwbvgTmBBqyEQhZ4i1Ne70h0SBXFWNblIoWextx4wUty+b12jUccBs5P+yddmD4ExgS6 fQXuUKWccEjDFqiX9g8//vfedwi1QT60anZBAJOqCwguE+lpPtN0+hMBBYbsU1a1iXq9 ybkc/cx076Qvatx/lVaU5YatJJ3APoTTd7jVjkAWEDflm7kbXFKBenre1tErQmTEplUu uOjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=D+gBk2yu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w18-20020a170902e89200b00153d0245643si16239080plg.270.2022.04.06.08.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 08:13:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=D+gBk2yu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2A53847F12F; Wed, 6 Apr 2022 06:02:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231574AbiDFNED (ORCPT + 99 others); Wed, 6 Apr 2022 09:04:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232684AbiDFNDI (ORCPT ); Wed, 6 Apr 2022 09:03:08 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C68C72EBA52 for ; Wed, 6 Apr 2022 02:31:21 -0700 (PDT) Received: from zn.tnic (p2e55dff8.dip0.t-ipconnect.de [46.85.223.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 68EC11EC0426; Wed, 6 Apr 2022 11:30:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1649237434; 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:in-reply-to:in-reply-to: references:references; bh=xNgJ94p4O9/k4M97cHEVb1as3sdFhq6bklaCMoaeeII=; b=D+gBk2yuR9SEsd0Mv7pdVbeS7OW8wP5r2HdSNg67PqFOGHrMF+/DzjFd/Pq8IG0O5zy7IV Ol/u/cWZT9AO/A0GloXQeM+lXzxx4ahCQ7gQ/o0eY2iT7BI6lPqXnuAQ3tA+Z4b87twfSs ZgpQ9pnqoLP/toYJxz+T+U7qmAJSz+8= Date: Wed, 6 Apr 2022 11:30:36 +0200 From: Borislav Petkov To: "Carroll, Lewis" Cc: "linux-kernel@vger.kernel.org" , "peterz@infradead.org" , "dave.hansen@linux.intel.com" , "Karny, Wyes" , "Limonciello, Mario" , "Shenoy, Gautham Ranjal" , "Narayan, Ananth" , "Rao, Bharata Bhasker" , "len.brown@intel.com" , "x86@kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "chang.seok.bae@intel.com" , "keescook@chromium.org" , "metze@samba.org" , "zhengqi.arch@bytedance.com" , "mark.rutland@arm.com" Subject: Re: [PATCH] x86: Prefer MWAIT over HALT on AMD processors Message-ID: References: <20220405130021.557880-1-wyes.karny@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 05, 2022 at 09:49:27PM +0000, Carroll, Lewis wrote: > Just when I thought I was being thorough. Any of the above will block the > cpuidle driver from loading. As will absence of _CST ACPI methods (add that > as a fourth cause). Yah, put that all in the text over prefer_mwait_c1_over_halt() pls. > We will have to see what we can sanitize. The original performance observation > (packet loss in a networking application) led to discovery of lots of cycles > in the various go-to-sleep-via-halt and wake-from-halt-via-IPI functions. Wyes > collected the raw data on the relative idle+wake-up latency and included that > in the commit msg. Think of that delta as the root cause of the performance > regression in this case. You don't have to write novels - just leave enough breadcrumbs so that people looking at this in the future know *why* this was done. > Yes we are saying use MWAIT instead of HLT on all known (as of today) Zen > uarch CPUs (AMD >= 17h and Hygon). Wyes in his reply from today says that the logic is not that simple so you folks need to define clearly which cases are we talking about here: Zen uarch, MWAIT CPUID bit set/clear, MONITOR bug, , etc. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette