From: "H. Peter Anvin" <hpa@zytor.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Tejun Heo <tj@kernel.org>,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
Zhang Rui <rui.zhang@intel.com>
Subject: Re: [GIT PULL] x86 fixes for 2.6.30-rc8
Date: Mon, 25 May 2009 16:02:15 -0700 [thread overview]
Message-ID: <4A1B2377.3060601@zytor.com> (raw)
In-Reply-To: <alpine.LFD.2.01.0905251543570.3435@localhost.localdomain>
[Replying to add Venki back to the Cc: list since I typed his name]
Linus Torvalds wrote:
>
> On Mon, 25 May 2009, H. Peter Anvin wrote:
>> +static void wbinvd_local(void *unused)
>> +{
>> + wbinvd();
>> +}
>> +
>> static void cpa_flush_array(unsigned long *start, int numpages, int cache,
>> int in_flags, struct page **pages)
>> {
>> @@ -218,8 +223,9 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache,
>>
>> /* 4M threshold */
>> if (numpages >= 1024) {
>> - if (boot_cpu_data.x86_model >= 4)
>> - wbinvd();
>> + if (boot_cpu_data.x86 >= 4)
>> + on_each_cpu(wbinvd_local, NULL, 1);
>> +
>
> This looks a bit wrong.
>
> Just above this, we've done
>
> on_each_cpu(__cpa_flush_range, NULL, 1);
>
> and quite frankly, it seems to be that what we _should_ have done is to
> instead change that to
>
> long do_wbinvd = cache && numpages >= 1024;
>
> on_each_cpu(__cpa_flush_all, (void *)do_wbinvd, 1);
> if (!cache || do_wbinvd)
> return;
>
> .. do the cflush dance ..
>
> instead.
>
> Now you made it do two different "on_each_cpu" things. Maybe it doesn't
> matter, but it just seems wrong.
>
> Linus
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2009-05-25 23:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 20:03 [GIT PULL] x86 fixes for 2.6.30-rc8 H. Peter Anvin
2009-05-25 22:50 ` Linus Torvalds
2009-05-25 22:51 ` Linus Torvalds
2009-05-25 23:03 ` H. Peter Anvin
2009-05-26 17:33 ` Pallipadi, Venkatesh
2009-05-25 23:02 ` H. Peter Anvin [this message]
2009-05-30 11:22 ` Pavel Machek
2009-05-30 12:13 ` Michael S. Zick
2009-05-30 19:23 ` H. Peter Anvin
2009-05-30 20:32 ` Michael S. Zick
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=4A1B2377.3060601@zytor.com \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rui.zhang@intel.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=venkatesh.pallipadi@intel.com \
/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