All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: henrik@austad.us
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org,
	Henrik Austad <henrik.austad@gmail.com>
Subject: Re: sched: add CONFIG_SMP consistency
Date: Tue, 21 Oct 2008 21:01:21 +0200	[thread overview]
Message-ID: <1224615681.661.3.camel@twins> (raw)
In-Reply-To: <1224614719-14452-1-git-send-email-henrik@austad.us>

On Tue, 2008-10-21 at 20:45 +0200, henrik@austad.us wrote:
> From: Henrik Austad <henrik.austad@gmail.com>
> 
> Do not declare select_task_rq as part of sched_class when CONFIG_SMP is
> not set.

While a proper cleanup, could you do it by re-arranging the methods so
as to not create an additional ifdef?

Thanks

> Signed-off-by: Henrik Austad <henrik.austad@gmail.com>
> ---
>  include/linux/sched.h |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index c226c7b..9e0e33c 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -898,8 +898,9 @@ struct sched_class {
>  	void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup);
>  	void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep);
>  	void (*yield_task) (struct rq *rq);
> +#ifdef CONFIG_SMP
>  	int  (*select_task_rq)(struct task_struct *p, int sync);
> -
> +#endif
>  	void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int sync);
>  
>  	struct task_struct * (*pick_next_task) (struct rq *rq);

  reply	other threads:[~2008-10-21 19:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21 18:45 sched: add CONFIG_SMP consistency henrik
2008-10-21 19:01 ` Peter Zijlstra [this message]
2008-10-22  7:25   ` Li Zefan
2008-10-22  7:36     ` Ingo Molnar
2008-10-22  7:56       ` Peter Zijlstra
2008-10-22  8:00       ` Henrik Austad

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=1224615681.661.3.camel@twins \
    --to=peterz@infradead.org \
    --cc=henrik.austad@gmail.com \
    --cc=henrik@austad.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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.