[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.01.0905251543570.3435@localhost.localdomain>
Date: Mon, 25 May 2009 15:50:14 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: "H. Peter Anvin" <hpa@...or.com>
cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...e.hu>,
"Thomas Gleixner <tglx@...utronix.de> Suresh Siddha"
<suresh.siddha@...el.com>, Tejun Heo <tj@...nel.org>,
Venkatesh Pallapadi <venkatesh.pallapadi@...el.com>,
Zhang Rui <rui.zhang@...el.com>
Subject: Re: [GIT PULL] x86 fixes for 2.6.30-rc8
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists