mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ashok Raj <ashok.raj@intel.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Ashok Raj <ashok.raj@intel.com>,
	linux-kernel@vger.kernel.org, zwane@arm.linux.org.uk,
	vatsa@in.ibm.com, discuss@x86-64.org, rusty@rustycorp.com.au
Subject: Re: [patch 2/5] try2: x86_64: CPU hotplug support.
Date: Mon, 6 Jun 2005 15:43:26 -0700	[thread overview]
Message-ID: <20050606154325.A18480@unix-os.sc.intel.com> (raw)
In-Reply-To: <20050606151156.7b26167f.akpm@osdl.org>; from akpm@osdl.org on Mon, Jun 06, 2005 at 03:11:56PM -0700

On Mon, Jun 06, 2005 at 03:11:56PM -0700, Andrew Morton wrote:
> Ashok Raj <ashok.raj@intel.com> wrote:
> >
> > Experimental CPU hotplug patch for x86_64
> 
> What does "experimental" mean?

Well, stictly since these sections are still under CONFIG_EXPERIMENTAL
in arch/x86_64/Kconfig. Evolving... ? 

> 
> > +
> > +	if (!keventd_up() || current_is_keventd())
> > +		work.func(work.data);
> > +	else {
> > +		schedule_work(&work);
> > +		wait_for_completion(&c_idle.done);
> > +	}
> 
> This shouldn't be diddling with workqueue internals.  Why is this code
> here?  If the workqueue API is inadequate then we should prefer to extend
> it rather than working around any shortcoming.

This has been around for ages.. even in ia64 code. For forking idle threads
we want to do them in clean state so we dont acquire state from threads
from where the cpu_up is being invoked. Hence we want them to start from
keventd() threads. But when system boot is happening, there is no keventd()
yet, hence we need to create them right away.

the other problem we ran into was ACPI code that handles physical cpu hotplug
also queues to keventd(), this becomes permanently blocking when called from
code already running in kevend(). 

> > +		Dprintk ("do_boot_cpu %d Already started\n", cpu);
> 
> Please try to adopt a consistent coding style.

I was actually trying to be consistent :-), rest of the debug code 
was under Dprintk() hence didnt want to use a new style. Not sure
what you need here exactly. Do you want to convert the rest of the code to 
not use Dprintk()? or just leave this with a printk? I dont have a 
particular preference here... i would rather leave it with Dprintk() as the
rest of the debug code.
> 
> Using printk("%s", __FUNCTION__); is preferred, as it will still work if
> someone later refactors this code into a new function.  (It can increase
> code size.  Or decrease it if the string gets shared.  But that's moot if
> the code is inside a normally-disabled macro like Dprintk.  Whatever that
> is.)
> 
> > +static void
> > +remove_siblinginfo(int cpu)
> 
> Unneeded newline here.

I can remove.. when iam inside the file, iam used to search for fn;s from 
start of line.. no biggie.. can revert.

Cheers,
ashok

  reply	other threads:[~2005-06-06 23:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-06 19:14 [patch 0/5] x86_64: try2: CPU hotplug patch series Ashok Raj
2005-06-06 19:14 ` [patch 1/5] try2: x86_64: Change init sections for CPU hotplug support Ashok Raj
2005-06-06 19:14 ` [patch 2/5] try2: x86_64: " Ashok Raj
2005-06-06 22:11   ` Andrew Morton
2005-06-06 22:43     ` Ashok Raj [this message]
2005-06-06 19:14 ` [patch 3/5] try2: x86_64: CPU hotplug sibling map cleanup Ashok Raj
2005-06-06 19:14 ` [patch 4/5] try2: x86_64: Dont use broadcast shortcut to make it cpu hotplug safe Ashok Raj
2005-06-06 22:13   ` Andrew Morton
2005-06-07  7:13   ` Shaohua Li
2005-06-07 12:05     ` Ashok Raj
2005-06-07 15:40     ` Ashok Raj
2005-06-06 19:14 ` [patch 5/5] try2: x86_64: Provide ability to choose using shortcuts for IPI in flat mode Ashok Raj
2005-06-06 22:14   ` Andrew Morton

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=20050606154325.A18480@unix-os.sc.intel.com \
    --to=ashok.raj@intel.com \
    --cc=akpm@osdl.org \
    --cc=discuss@x86-64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustycorp.com.au \
    --cc=vatsa@in.ibm.com \
    --cc=zwane@arm.linux.org.uk \
    /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®