public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Max Krasnyansky <maxk@qualcomm.com>
To: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Tigran Aivazian <tigran@aivazian.fsnet.co.uk>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Oruba <peter.oruba@amd.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [rfc-patch, bugfix] x86-microcode
Date: Mon, 04 Aug 2008 14:32:54 -0700	[thread overview]
Message-ID: <48977586.9020706@qualcomm.com> (raw)
In-Reply-To: <b647ffbd0808041301v665f1c45k85794ad18c735d2@mail.gmail.com>



Dmitry Adamushko wrote:
> 2008/8/4 Max Krasnyansky <maxk@qualcomm.com>:
>> Dmitry Adamushko wrote:
>>> Hi,
>>>
>>>
>>> [ consider it a pre-release and RFC... I'm a bit in hurry now and just send what I have got by this moment.
>>> Although, I expect it to be workable ]
>>>
>>>
>>> this change is supposed to fix bug#11197 (note, its name "Oops in microcode sysfs registration" is misleading)
>>>
>>> The problem description can be found here:
>>> http://www.ussg.iu.edu/hypermail/linux/kernel/0807.3/3791.html
>>> or
>>> http://lkml.org/lkml/2008/7/24/260
>>>
>>> perhaps it does look quite bulky for -rc, although it's mainly move-redesign-some-bits of the code and
>>> I tried to preserve the original logic (even if it looked like a possible optimizations might had been applied)
>>> as much as possible.
>>>
>>> The basic idea is that we introduce another mechanism to run ucode-updates on a target cpu
>>> and replace set_cpus_allowed_ptr() in (1) cpu-hotplug events and (2) module load.
>>>
>>>
>>> [1/2] x86-microcode: generic updates
>>>
>>> Basically, it introduces microcode_update_cpu() which can be run either from start_secondary()
>>> (perhaps via a function pointer) or scheduled via keventd ([2/2]) and reworks the logic of cpu-hotplug events.
>>>
>>> [2/2] x86-microcode: do updates via workqueue
>> Looks good to me. You did not change the old interface which still does
>> set_cpus_allowed_ptr() (ie racy against sched_setaffinity())
> 
> ah, right. I've only fixed reload_store() vs. cpu_down().
> 
> sched_setaffinity() calls get_online_cpus() so a pair of
> cpu_maps_update_begin() + cpu_hotplug_begin() would need to be used by
> the following code:
> 
> old_mask = p->cpus_allowed;
> set_cpus_allowed_ptr(p, new_mask);
> // do_something
> set_cpus_allowed_ptr(p, old_mask);
> 
> or we'd introduce another mutex to be used in both cases...  but I
> think we just can get rid of most of use-cases (if not all) by
> replacing them with schedule_work_on().
Agree. That's I suggested we do it later (ie convert those to use
schedule_work_on()).

Max


      reply	other threads:[~2008-08-04 21:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-03 15:42 [rfc-patch, bugfix] x86-microcode Dmitry Adamushko
2008-08-04 19:31 ` Max Krasnyansky
2008-08-04 20:01   ` Dmitry Adamushko
2008-08-04 21:32     ` Max Krasnyansky [this message]

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=48977586.9020706@qualcomm.com \
    --to=maxk@qualcomm.com \
    --cc=dmitry.adamushko@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peter.oruba@amd.com \
    --cc=rjw@sisk.pl \
    --cc=tglx@linutronix.de \
    --cc=tigran@aivazian.fsnet.co.uk \
    /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