linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@redhat.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org, Len Brown <lenb@kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH] x86/ACPI/cstate: Output AMD on APCI C1 FFH MWAIT AMD systems
Date: Thu, 9 Aug 2018 07:43:47 -0400	[thread overview]
Message-ID: <932b8a78-a7b4-ea8c-a640-b7f657f45b63@redhat.com> (raw)
In-Reply-To: <20180808195856.GA20912@amd>



On 08/08/2018 03:58 PM, Pavel Machek wrote:
> On Wed 2018-08-08 13:47:35, Prarit Bhargava wrote:
>> commit 5209654a46ee ("x86/ACPI/cstate: Allow ACPI C1 FFH MWAIT use on AMD
>> systems") allows use of FFH for ACPI C1 but tools like cpupower and turbostat
>> display INTEL for the cstate description.
>>
>> Output "AMD" for AMD systems with FFH for ACPI C1.
> 
> Um, is it good idea?
>> First, you are changing kernel API.

I thought about that and the AMD support was only added a year ago so I think it
is okay to change.  Secondly, I did a grep for the use of the desc file in the
Fedora sources and only found a few places where the file is referenced.  They
all *report* the data but do not use it to make a decision.

For example, turbostat and cpupower only return the data to the console.

> 
>> @@ -107,9 +108,14 @@ static long acpi_processor_ffh_cstate_probe_cpu(void *_cx)
>>  			"Monitor-Mwait will be used to enter C-%d state\n",
>>  			cx->type);
>>  	}
>> -	snprintf(cx->desc,
>> -			ACPI_CX_DESC_LEN, "ACPI FFH INTEL MWAIT 0x%x",
>> -			cx->address);
>> +	if (c->x86_vendor == X86_VENDOR_INTEL)
>> +		snprintf(cx->desc,
>> +			 ACPI_CX_DESC_LEN, "ACPI FFH INTEL MWAIT 0x%x",
>> +			 cx->address);
>> +	else
>> +		snprintf(cx->desc,
>> +			 ACPI_CX_DESC_LEN, "ACPI FFH AMD MWAIT 0x%x",
>> +			 cx->address);
> 
> Second, I read it as "Intel MWAIT" instruction is used. Yes, AMD cpu can
> use Intel MWAIT, too...

That's true but the weirdness of seeing INTEL on an AMD box there made me push
this patch.

> 
> Third, there are more CPU vendors out there.

Not in this code.  It is AMD & Intel only.  I thought about dropping INTEL, and
also switching to X86.

Should we drop INTEL from the above or not (as suggested later in this thread)?
It feels like everyone is on the fence about it.

P.

> 
> 									Pavel
> 

  parent reply	other threads:[~2018-08-09 11:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08 17:47 [PATCH] x86/ACPI/cstate: Output AMD on APCI C1 FFH MWAIT AMD systems Prarit Bhargava
2018-08-08 19:58 ` Pavel Machek
2018-08-08 20:01   ` Len Brown
2018-08-08 21:06     ` Pavel Machek
2018-08-09 11:43   ` Prarit Bhargava [this message]
2018-08-09 16:25     ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=932b8a78-a7b4-ea8c-a640-b7f657f45b63@redhat.com \
    --to=prarit@redhat.com \
    --cc=hpa@zytor.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).