Received: by 10.223.185.116 with SMTP id b49csp5324393wrg; Wed, 7 Mar 2018 09:51:00 -0800 (PST) X-Google-Smtp-Source: AG47ELu1PtbyA0FWCLKiWwYjZbvme7/OZrraiv01eb+7b4JkaYvDTVTaH42hp/2pjK66wcupbu0r X-Received: by 10.98.138.66 with SMTP id y63mr23381442pfd.12.1520445060539; Wed, 07 Mar 2018 09:51:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520445060; cv=none; d=google.com; s=arc-20160816; b=vzccnsQSuO+av9/19v0BKV6B5IZP7FTbLnTsD0OHBsVFsHIduMtS5vzGJnCyRoGMnN SuIpDyjBL2yO39sA2/RfC3EYhSgXIMh5HWAZq9Y6Ew/QJFKm/8wR2EIRV/jdKK59+czA ZvddIvsu74gFlMW9Y9Y4rmbd8RZ2P7Mk1iqUlsS6Nk9UQ53CTVq0SKEbyc329PYAATIP ubwNlrrmUE5GiGjAjqFyG4SgNdv6/DWjqnfP7W5MCoCDKv7rPisgGwNsLSKrL+Wt2WSV LahWEdQVH3r+crXFCS4IDu+0WosxQxm2+utruM2lbAig36Whjx+LgdkwuiNU0FjFkH0V Ztlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=SPDhmKgSC/rCpHLj7yZkIDFxZh1WbQ9LQ9PxufAaIlA=; b=E5cay+ZBkngdkCC5JTcmRffoAChii+kCK81s4LbT+j44xrRue/uDe7cDOgLFaSSL3n WfvWsysPb4/3p3RD7njNFiwxvtOw1CCnVXw1p4pEkO+gqEFN20v3+Npjr/kmsO9aFYzO MbsSrSM5GQkgBljN7Qb8ZVE8rd0r1f+SlcHhZCOca16iJB8dOzmSnEhr6UUy+A7YbW4G an3103l+n/B7JBfHRRug4gbEwPEDvlB/4WRF3dlOIntCguHBMBvMKTKpgu/WwrBmxwul vjWqT+c1HuLknVSW86PojYShxaVLjqFxvucW4KChTK173jSOiyMALUUCDQCuqPZTTXk6 NiKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=bxoh5WSJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y22-v6si11695940plr.174.2018.03.07.09.50.45; Wed, 07 Mar 2018 09:51:00 -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=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=bxoh5WSJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933689AbeCGRtx (ORCPT + 99 others); Wed, 7 Mar 2018 12:49:53 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:45416 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbeCGRtw (ORCPT ); Wed, 7 Mar 2018 12:49:52 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w27Hndog128235; Wed, 7 Mar 2018 17:49:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=SPDhmKgSC/rCpHLj7yZkIDFxZh1WbQ9LQ9PxufAaIlA=; b=bxoh5WSJZVaAz8Fy1bSQoiN78J2eYS5AWNSU5u/NBJgozNnf1pzXuouSsYlszLrc+S/w NMGOqoI1seajgEgliYSo04zdSHpI9IM/kKO4NfTsB9yEi5JtVGfa5gR/Alfrs1oyj+yI PJyB2gJXKlWFJezSm+Mwc6qxwD8Hd0I1CvR4oI/b+TwsjhCQePfTAq6U0gfd4h4veGoo IvF2KoeoQrrkxxGYzhDiz26Dak+Dw9iqT2h5WSj23TAHH18LfFHZhjwGFDgDKsRmdZAR a4jL4blOq2XRGBMvhwqMnYCzWlOxkhK03MwQPV4JmoRS8oOePQj8asADbwy+1F7iu/Xl xA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2gjkepgg0v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 07 Mar 2018 17:49:45 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w27HniMc028550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 7 Mar 2018 17:49:44 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w27Hnh3T021835; Wed, 7 Mar 2018 17:49:43 GMT Received: from dhcp-burlington7-2nd-B-east-10-152-55-162.usdhcp.oraclecorp.com (/10.152.32.65) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 07 Mar 2018 09:49:43 -0800 Subject: Re: [PATCH v1] xen: acpi: upload _PSD info for offline CPUs too To: Joao Martins , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org Cc: Juergen Gross References: <20180306201209.21890-1-joao.m.martins@oracle.com> From: Boris Ostrovsky Message-ID: Date: Wed, 7 Mar 2018 12:51:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180306201209.21890-1-joao.m.martins@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8825 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803070204 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/06/2018 03:12 PM, Joao Martins wrote: > All uploaded PM data from offline CPUs takes the info from vCPU 0 and "offline" may not be the right term here. Maybe "non-dom0"? > changing only the acpi_id. For processors which P-state coordination type > is HW_ALL (0xFD) it is OK to upload bogus P-state dependency information > (_PSD), because Xen will ignore cpufreq domains existence. > > Albeit for hardware exposing Px coordination types as SW_ANY or SW_ALL, > this will have some unintended side effects. Effectively, it will look at > the P-state domain existence and *if it already exists* it will skip the > acpi-cpufreq initialization and thus inherit the policy from the first CPU > in the cpufreq domain. This will finally lead to the original cpu not > changing target freq to P0 other than the first in the domain. Which will > make turbo boost not getting enabled (e.g. for 'performance' governor) for > all cpus. > > This patch fixes that, by also evaluating _PSD when enumerating all ACPI > procesors (online and offline) and always uploading the correct P-State > dependency up to Xen. > > Signed-off-by: Joao Martins > --- > xen_processor_get_psd() is taken from acpi_processor_get_psd() > (drivers/acpi/processor_perflib.c) simply because only Xen Dom0 needs > to handle vcpus != pcpus. If preferred I could try exporting that API > instead and use it here. I think this would be a preferable approach. -boris