Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3595782lfo; Mon, 23 May 2022 08:50:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVo/qfPPQHa5tP88Jj0Z+yeKDhiLIQCBo5nM+3Qb549cyWfBlewTWmTLirHTB4Fnb46Wcm X-Received: by 2002:a05:6a00:10cc:b0:505:ada6:e03e with SMTP id d12-20020a056a0010cc00b00505ada6e03emr24249487pfu.45.1653321017856; Mon, 23 May 2022 08:50:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653321017; cv=pass; d=google.com; s=arc-20160816; b=NbtSMhX/fBY09vUlWQkTF6n8WLQ8Ew//pIBofj1gQZVtYEHzz9wSqSWOfh58oxDG8E w5bR7Fns+6M4Q/nlfNbulXac0pT4nHxgJdPa0rQsV2QE4Chh4hHtPt6qzZq72McctZGC WDruJemBCTzpeWanWRNROEsQJtQX1VIOkDE1jw0QYHUA6DgvW6sCbaU202FfXqgYXzvr 7YJjbePAkERZcC3ThgCJFCHZeXC3KQLAlw/Qb8IiX4GSDRVnxrE4D4BSjs4xZUcIpgw6 ZghBJl4Kh1uR3y0DErFMOxfpjUCXNXBa08HiEHmOVL15sJT3sEcb4kk6f8mYYxULhN77 hwiw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=8Cf3Dq1DM7KKXdwPbloDRjYQ7LEcmTCQBN30hoMr0e4=; b=humctxXzJQLcoVOfLCo3YVSkCKURJlpa2BUVUoaDibywcscaIVxQBXOM9xhCWXM6lT Fdd9Uyq3h9+oDVNj3WLbg837vXgFg+nWjqZTxNdNOARZm5NppPVHkUbImCYyqiAmGHLW mFR4Ufxj7aweStwWRzOr3dYns5dydeizIaU18rQ74taApO1GC1dBFYuP1tqr3OvPh+Rp 3zkyEyguyRnaQi4PkJ7oUFa5oQBM+S2pfK30gV95Okga7O5tzwAv+0K/sYgcP0NsN0jK kUcsiLYFmZsBtKjQsGbroF17oWxwmbDdrp1xBZe2I9dWPJX2iWQg8MAJHxx46Adof/Bb ZSsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=JnHkLckr; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r186-20020a632bc3000000b003fa58561739si3994290pgr.669.2022.05.23.08.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 08:50:17 -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=@amd.com header.s=selector1 header.b=JnHkLckr; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E049C35269; Mon, 23 May 2022 08:50:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238194AbiEWPtv (ORCPT + 99 others); Mon, 23 May 2022 11:49:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238176AbiEWPts (ORCPT ); Mon, 23 May 2022 11:49:48 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2084.outbound.protection.outlook.com [40.107.223.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB09B3EBBD for ; Mon, 23 May 2022 08:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=licN+6f/3vdruR9xJ/wUdOPZ9Wjx4XPw5yRFBqYz9/CgkqNJscR3TNY2vd1IgjcAsoC+aJryVhyOHFYP1iyl2JQicGjJ+cbSpx/EuL3p0YriDKqvGCczAvMpOw2SPtVWIKe713dATA0dRnnlIsZA6koYxlY5KyJXRMyEC+wGgknQgTNXKfPzOLvxX5v3yD9H6SgcFC9Dlr8B5wjrpvwS1PY3y8ooB5aPdRNbQjBi0z1vWlOdlOLG43VdJIdHqwojttoA6zyoLiYWfM/l/BHp6wisYOqJ/3gL2GczJkvsa9TcYYoMp9frqAU/8DKulgrP9MU4qWbtxiveeSXP9RULMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8Cf3Dq1DM7KKXdwPbloDRjYQ7LEcmTCQBN30hoMr0e4=; b=G+pMNixjBR6/AhJ61M9reoas0FX2DxyjYYtpR8xHF8Sh7c6D5KYwHNJomNtCRWthzoOXj1zywNYI5DjkPLdNUfHa5ZdJ8QaShwWS/uBMCc8MoMzMzrEMEqEgBlQ6vMb/bLrpCT3qGEv6l4PwGuA8fUSpGxLxJ4Zc3t/YyrP1aZEDUMxKAPu69Oe33/gOIXq2MzRssJy1i+fzHjcheJ86XDN0kfOqsTqYJ4xvtPbSVwtEL2oMQRO3qLZDg8CzrdEkMRLX2VPfbfDMtJgEOmWvZmu+sSXQ1tbIYZNXW06Y6rJ7eot41tD5fguljxa+STy57D35mgfsvrUFZ9u6jHGz4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8Cf3Dq1DM7KKXdwPbloDRjYQ7LEcmTCQBN30hoMr0e4=; b=JnHkLckry7UVGd5ulwzWuEOH2vSfRcn5ERCtX+3EJWPk/yOtE16pUZHMgTAYoLHrdy+zYfWmoHBtSuqY5+Vh2hhozj6ltiSfTIV/PK6pV7FMsdDqhMXUNv/HWooOVBsD2+NsOCIFoaFibgJmTJv71zcKKlcduoEMgZ4RlFLriNs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BY5PR12MB3876.namprd12.prod.outlook.com (2603:10b6:a03:1a7::26) by IA1PR12MB6412.namprd12.prod.outlook.com (2603:10b6:208:3af::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.22; Mon, 23 May 2022 15:49:41 +0000 Received: from BY5PR12MB3876.namprd12.prod.outlook.com ([fe80::6c89:168a:a0d0:2f8f]) by BY5PR12MB3876.namprd12.prod.outlook.com ([fe80::6c89:168a:a0d0:2f8f%6]) with mapi id 15.20.5273.023; Mon, 23 May 2022 15:49:41 +0000 Message-ID: Date: Mon, 23 May 2022 21:19:22 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v3 2/3] x86: Remove vendor checks from prefer_mwait_c1_over_halt Content-Language: en-US To: Zhang Rui , Dave Hansen , linux-kernel@vger.kernel.org Cc: Lewis.Carroll@amd.com, Mario.Limonciello@amd.com, gautham.shenoy@amd.com, Ananth.Narayan@amd.com, bharata@amd.com, len.brown@intel.com, x86@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, peterz@infradead.org, chang.seok.bae@intel.com, keescook@chromium.org, metze@samba.org, zhengqi.arch@bytedance.com, mark.rutland@arm.com, puwen@hygon.cn, rafael.j.wysocki@intel.com, andrew.cooper3@citrix.com, jing2.liu@intel.com, jmattson@google.com, pawan.kumar.gupta@linux.intel.com References: <410f36ccecb36644e196d71fef6e46bdc186b409.camel@intel.com> From: Wyes Karny In-Reply-To: <410f36ccecb36644e196d71fef6e46bdc186b409.camel@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0051.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:98::13) To BY5PR12MB3876.namprd12.prod.outlook.com (2603:10b6:a03:1a7::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4bb4a0cd-e6a6-4794-4952-08da3cd3d991 X-MS-TrafficTypeDiagnostic: IA1PR12MB6412:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RWMLsD/AmhMFgRNfaJXijwb3hbcu97yIwNZvWu2I/61a4Dd0U0iTFqOrPLwu2/1O/mBvxuuwepJmDBWZ62dsGvMxBaCb3g5qof+VQSxXecML6An9MlSEqrEmBy7S6xZl2tZSm6kqk9qsMNOLmszVAhOT4fH0pmEiUwFavq8YnvSepqyl9CVUoHH7t8cghAIUjXMwpfgtu2H1zRxpzXxtYx0/PNljmaykLYP/ztjpBtIPEI+XIFaKiLpSjOdXGtqC0S93/Xupyk3HneRW1nTnjeVts6nHzI4zUM8AZ+xEfknxb66hA6MimHlHAdzMTkeRtRfLH6VXekfcfZNik4BP0BUy5HPHqu+o5lO2bt9DxR3v/+a3RAnrpZmtdoNeb80OJqfbFuZujceiLqZnSv/apuxV7COgJ8HSMIw86R7izoxF3jhzXIpzWO+IHQF7C54mp+yH9iQEHcRjIBR9tyIEJYDoH+VJyrVfFue4Yeku6V4M+mefUvfQJ/8+mUGnUSEwxwYZARlRChxuyoCEtlDO3enkTv2LE/Hyhjfca0WjAjZ5zqJ3h9DW/2TCNqhMA3drxkxpsQnK9C1w9OPkv6TXircDCMhfkTQPAmKUM+OhTkpqqbrHwhpCoQFnSQOoA/4cjCo2r+WqomTJwJf5qnkomxfRutkoZNvE4pZhs2x72yPE2Fv8Oiz/zCOs4lwTfziqhSQqEK2M9j/n0GblXgBZzqgpczHUfdA2ETXiLV+YCWQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR12MB3876.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(6512007)(6666004)(6486002)(6506007)(26005)(53546011)(508600001)(186003)(2616005)(38100700002)(5660300002)(110136005)(7416002)(8936002)(44832011)(4326008)(66476007)(8676002)(66556008)(31686004)(36756003)(2906002)(83380400001)(66946007)(316002)(86362001)(31696002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UmsrMWdMZ1cwZFMwVTc3UGg1S2JGQ2cvYkd1VS9UY1BJbk1CbnJ5K3J3eFgw?= =?utf-8?B?dEFacUlUaUl2ZE9UTTcyT0xxSWNDb2ZreW81bnJDOGlCU3dsNytrMkxrd2xq?= =?utf-8?B?azNnT2FZUFUycGhhM0psZU5ES1NnV1c0ZmVOem5rYXkyUmxVcUNLV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tcHJMK2s3Z09zbm8yZ29mT3VUZEpn?= =?utf-8?B?Y1p2NnMrMTRYeUJ2SGpSWCt1WUk5ckQ5TzVtc2Jmdm8xaHlLTVBrODVmeDFl?= =?utf-8?B?eW12Vjh4OUpaMGRGL1FZK0hLUUc5MjVwa0YxYmduMXEycG1aWmtPbS9RTUN5?= =?utf-8?B?dkFDekEyUUpwMjJxajRiT2lubGxGWlNwY3BiSk1wYW9rK0dxbHpnZGhPbUdE?= =?utf-8?B?M0dEektyYzRSWG5OZzJRTzZ2bEtycHpQUVdtNzFCcTdRUFQ2ME5Eb0lleVFa?= =?utf-8?B?anhYd0NEbjc3VTl3V3A4WFZkZEVQUjFOWkZKMFlSMkpGKzBiUmRYdUtiRDNy?= =?utf-8?B?Z04yTlRWeDdpTXJXVmNpSTlmSHdpNStxeGE1SHBzTFJnUitHR256dz09?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4bb4a0cd-e6a6-4794-4952-08da3cd3d991 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB3876.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2022 15:49:41.5883 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zBAobdthASoirzS5FSD1zrUUPO2pl2U+mJ3taLl6uTsw+CKYcHIP5Tz1DB56PWxfBF5XIVgjfZzuzwkIu6f74g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6412 X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hello Rui, On 5/20/2022 7:13 PM, Zhang Rui wrote: > On Thu, 2022-05-19 at 09:00 -0700, Dave Hansen wrote: >> On 5/10/22 03:18, Wyes Karny wrote: >>> static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c) >>> { >>> + u32 eax, ebx, ecx, edx; >>> + >>> /* User has disallowed the use of MWAIT. Fallback to HALT */ >>> if (boot_option_idle_override == IDLE_NOMWAIT) >>> return 0; >>> >>> - if (c->x86_vendor != X86_VENDOR_INTEL) >>> + /* MWAIT is not supported on this platform. Fallback to HALT */ >>> + if (!cpu_has(c, X86_FEATURE_MWAIT)) >>> return 0; > > I'm new to x86 code, a dumb question, what about the other vendors? > with this patch, prefer_mwait_c1_over_halt() can return 1 for other > vendors as well? This decision tree is based on cpuid features, so if the processor advertises MWAIT C1 support we would be choosing MWAIT. If any vendor wants to avoid choosing MWAIT (even cpuid shows MWAIT C1 support), they can explicitly mention. Will add exceptions form them. > >>> >>> - if (!cpu_has(c, X86_FEATURE_MWAIT) || >>> boot_cpu_has_bug(X86_BUG_MONITOR)) >>> + /* Monitor has a bug. Fallback to HALT */ >>> + if (boot_cpu_has_bug(X86_BUG_MONITOR)) >>> return 0; >> >> So, before, we pretty much just assume that all Intel CPUs with MWAIT >> should use MWAIT C1. >> >>> - return 1; >>> + cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx); >>> + >>> + /* >>> + * If MWAIT extensions are not available, it is safe to use >>> MWAIT >>> + * with EAX=0, ECX=0. >>> + */ >>> + if (!(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED)) >>> + return 1; >>> + >>> + /* >>> + * If MWAIT extensions are available, there should be least one >>> + * MWAIT C1 substate present. >>> + */ >>> + return (edx & MWAIT_C1_SUBSTATE_MASK); >>> } >> >> So, I guess the "If MWAIT extensions are not available" check is >> consistent with the "always use it on Intel" behavior. >> >> But, this would change the behavior on Intel systems that both have >> CPUID5_ECX_EXTENSIONS_SUPPORTED and do not set bits in >> MWAIT_C1_SUBSTATE_MASK. >> >> Is that a problem or an improvement? > > At least Intel processors since Nehalem have MWAIT C1 support. > For elder ones, need to confirm with Len. > > When no bits set in MWAIT_C1_SUBSTATE_MASK, it means MWAIT C1 is not > available for some reason, let me check if I can make this happen or > not in real life. > > thanks, > rui >