Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: maksim.rayskiy@gmail.com
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org,
	Maksim Rayskiy <mrayskiy@broadcom.com>
Subject: Re: [PATCH] MIPS: move idle task creation to work queue
Date: Sat, 12 Feb 2011 16:51:00 +0300	[thread overview]
Message-ID: <4D569044.5070801@mvista.com> (raw)
In-Reply-To: <1297480946-28053-1-git-send-email-maksim.rayskiy@gmail.com>

Hello.

On 12-02-2011 6:22, maksim.rayskiy@gmail.com wrote:

> From: Maksim Rayskiy <mrayskiy@broadcom.com>

> To avoid forking usertask when creating an idle task, move fork_idle
> to a work queue.
> This is a small improvement to previous commit 467f0b8.

    Linus akss to also specify the commit summary in parens.

> Signed-off-by: Maksim Rayskiy <mrayskiy@broadcom.com>
[...]

> diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
> index 4593916..98bd504 100644
> --- a/arch/mips/kernel/smp.c
> +++ b/arch/mips/kernel/smp.c
> @@ -193,6 +193,21 @@ void __devinit smp_prepare_boot_cpu(void)
>    */
>   static struct task_struct *cpu_idle_thread[NR_CPUS];
>
> +struct create_idle {
> +	struct work_struct work;
> +	struct task_struct *idle;
> +	struct completion done;
> +	int cpu;
> +};
> +
> +static void __cpuinit do_fork_idle(struct work_struct *work)
> +{
> +	struct create_idle *c_idle =
> +		container_of(work, struct create_idle, work);

     Empty line wouldn't hurt here...

> +	c_idle->idle = fork_idle(c_idle->cpu);
> +	complete(&c_idle->done);
> +}
> +
>   int __cpuinit __cpu_up(unsigned int cpu)
>   {
>   	struct task_struct *idle;
> @@ -203,16 +218,21 @@ int __cpuinit __cpu_up(unsigned int cpu)
>   	 * Linux can schedule processes on this slave.
>   	 */
>   	if (!cpu_idle_thread[cpu]) {
> -		idle = fork_idle(cpu);
> -		cpu_idle_thread[cpu] = idle;
> +		/* Schedule work item to avoid forking user task.
> +		   Ported from x86 */

   The preferred style of multi-line comments is this:

/*
  * bla
  * bla
  */

WBR, Sergei

      reply	other threads:[~2011-02-12 13:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-12  3:22 [PATCH] MIPS: move idle task creation to work queue maksim.rayskiy
2011-02-12 13:51 ` Sergei Shtylyov [this message]

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=4D569044.5070801@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=linux-mips@linux-mips.org \
    --cc=maksim.rayskiy@gmail.com \
    --cc=mrayskiy@broadcom.com \
    --cc=ralf@linux-mips.org \
    /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