linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Adamushko <dmitry.adamushko@gmail.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Andreas Herrmann <andreas.herrmann3@amd.com>,
	Peter Oruba <peter.oruba@amd.com>,
	Arjan van de Ven <arjan@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86 microcode: work_on_cpu and cleanup of the  synchronization logic
Date: Sat, 25 Apr 2009 12:30:11 +0200	[thread overview]
Message-ID: <b647ffbd0904250330gf2e909bt14b8fd702cda6bdc@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0904241816001.10674@blonde.anvils>

2009/4/24 Hugh Dickins <hugh@veritas.com>:
> On Fri, 24 Apr 2009, Dmitry Adamushko wrote:
>> 2009/4/24 Dmitry Adamushko <dmitry.adamushko@gmail.com>:
>> > 2009/4/24 Hugh Dickins <hugh@veritas.com>:
>> >>
>> >> Good thinking, yes we can and do, unless I'm misinterpreting the
>> >> evidence.  Though P4 Xeon and Atom startup messages give the opposite
>> >> impression, claiming to update all cpus from lower revision, more
>> >> careful tests starting from "maxcpus=1" and then "echo 1 >online"
>> >> (which, unless you've fiddled around putting the microcode_ctl'ed
>> >> microcode.dat into /lib/firmware/intel-ucode/wherever, isn't able
>> >> to update at online time on Intel) shows that the later onlined
>> >> siblings already have the updated microcode applied to their
>> >> previously onlined siblings.  Which isn't surprising, but I'd
>> >> been lulled into thinking the opposite by the startup sequence.
> ...
>>
>> But then I wonder why behavior (the fact that all threads seem to
>> upgrade to a newer version during the startup but they seem to already
>> be 'up-to-date' if onlined later) during the startup is different...
>
> I believe it's because the module_init microcode_init() calls
> sysdev_driver_register(), which does mc_sysdev_add() of (all possible?)
> cpus, which for online cpus calls microcode_init_cpu(), which does
> collect_cpu_info() then, if SYSTEM_RUNNING, request_microcode_fw()
> and apply_microcode_on_target() (names with your patch applied).
>
> If the microcode driver is builtin (so gets here before SYSTEM_RUNNING),
> or if it's for Intel with no firmware in /lib/firmware/intel-ucode/X-X-X
> yet, the cpu_sig is thus obtained for all online cpus, before initscripts
> run /sbin/microcode_ctl to update from /etc/microcode.dat successfully:
> the "updated from revision" message shows uci->cpu_sig.rev as it
> was saved earlier, rather than reevaluating it just before update.
>
> That's confusing for us, and confusing when resume shows updated from
> high revision to same high revision (though, I think, the revision
> should in fact have reverted during suspend); but might be even more
> worrying to HT users if it were corrected (it would seem as if only
> half their cpus got updated, when before all were).  I don't know.

Perhaps, it doesn't make sense to cache 'cpu_sig' at all. I'll ponder
on it a bit and send a new patch.

Thanks a lot for your feedback!

>
>> Too pity that I can't see it with my setups (heh, I perhaps could play
>> with it by actually downgrading cpus to older ucode).
>
> Please, Intel, ship this man some out-of-date hardware!
>
> (You're sure your cpus really are up-to-date?  I thought several
> of my boxes were, but then discovered a modinfo line in openSUSE
> 11.1's /etc/init.d/microcode.ctl, which had been added since 10.3,
> which was now disabling it when microcode driver built into kernel.)
>

hmm, I downloaded - what seems to be - the recent .dat file from the
Intel's site and run microcode_ctl (a binary, no additional scripts
manually). I will check the site for updates again.

>
> Hugh
>

-- 
Best regards,
Dmitry Adamushko

  reply	other threads:[~2009-04-25 10:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 20:16 [PATCH] x86 microcode: work_on_cpu and cleanup of the synchronization logic Dmitry Adamushko
2009-04-21  8:29 ` Ingo Molnar
2009-04-21 20:07 ` Dmitry Adamushko
2009-04-21 20:09   ` Dmitry Adamushko
2009-04-22 10:18   ` Ingo Molnar
2009-04-22 10:33     ` Dmitry Adamushko
2009-04-22 10:36       ` Ingo Molnar
2009-04-22 10:34   ` Ingo Molnar
2009-04-22 22:24   ` Dmitry Adamushko
2009-04-23  8:27     ` Ingo Molnar
2009-04-23  8:55       ` Dmitry Adamushko
2009-04-23 18:03         ` Hugh Dickins
2009-04-23 22:16           ` Dmitry Adamushko
2009-04-24 12:23             ` Hugh Dickins
2009-04-24 14:11               ` Dmitry Adamushko
2009-04-24 15:30                 ` Hugh Dickins
2009-04-24 17:01                 ` Dmitry Adamushko
2009-04-24 18:00                   ` Hugh Dickins
2009-04-25 10:30                     ` Dmitry Adamushko [this message]
2009-05-06 22:30     ` Dmitry Adamushko
2009-05-07  8:08       ` Dmitry Adamushko
2009-05-11 21:48       ` [PATCH, -tip] x86 microcode: smp_call_function_single() instead of set_cpus_allowed, cleanup of sync. logic Dmitry Adamushko
2009-05-12  8:27         ` [tip:x86/microcode] x86: microcode: use smp_call_function_single instead of set_cpus_allowed, cleanup of synchronization logic tip-bot for Dmitry Adamushko
2009-05-12  8:39         ` tip-bot for Dmitry Adamushko

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=b647ffbd0904250330gf2e909bt14b8fd702cda6bdc@mail.gmail.com \
    --to=dmitry.adamushko@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreas.herrmann3@amd.com \
    --cc=arjan@infradead.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peter.oruba@amd.com \
    --cc=rusty@rustcorp.com.au \
    /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).