public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: paulmck@linux.vnet.ibm.com
Cc: Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@osdl.org>,
	dipankar@in.ibm.com, Gautham Shenoy <ego@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Fw: Re: [mm PATCH 4/6] RCU: (now) CPU hotplug
Date: Tue, 30 Jan 2007 17:44:47 +0100	[thread overview]
Message-ID: <200701301744.48601.rjw@sisk.pl> (raw)
In-Reply-To: <20070130160244.GB2092@linux.vnet.ibm.com>

On Tuesday, 30 January 2007 17:02, Paul E. McKenney wrote:
> On Tue, Jan 30, 2007 at 08:33:40AM +0100, Ingo Molnar wrote:
> > 
> > * Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
> > 
> > > > in fact (new) kprobes uses the freezer, and it's far more 
> > > > performance sensitive than the handling of CPU hotplug events.
> > > 
> > > Outside of realtime workloads, I agree that performance should not be 
> > > a problem.  And I don't know of any reason why realtime systems need 
> > > to be able to do hotplug CPU.  Yet, anyway.  ;-)
> > 
> > even for -rt it's not really an issue: the hotplug locks are so 
> > all-encompassing and so unbound at the moment that there's no realistic 
> > expectation for them to ever become deterministic. So we might as well 
> > make them encompass "everything" - without any noticeable effect.
> > 
> > > So the thought is to make _cpu_down() and _cpu_up() do something like 
> > > the following (untested, probably does not even compile), perhaps with 
> > > suitable adjustments elsewhere as well?
> > > 
> > > 	static int _cpu_down(unsigned int cpu)
> > > 	{
> > > 		int err;
> > > 		struct task_struct *p;
> > > 		cpumask_t old_allowed, tmp;
> > > 
> > > 		if (num_online_cpus() == 1)
> > > 			return -EBUSY;
> > > 
> > > 		if (!cpu_online(cpu))
> > > 			return -EINVAL;
> > > 
> > > 		if (freeze_processes()) {
> > > 			err = -EBUSY;
> > > 			goto out_freeze_notify_failed;
> > > 		}
> > > 		err = raw_notifier_call_chain(&cpu_chain, CPU_DOWN_PREPARE,
> > > 							(void *)(long)cpu);
> > 
> > yeah. This all looks so nice that i almost cannot believe it's true :-) 
> 
> Well, it turns out that maybe it is in fact untrue.  :-/
> 
> I need to look at all uses of PF_NOFREEZE -- as I understand the
> code, processes marked PF_NOFREEZE will continue running, potentially
> interfering with the hotplug operation.  :-(
> 
> I will pass my findings on to this list.

Well, I did it some time ago, although not very thoroughly.

AFAICS there are not so many, but one that stands out is the worker threads.
We needed two of them to actually go to sleep, so now it's possible to create
a "freezeable workqueue" the worker thread of which will not set PF_NOFREEZE,
but currently this is only used by XFS.

Greetings,
Rafael


-- 
If you don't have the time to read,
you don't have the time or the tools to write.
		- Stephen King

  reply	other threads:[~2007-01-30 16:44 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070124011519.GG1613@linux.vnet.ibm.com>
     [not found] ` <20070124090111.GC27221@in.ibm.com>
     [not found]   ` <20070124161559.GA1762@linux.vnet.ibm.com>
     [not found]     ` <20070124210645.GA19650@in.ibm.com>
2007-01-26 19:11       ` Fw: Re: [mm PATCH 4/6] RCU: (now) CPU hotplug Dipankar Sarma
2007-01-26 19:28         ` Andrew Morton
2007-01-26 19:46           ` Dipankar Sarma
2007-01-26 20:17             ` Andrew Morton
2007-01-26 20:44               ` Dipankar Sarma
2007-01-26 21:29                 ` Andrew Morton
2007-01-28 22:47                   ` Paul E. McKenney
2007-01-28 23:30                     ` Andrew Morton
2007-01-29  2:40                       ` Paul E. McKenney
2007-01-29 19:12                       ` Ingo Molnar
2007-01-30  2:45                         ` Paul E. McKenney
2007-01-30  7:33                           ` Ingo Molnar
2007-01-30 16:02                             ` Paul E. McKenney
2007-01-30 16:44                               ` Rafael J. Wysocki [this message]
2007-01-30 18:27                                 ` Andrew Morton
2007-01-30 19:49                                   ` Paul E. McKenney
2007-01-31 23:10                                     ` Paul E. McKenney
2007-02-03  0:17                                       ` Pavel Machek
2007-02-04  4:39                                         ` Paul E. McKenney
2007-02-04 11:08                                           ` Rafael J. Wysocki
2007-02-04 12:53                                             ` Pavel Machek
2007-02-04 13:46                                               ` Rafael J. Wysocki
2007-02-04 13:50                                                 ` Pavel Machek
2007-02-04 13:59                                                   ` Rafael J. Wysocki
2007-02-03  0:01                                 ` Pavel Machek
2007-02-03 22:27                                   ` Rafael J. Wysocki
2007-02-04  0:31                                     ` Paul E. McKenney
2007-01-30 14:02                           ` Gautham R Shenoy
2007-01-30 16:47                             ` Paul E. McKenney

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=200701301744.48601.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@osdl.org \
    --cc=dipankar@in.ibm.com \
    --cc=ego@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.ibm.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