All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: mingo@elte.hu, nickpiggin@yahoo.com.au, vatsa@in.ibm.com,
	clameter@sgi.com, tglx@linutronix.de, arjan@linux.intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC] Patch: dynticks: idle load balancing
Date: Tue, 19 Dec 2006 19:49:03 -0500	[thread overview]
Message-ID: <1166575743.17734.3.camel@localhost.localdomain> (raw)
In-Reply-To: <20061211155304.A31760@unix-os.sc.intel.com>

On Mon, 2006-12-11 at 15:53 -0800, Siddha, Suresh B wrote:

> 
> Comments and review feedback welcome. Minimal testing done on couple of
> i386 platforms. Perf testing yet to be done.

Nice work!

> 
> thanks,
> suresh
> ---


> diff -pNru linux-2.6.19-mm1/include/linux/sched.h linux/include/linux/sched.h
> --- linux-2.6.19-mm1/include/linux/sched.h	2006-12-12 06:39:22.000000000 -0800
> +++ linux/include/linux/sched.h	2006-12-12 06:51:03.000000000 -0800
> @@ -195,6 +195,14 @@ extern void sched_init_smp(void);
>  extern void init_idle(struct task_struct *idle, int cpu);
>  
>  extern cpumask_t nohz_cpu_mask;
> +#ifdef CONFIG_SMP
> +extern int select_notick_load_balancer(int cpu);
> +#else
> +static inline int select_notick_load_balancer(int cpu)

Later on in the actual code, the parameter is named stop_tick, which
makes sense. You should change the name here too so it's not confusing
when looking later on at the code.

> +{
> +	return 0;
> +}
> +#endif

[...]

> +
> +/*
> + * This routine will try to nominate the ilb (idle load balancing)
> + * owner among the cpus whose ticks are stopped. ilb owner will do the idle
> + * load balancing on behalf of all those cpus. If all the cpus in the system
> + * go into this tickless mode, then there will be no ilb owner (as there is
> + * no need for one) and all the cpus will sleep till the next wakeup event
> + * arrives...
> + *
> + * For the ilb owner, tick is not stopped. And this tick will be used
> + * for idle load balancing. ilb owner will still be part of
> + * notick.cpu_mask..
> + *
> + * While stopping the tick, this cpu will become the ilb owner if there
> + * is no other owner. And will be the owner till that cpu becomes busy
> + * or if all cpus in the system stop their ticks at which point
> + * there is no need for ilb owner.
> + *
> + * When the ilb owner becomes busy, it nominates another owner, during the
> + * schedule()
> + */
> +int select_notick_load_balancer(int stop_tick)
> +{
> +	int cpu = smp_processor_id();
> +

[...]

> +#ifdef CONFIG_NO_HZ
> +	if (idle_cpu(local_cpu) && notick.load_balancer == local_cpu &&
> +	    !cpus_empty(cpus))
> +		goto restart;
> +#endif
>  }
>  #else
>  /*
> @@ -3562,6 +3669,21 @@ switch_tasks:
>  		++*switch_count;
>  
>  		prepare_task_switch(rq, next);
> +#if defined(CONFIG_HZ) && defined(CONFIG_SMP)

Ah! so this is where the CONFIG_NO_HZ mistake came in ;)


> +		if (prev == rq->idle && notick.load_balancer == -1) {
> +			/*
> +			 * simple selection for now: Nominate the first cpu in
> +			 * the notick list to be the next ilb owner.
> +			 *
> +			 * TBD: Traverse the sched domains and nominate
> +			 * the nearest cpu in the notick.cpu_mask.
> +			 */
> +			int ilb = first_cpu(notick.cpu_mask);
> +
> +			if (ilb != NR_CPUS)
> +				resched_cpu(ilb);
> +		}
> +#endif
>  		prev = context_switch(rq, prev, next);


-- Steve


      parent reply	other threads:[~2006-12-20  0:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-11 23:53 [RFC] Patch: dynticks: idle load balancing Siddha, Suresh B
2006-12-13 22:43 ` Ingo Molnar
2006-12-13 23:13   ` Ingo Molnar
2006-12-13 23:03     ` Siddha, Suresh B
2006-12-13 23:31       ` Ingo Molnar
2006-12-13 23:19         ` Siddha, Suresh B
2006-12-14  0:34           ` Ingo Molnar
2006-12-19 20:12           ` Ingo Molnar
2006-12-19 21:12             ` Siddha, Suresh B
2007-01-16 11:35               ` Ingo Molnar
2007-01-30 21:57                 ` Siddha, Suresh B
2007-02-07 22:19                   ` Siddha, Suresh B
2007-02-17  2:03                   ` [patch 1/2] sched: fix idle load balancing in softirqd context Siddha, Suresh B
2007-02-17  2:08                     ` [patch 2/2] sched: dynticks idle load balancing - v2 Siddha, Suresh B
2007-02-21 20:23                       ` Andrew Morton
2007-02-22  3:14                         ` Nick Piggin
2007-02-24  2:01                         ` [patch] sched: dynticks idle load balancing - v3 Siddha, Suresh B
2007-02-22  3:26                       ` [patch 2/2] sched: dynticks idle load balancing - v2 Nick Piggin
2007-02-22 22:33                         ` Siddha, Suresh B
2007-02-23  3:43                           ` Nick Piggin
2007-02-17 14:42                     ` [patch 1/2] sched: fix idle load balancing in softirqd context Steven Rostedt
2007-02-21  6:25                       ` Siddha, Suresh B
2007-02-21 20:13                     ` Andrew Morton
2006-12-13 23:48     ` [RFC] Patch: dynticks: idle load balancing Ingo Molnar
2006-12-20  0:49 ` Steven Rostedt [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=1166575743.17734.3.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=arjan@linux.intel.com \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=vatsa@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.