From: Linus Torvalds <torvalds@linux-foundation.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>,
"Thomas Gleixner <tglx@linutronix.de> Suresh Siddha"
<suresh.siddha@intel.com>, Tejun Heo <tj@kernel.org>,
Venkatesh Pallapadi <venkatesh.pallapadi@intel.com>,
Zhang Rui <rui.zhang@intel.com>
Subject: Re: [GIT PULL] x86 fixes for 2.6.30-rc8
Date: Mon, 25 May 2009 15:50:14 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.01.0905251543570.3435@localhost.localdomain> (raw)
In-Reply-To: <200905252003.n4PK3sFi014919@voreg.hos.anvin.org>
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
next prev parent reply other threads:[~2009-05-25 22:51 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 [this message]
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
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=alpine.LFD.2.01.0905251543570.3435@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rui.zhang@intel.com \
--cc=suresh.siddha@intel.com \
--cc=tj@kernel.org \
--cc=venkatesh.pallapadi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.