Skip to contentSkip to conversation

kvm: fix kvm reboot crash when MAXSMP is used

PATCH New Yinghai Lu 13 participants 63 messages Jun 4, 2009 – Sep 21, 2009 Page 2 of 2

Subsystems (9)
x86 KVM ACPI Library code +5 more subsystems
lore
Share & tools
lore
#49 lore raw

Re: [PATCH 1/2] CPUFREQ: Remove unneeded dbs_mutexes from ondemand and conservative governors

In reply to Thomas Renninger
Quoted 19 lines · Thomas Renninger

Hi Pavel,

Quoted 16 lines · On Tuesday 30 June 2009 08:33:39 Pavel Machek wrote:
Quoted 15 lines · Thomas Renninger

Comment from Venkatesh:
...
This mutex is just serializing the changes to those variables. I could't think of any functionality issues of not having the lock as such.

-> rip it out.

CC Venkatesh Pallipadi <[email protected]>

static struct dbs_tuners {

drivers/cpufreq/cpufreq_conservative.c +0 -0
@@ -236,10 +222,7 @@ static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused,
 	if (ret != 1 || input > MAX_SAMPLING_DOWN_FACTOR || input < 1)
 		return -EINVAL;
 
Quoted 8 lines
Quoted 6 lines

drivers/cpufreq/cpufreq_conservative.c static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused, · line 242

Quoted 4 lines
drivers/cpufreq/cpufreq_conservative.c +0 -3
-	mutex_lock(&dbs_mutex);
 	dbs_tuners_ins.sampling_down_factor = input;
-	mutex_unlock(&dbs_mutex);
-

You'd need to make s_down_factor atomic_t for this to work....

Can you provide a userspace scenario (or tell which kind of event must happen in between), that this would cause problems, please.

Imagine

dbs_tuners_ins.sampling_down_factor = 0xd0000;
input = 0xabcd;

..then other threads can see 0xdabcd; if they read at "bad" moment. Not on i386, but this is generic code (right?). Just use atomic_t.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#57 lore raw

RE: [PATCH 4/6] x86/cpufreq: use cpumask_copy instead of =

In reply to Rusty Russell
Quoted 10 lines · Mark
Quoted 6 lines
Quoted 2 lines

powernow_k8_target is problematic: it grabs a mutex. cpufreq people, is this called often?

Yes. It's the function that makes a frequency change happen, so 5+ times per second per core isn't unreasonable.

Right, so we need to revisit this. I'll leave it for the moment and put it on my TODO list.

Rusty -

Did you ever get any ideas on a solution to this? I'm getting reports that the set_cpus_allowed_ptr() in powernow_k8_target() is breaking with changeset ebc79c4f8da0f92efa968e0328f32334a2ce80cf . I haven't changed the powernow_k8 code, so I suspect something happened to set_cpus_allowed_ptr().

-Mark Langsdorf
Operating System Research Center
AMD