Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp405164pxp; Fri, 11 Mar 2022 06:39:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyvx+h3fqitUIeeWd6X1TaqWQqKQPEyoxQdz35qjvHyGHydZF2wlW3rTM6tQp2ZAHzWjFQ X-Received: by 2002:a17:90a:fb4e:b0:1bc:8227:edd9 with SMTP id iq14-20020a17090afb4e00b001bc8227edd9mr10994540pjb.56.1647009551603; Fri, 11 Mar 2022 06:39:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647009551; cv=none; d=google.com; s=arc-20160816; b=Q5QqwBK21gjgGcLvMDVV41ZH1QfC60bb96VgVsi1e4ECPin5XtK3qb+Oap2R628Bxc RpEzwIJ9ywfNL3Kr1zex/nXKe68iCmjndu4zUgByQ72/9E36X67T9MuZsHeYfIPQaBIF ro6Mpgwmu2T632b6+L4K4mRFsiozQXAZoYrop0GX3RmKRXXUc8C8l58gbMdMccdNhWQC udz5ChV8/DlXZ1RiVrPYzpGm2ta//GfyluvzzXuW9WlEAf9G5zv8lTXcLxSeXZDxtusg 1FgPEhEi2eJ6Ltkf103TrEXFAjICGOXu/+pMcUNzeIqRXV3excAkVuwDHeGvHOsZ4LmK Sr6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=DLr3mQYXmDHbd+LBhBUi7dTKTmk6a0trl2Y2FAGkhQk=; b=HJXmjk33TW9rt5bWq55HZuqH7ImIMXu5N1yu5XGHRyKi1wfxwkz6mNmeAQUFXSoLXD +iBIZFWNphCOLgtIjTnt5FUbbRTdMyankV597pwxlucI0jV2OvZ3vqBizZi+NfC5hnw9 iXu/YBq3Np51fp9TU0v5UWt8tVdkHjwmUG36Z7a7dBwXUnCcatInPNkx+hIwKlawVq/E GiLOcfnTas1vfeYDriTIQzIOaYJ3cMi5J1cblfxuM7i9UdgTkPmPRak0gVBL8DxhzIGg p5Yeq5tLulpT2jGCKlBogEVQql6vbIBCwYDBqhoX9s2SkCzMrLCZlWD1zM5+OghyLqIE WfWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="I/+Xd9Jv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a63a849000000b0036ff8789c9bsi8171454pgp.25.2022.03.11.06.38.53; Fri, 11 Mar 2022 06:39:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="I/+Xd9Jv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244799AbiCJUd1 (ORCPT + 99 others); Thu, 10 Mar 2022 15:33:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232725AbiCJUdW (ORCPT ); Thu, 10 Mar 2022 15:33:22 -0500 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B022F3284 for ; Thu, 10 Mar 2022 12:32:20 -0800 (PST) Received: by mail-io1-xd34.google.com with SMTP id x4so7872383iop.7 for ; Thu, 10 Mar 2022 12:32:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=DLr3mQYXmDHbd+LBhBUi7dTKTmk6a0trl2Y2FAGkhQk=; b=I/+Xd9JvfV4nd6qZCvwS8Ojf1XjyRTKJ2gaOyW9PLvPZXe72yXxjTZDQVFwtIOA4CD 7gj7jC/qRFTME2IISxgQqFam3G3Cee2O3wpazRsMEMN0TEh3VVhYaDwyCKAK+rlwrZ7b 5z2UClc6rkg6OE+PGBWlvmDS4qeULrf+P2Kiw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DLr3mQYXmDHbd+LBhBUi7dTKTmk6a0trl2Y2FAGkhQk=; b=VKIXqVGoohL2NcoMeYG6HiBOtoxkRg3Ml//F6aW95lydXH3dZdAUnFM3mfj+O1Hl4j rzsfoKGPkPjMsL9Q717560+S29uthoZlRpCuVK4r+OKUajGI+SEZ12kunSHad+CWNUTq M4bT5Me6M+aSR8sL/YEtf2n5vOSvcz/8KJsPsz2FfsFZVuqmpK2u2yRpVarCUSeiShH2 krpPIYAkQ/Y0aem49qKRDpCqL7ZZ2XGH0yjLaANafZ/Q6HiCJ0wnIKQGo9qaKK2bVNVJ bDHceNbzONV0HcMEIqjhULJ16fpd1BBAmjEt6NXkLCi0ePqSwxx0nVbf/lQOHY1c3zkq ETHg== X-Gm-Message-State: AOAM532pwY7ch3nTl1TjPqxGxxNA6/z4YOP6Iy17Sk1sSOJ2EbZceR4G E5hX+p8PZ9Rcz0MLoRAiT1KEcQ== X-Received: by 2002:a6b:ce01:0:b0:610:8f2:3b7 with SMTP id p1-20020a6bce01000000b0061008f203b7mr5389673iob.25.1646944339851; Thu, 10 Mar 2022 12:32:19 -0800 (PST) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id b10-20020a056602000a00b0064074921986sm3169961ioa.41.2022.03.10.12.32.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Mar 2022 12:32:19 -0800 (PST) Subject: Re: [PATCH v3] selftests/resctrl: Print a message if the result of MBM&CMT tests is failed on Intel cpu To: "tan.shaopeng@fujitsu.com" , Fenghua Yu , Reinette Chatre , Shuah Khan Cc: "linux-kernel@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , Shuah Khan References: <20220304103957.487660-1-tan.shaopeng@jp.fujitsu.com> <9647f7ed-6a02-8603-0de4-3292d4d13157@linuxfoundation.org> From: Shuah Khan Message-ID: <480705b1-6f22-e129-2db0-2a9c5841eacc@linuxfoundation.org> Date: Thu, 10 Mar 2022 13:32:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-2022-jp; format=flowed; delsp=yes Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 3/10/22 1:18 AM, tan.shaopeng@fujitsu.com wrote: > Hi Shuah, > >> On 3/4/22 3:39 AM, Shaopeng Tan wrote: >> Also need to be rebased on mainline latest > > I will rebased on mainline latest in next version. > >> Why is this a global? I am not seeing a reason. These detect_*()s could be >> moved to resctrl.h and get rid of globals. >> >> Instead of adding intel check to detect_amd() add detect_intel() or is_intel() >> and have ut return true of it detects intel. > > "is_amd" and "is_intel" are called many times, > in this way, detect_vendor is called only once. > You can do the lookup once and save the value to return for subsequent calls instead of using global values is_amd and is_intel. thanks, -- Shuah