public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Jeff V. Merkey" <jmerkey@wolfmountaingroup.com>,
	Linux kernel <linux-kernel@vger.kernel.org>,
	Venki Pallipadi <venkatesh.pallipadi@intel.com>
Subject: Re: Preemption Broken:  centrino_target busted under SMP on 2.6.20.4
Date: Mon, 9 Apr 2007 22:31:08 -0400	[thread overview]
Message-ID: <20070410023108.GA14081@redhat.com> (raw)
In-Reply-To: <20070409172651.9bc619d6.akpm@linux-foundation.org>

On Mon, Apr 09, 2007 at 05:26:51PM -0700, Andrew Morton wrote:
 > On Thu, 5 Apr 2007 16:50:34 -0400
 > Dave Jones <davej@redhat.com> wrote:
 > 
 > > diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
 > > index f43b987..824d0a2 100644
 > > --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
 > > +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
 > > @@ -708,6 +708,7 @@ static int centrino_target (struct cpufreq_policy *policy,
 > >  	saved_mask = current->cpus_allowed;
 > >  	first_cpu = 1;
 > >  	cpus_clear(covered_cpus);
 > > +	preempt_disable();
 > >  	for_each_cpu_mask(j, online_policy_cpus) {
 > >  		/*
 > >  		 * Support for SMP systems.
 > > @@ -798,6 +799,7 @@ static int centrino_target (struct cpufreq_policy *policy,
 > >  	}
 > >  
 > >  migrate_end:
 > > +	preempt_enable();
 > >  	set_cpus_allowed(current, saved_mask);
 > >  	return 0;
 > >  }
 > 
 > This means we'll call set_cpus_allowed() while in atomic state, but
 > set_cpus_allowed() does sleepy stuff.

Puzzled. This diff shouldn't change anything about the context we're in
when we call set_cpus_allowed, and as we're not seeing warnings now,
I'm not sure what I'm missing?

[which may be 'the obvious', you wouldn't believe the evening I've had
 involving gas leaks and noxious fumes. Wheee, floaty head.]

	Dave

-- 
http://www.codemonkey.org.uk

  reply	other threads:[~2007-04-10  2:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-05 20:33 Preemption Broken: centrino_target busted under SMP on 2.6.20.4 Jeff V. Merkey
2007-04-05 20:50 ` Dave Jones
2007-04-10  0:26   ` Andrew Morton
2007-04-10  2:31     ` Dave Jones [this message]
2007-04-10  2:41       ` Andrew Morton
2007-04-10  3:05         ` Dave Jones
2007-04-10  3:08           ` Dave Jones
2007-04-10  3:51             ` Andrew Morton
2007-04-10  4:29               ` Dave Jones

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=20070410023108.GA14081@redhat.com \
    --to=davej@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=jmerkey@wolfmountaingroup.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=venkatesh.pallipadi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox