From: Gautham R Shenoy <ego@in.ibm.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Srinivasa Ds <srinivasa@in.ibm.com>,
anton@au1.ibm.com, paulus@samba.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] [PATCH] cpu_hotplug on IBM JS20 system
Date: Mon, 13 Nov 2006 21:07:08 +0530 [thread overview]
Message-ID: <20061113153708.GA27695@in.ibm.com> (raw)
In-Reply-To: <20061113130926.GD7085@osiris.boeblingen.de.ibm.com>
On Mon, Nov 13, 2006 at 02:09:26PM +0100, Heiko Carstens wrote:
> > Since we are not supported by hardware for cpu hotplug. I have developed
> > the patch which will disable cpu hotplug on IBM bladecentre JS20. Please
> > let me know your comments on this please.
>
> > +extern int cpu_hotplug_disabled;
> > +extern struct mutex cpu_add_remove_lock;
> [...]
> > + if(rtas_stop_self_args.token == RTAS_UNKNOWN_SERVICE) {
> > + mutex_lock(&cpu_add_remove_lock);
> > + cpu_hotplug_disabled = 1;
> > + mutex_unlock(&cpu_add_remove_lock);
> > + }
> > +
> > #endif /* CONFIG_HOTPLUG_CPU */
> > #ifdef CONFIG_RTAS_ERROR_LOGGING
> > rtas_last_error_token = rtas_token("rtas-last-error");
>
> You should add a function to kernel/cpu.c which you can call in order to
> disable cpu hotplug instead of exporting its private data structures.
Yup. Also, considering the fact that enable_nonboot_cpus() can reset
the cpu_hotplug_disabled flag, I would suggest the following:
a) create one additional state for cpu_hotplug_disabled, something
like
#define PERMANENTLY_DISABLED -1
b) Define a function kernel/cpu.c
void disable_cpu_hotplug_perm()
{
cpu_hotplug_disabled = PERMANENTLY_DISABLED;
}
and call it in rtas.c
c) Check for status of cpu_hotplug_disabled in functions cpu_up,
cpu_down, enable_nonboot_cpus and disable_nonboot_cpus and
if cpu_hotplug_disabled == PERMANENTLY_DISABLED,
return bypassing further code.
Thoughts?
Regards,
gautham.
--
Gautham R Shenoy
Linux Technology Center
IBM India.
"Freedom comes with a price tag of responsibility, which is still a bargain,
because Freedom is priceless!"
next prev parent reply other threads:[~2006-11-13 15:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-13 13:10 Srinivasa Ds
2006-11-13 13:09 ` Heiko Carstens
2006-11-13 15:37 ` Gautham R Shenoy [this message]
2006-11-13 21:39 ` Benjamin Herrenschmidt
2006-11-14 13:37 ` Srinivasa Ds
2006-11-14 14:14 ` Srinivasa Ds
2006-11-15 2:58 ` Michael Ellerman
2006-11-15 4:50 ` Srinivasa Ds
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=20061113153708.GA27695@in.ibm.com \
--to=ego@in.ibm.com \
--cc=anton@au1.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=srinivasa@in.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
all inboxes | Powered by JetHome®