Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1688232ybz; Thu, 16 Apr 2020 13:43:37 -0700 (PDT) X-Google-Smtp-Source: APiQypKvPmdqZg4WOLJD1My/VOxjvFFHlEbET1B6/XF8D8bRLQVlc6nrq+6AceCYwVfvOEqmIuoQ X-Received: by 2002:aa7:ce8e:: with SMTP id y14mr79659edv.30.1587069816860; Thu, 16 Apr 2020 13:43:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587069816; cv=none; d=google.com; s=arc-20160816; b=LBxbcMcOgL/mN/A8KzEUnf19D280cjEB6CIppjorPgQkHTF9vcb9roBG29BH+/9N9R gnt/puTPr42nI+L21q5TMXzcRwWfhaXvsMjm26Lk4BzpZRLgCPYkDEwDhdgTJu4lQ3wp IDfXB7COJQHaT7SsErndZWTKsbnXTTE6LdRk7TRkvvQ8hnk2c+Tp6M53KqXOmt67Omyj DTujn7+TKstDnh8/MW27j/lQxPA9NEnHnU3r8WymGA5AApZrBc0BLFib5DkL9e3Zx4YN gXSmQIBRIbf7hTvy7KP0qgTpRhU/Bes6C9liZCk6HfpMipIlE5FWMD4a1ChhfDkT4xrk En0w== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=Bfv6UHcVhjbzbgtcXagdDCWGoxYSBuJh5dmUjRXXPkk=; b=cH7gbltylQKjLzNYssmGk6cOKs+f+LeXxlc+MNq4ZiwvrpTUkKlAMocapJcIWkHMHn 9OOVis8RjWnzpKxrf08UgqNMNzx8cG3jrW7pTZBLhiaACZklcw6i+hm7gGCTc1ad7q5c 47QJRTP5kg1KXl01GCPeCjS+ckgeI4GlACKwTvRolqfNqWYJyzgPbsCabEQTrZ0KR/J2 qCcduEPnhASyq452471IQhLbu8gdMUTpJ288c+ULaa8WDKYUvBeG+pjAlEeUrV2AOXUY 9arh2H+qcNsjirhy23ntVZsxLYAfejvulDCXklFWJA+aSWZtvbqYtgumjY3hLZvA/Awh fivg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si633558edl.591.2020.04.16.13.43.13; Thu, 16 Apr 2020 13:43:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389483AbgDPSJi (ORCPT + 99 others); Thu, 16 Apr 2020 14:09:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:43228 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728383AbgDPSJh (ORCPT ); Thu, 16 Apr 2020 14:09:37 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0055CAF57; Thu, 16 Apr 2020 18:09:34 +0000 (UTC) Message-ID: <1587060573.32139.67.camel@suse.cz> Subject: Re: [PATCH] x86, smpboot: Disable frequency invariance when it's unsupported From: Giovanni Gherdovich To: Like Xu Cc: Peter Zijlstra , Ingo Molnar , Doug Smythies , "Rafael J . Wysocki" , LKML Date: Thu, 16 Apr 2020 20:09:33 +0200 In-Reply-To: References: <20200416020700.167294-1-like.xu@linux.intel.com> <1587017284.32139.20.camel@suse.cz> <1587026430.32139.29.camel@suse.cz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-04-16 at 20:54 +0800, Like Xu wrote: > On 2020/4/16 16:40, Giovanni Gherdovich wrote: > > [...] > > 1) Can you share the output of "turbostat --interval 1 sleep 0"? I'm > > interested in the headers of the output, where all the various pm-related > > MSRs are decoded. > > > > I couldn't disclose more information about this. No worries, I understand. > > > 2) Despite not being in the Intel SDM, I was under the assumption that all > > Intel CPUs declare the "all-cores turbo" frequency, but it's not the case > > for this one. Eg: if you have 24 cores, somewhere in your MSRs I'd expect > > to find "24C turbo" (or even "30C turbo", anything greater or equal than 24). > > My understanding from > > https://ark.intel.com/content/www/us/en/ark/products/202682/intel-atom-processor-p5962b-27m-cache-2-20-ghz.html > > is that this CPU doesn't support turbo boost at all; in other CPUs without > > turbo I've seen MSRs saying the all-cores turbo freq is equal to the base > > freq (for compatibility I suppose). Here MSR_TURBO_RATIO_LIMIT says that 1C > > turbo is the same as base frequency (2.2GHz), but turbo for larger sets of > > cores is declared as zero, which I find a little odd. > > That's odd and we could only rely on the Intel specification > about the assumption "Intel CPUs declare the all-cores turbo frequency" > and I may report this issue if something does mismatch. Ok. > > > > > 3) The parsing of MSRs in the frequency invariance code is modeled after > > turbostat, and classifies CPUs in 5 groups: Atom up to Goldmont, Atom from > > Goldmont onwards, Xeon Phi, Xeon Scalable Processors onwards and "generic > > Core". As you've already found out from where your panic happens, your Atom > > falls into the "generic Core" category (function core_set_max_freq_ratio()), > > but given that it's an Atom and it's been released this very quarter I'd > > have guessed it to behave like a Goldmont. Something for me to keep in mind. > > It's INTEL_FAM6_ATOM_TREMONT or INTEL_FAM6_ATOM_TREMONT_D. > Thanks! The model name from intel-family.h is useful! Giovanni