Received: by 10.223.185.116 with SMTP id b49csp5369510wrg; Wed, 7 Mar 2018 10:33:29 -0800 (PST) X-Google-Smtp-Source: AG47ELvyOIX2aPhAex7icZKtBsi3gitbpX/32gEkXIKDFsZtCa8cQ2aDb0qHR4xiIrD9jEOhLn5v X-Received: by 2002:a17:902:b185:: with SMTP id s5-v6mr2207263plr.109.1520447609257; Wed, 07 Mar 2018 10:33:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520447609; cv=none; d=google.com; s=arc-20160816; b=G7pdxT3MFJQTbGrixDcdJtBU30z7EAWQ3PHUTHrP5Z6FxcIR3DatUDFoBt9YZ7bQOm 2Mf+9XsecRa22jHTmc1iCJxg+uEEMPHywz9qu2QOAMpk8YAVEcBdnKMFF+DvRB20JNCi 0TpQUPNBvLBgt/C2Qr20g8mmWT48+01kE/boJvEy1NUW0FMJJh8tCps7LcIMRpW3g4IS RGxqtfp7ALjf9GCl5FAeZr2ECPlNKaYs2Y//6ruJX2fFZ0ZIrSHIQPC1plmiFR49kyD1 gPsP219C9BoNcSw2N6jD3pP97iQysyRxq9yrNx+P3FJ1tvs1pcnmEgRFAK9Sts9lgg8n JlYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:date:message-id:from :references:cc:to:subject:dkim-signature:arc-authentication-results; bh=p+cFLDi35Tes9IJi649Rw3/oy4YbWiV3JGdAdoXdKRo=; b=lmSsJKwifLnRqsiDeDN5KBC4jSM2dITZhUS30KV2cY8ecIYEN+/JfJZl+vlDIS/Fht tXoK+kG0kg+5bGsSdufEb87jOrReQ1vQf1sl97GiZhVv3FZNPfWa6HCnCKYgUhbrHlue U15kFjXuU3Owcsx+bslYzo+SziBhdun94nASfgCvbUpL8OhQ65OL8x4+ZUFbMcsSmktL wnXaG4TIxlUfE7UmanxMKihu9aMBMDsLtJ12E388CszNdnEV/y5n3JiBA6ex8uPO5FJX QXRwyX9gptDt4Ml20XtNDWYMAh2cGa4TaDczHH69YdB3pxOYBO+kxEh+9srx9wK7LNqp U0Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=kCsSe3Vx; 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 j15si11647729pgv.676.2018.03.07.10.33.14; Wed, 07 Mar 2018 10:33:29 -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=kCsSe3Vx; 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 S1754725AbeCGSbf (ORCPT + 99 others); Wed, 7 Mar 2018 13:31:35 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:49176 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754039AbeCGSbe (ORCPT ); Wed, 7 Mar 2018 13:31:34 -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 w27ILsgh152978; Wed, 7 Mar 2018 18:31:29 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=p+cFLDi35Tes9IJi649Rw3/oy4YbWiV3JGdAdoXdKRo=; b=kCsSe3Vx/a5Wy2o8xgsyn7AaygCHTa138dPs1DidlrW+YBnhlfF3+eZKt4QmJ9rJpWsQ hhjy1Bz8Da7WELXIAAubC1u6BwK81UCIJ6DJFni/wd7MOjQ+8a6hra18r7MVM15LNfQ+ 1DCkANPjb/R07kCrbXbv46Yqndx5F/18iR5ZzfhFtHsYrl1FOstKdmrpISHAxODmWnPH gCbZ/eOG8ztOjJtxFOJH+zLLgetdSdFp3RcFlp53quwMUDEq+gssDA7PVoBvrcUP1TBL nFTLxMGeqHorSJJq0doKMFjIdvCKrYgol1nzOMxQVgBkG90BMnzdX0Eo0nid+SWpyEbA QQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2gjn8tr48g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 07 Mar 2018 18:31:29 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w27IQSUG018012 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 7 Mar 2018 18:26:28 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w27IQSAk029418; Wed, 7 Mar 2018 18:26:28 GMT Received: from [192.168.1.67] (/94.61.137.133) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 07 Mar 2018 10:26:28 -0800 Subject: Re: [PATCH v1] xen: acpi: upload _PSD info for offline CPUs too To: Boris Ostrovsky Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Juergen Gross References: <20180306201209.21890-1-joao.m.martins@oracle.com> From: Joao Martins Message-ID: Date: Wed, 7 Mar 2018 18:26:24 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8825 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 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-1803070210 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/07/2018 05:51 PM, Boris Ostrovsky wrote: > 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"? > Yeah, probably clearer to use that. >> 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. > OK, I'll respin with exporting this from drivers/acpi. FWIW I copied solely for backportability purposes provided that hardware with SW_ANY or SW_ALL and current stable kernels is a little broken. Joao