mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Gautham R Shenoy <ego@in.ibm.com>, Ingo Molnar <mingo@elte.hu>,
	Srivatsa Vaddagiri <vatsa@in.ibm.com>,
	linux-kernel@vger.kernel.org,
	Dipankar Sarma <dipankar@in.ibm.com>,
	Paul E McKenney <paulmck@us.ibm.com>
Subject: Re: Cpu-Hotplug and Real-Time
Date: Tue, 7 Aug 2007 22:36:09 +0400	[thread overview]
Message-ID: <20070807183609.GA81@tv-sign.ru> (raw)
In-Reply-To: <20070807173336.GA4472@linux-os.sc.intel.com>

On 08/07, Venki Pallipadi wrote:
>
> On Tue, Aug 07, 2007 at 07:13:36PM +0400, Oleg Nesterov wrote:
> > 
> > As for kthread_bind(), I think wait_task_inactive+set_task_cpu is just
> > an optimization, and easy to "fix":
> > 
> > --- kernel/kthread.c	2007-07-28 16:58:17.000000000 +0400
> > +++ /proc/self/fd/0	2007-08-07 18:56:54.248073547 +0400
> > @@ -166,10 +166,7 @@ void kthread_bind(struct task_struct *k,
> >  		WARN_ON(1);
> >  		return;
> >  	}
> > -	/* Must have done schedule() in kthread() before we set_task_cpu */
> > -	wait_task_inactive(k);
> > -	set_task_cpu(k, cpu);
> > -	k->cpus_allowed = cpumask_of_cpu(cpu);
> > +	set_cpus_allowed(current, cpumask_of_cpu(cpu));
> >  }
> >  EXPORT_SYMBOL(kthread_bind);
> > 
> 
> Not sure whether set_cpus_allowed() will work here. Looks like, it needs the
> CPU to be online during the call and in kthread_bind() case CPU may be offline.

Aah, you are right, of course.

Thanks,

Oleg.


  reply	other threads:[~2007-08-07 18:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07 13:12 Gautham R Shenoy
2007-08-07 15:13 ` Oleg Nesterov
2007-08-07 17:33   ` Venki Pallipadi
2007-08-07 18:36     ` Oleg Nesterov [this message]
2007-08-09 17:03   ` rt ptracer can monopolize CPU (was: Cpu-Hotplug and Real-Time) Oleg Nesterov
2007-08-16 12:06     ` Gautham R Shenoy

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=20070807183609.GA81@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=dipankar@in.ibm.com \
    --cc=ego@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@us.ibm.com \
    --cc=vatsa@in.ibm.com \
    --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

all inboxes | Powered by JetHome®