mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Daniel Walker <dwalker@mvista.com>
Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: Re: v2.6.23-rc1-rt6-dw1
Date: Sun, 29 Jul 2007 22:20:31 -0700	[thread overview]
Message-ID: <1185772831.2686.6.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <1185765740.2636.2.camel@imap.mvista.com>

>  
> +/*
> + * trigger a reschedule on all other CPUs:
> + */
> +extern void smp_send_reschedule_allbutself(void);
> +
> +/*
> + * trigger a reschedule on all other CPUs:
> + */
> +extern void smp_send_reschedule_allbutself(void);
> +

just to make sure the C compiler doesn't forget it ?
or maybe the parser is suffering from memory lapse ? ;)

>  
> -#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
> +#if defined(CONFIG_DEBUG_SPINLOCK_SLEEP) || defined(CONFIG_DEBUG_PREEMPT)

why this change? the change is for spinlock debugging.. why add preempt
to this?


>    void __might_sleep(char *file, int line);
>  # define might_sleep() \
>  	do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
> @@ -198,6 +198,7 @@ extern void add_taint(unsigned);
>  /* Values used for system_state */
>  extern enum system_states {
>  	SYSTEM_BOOTING,
> +	SYSTEM_BOOTING_SCHEDULER_OK,

what is this used for? your patch doesn't add users of this...

>  	SYSTEM_RUNNING,
>  	SYSTEM_HALT,
>  	SYSTEM_POWER_OFF,
> --- linux-2.6.22.orig/init/main.c
> +++ linux-2.6.22/init/main.c
> @@ -438,6 +438,8 @@ static void noinline __init_refok rest_i
>  {
>  	int pid;
>  
> +	system_state = SYSTEM_BOOTING_SCHEDULER_OK;
> +
>  	kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);
>  	numa_default_policy();
>  	pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
> --- linux-2.6.22.orig/lib/kernel_lock.c
> +++ linux-2.6.22/lib/kernel_lock.c
> @@ -35,22 +35,25 @@ DECLARE_MUTEX(kernel_sem);
>   * about recursion, both due to the down() and due to the enabling of
>   * preemption. schedule() will re-check the preemption flag after
>   * reacquiring the semaphore.
> + *
> + * Called with interrupts disabled.
>   */
>  int __lockfunc __reacquire_kernel_lock(void)
>  {
>  	struct task_struct *task = current;
>  	int saved_lock_depth = task->lock_depth;
>  
> +	local_irq_enable();

eh... if interrupts are off here that's a bad bug. Why work around it?

>  	BUG_ON(saved_lock_depth < 0);
>  
>  	task->lock_depth = -1;
> -	__preempt_enable_no_resched();
>  
>  	down(&kernel_sem);
>  
> -	preempt_disable();
>  	task->lock_depth = saved_lock_depth;
>  
> +	local_irq_disable();
> +

same here..

>  int __lockfunc __reacquire_kernel_lock(void)
>  {
> -	while (!_raw_spin_trylock(&kernel_flag)) {
> -		if (test_thread_flag(TIF_NEED_RESCHED))
> -			return -EAGAIN;
> -		cpu_relax();
> -	}
> +	local_irq_enable();
> +	_raw_spin_lock(&kernel_flag);
> +	local_irq_disable();

are you sure you want this semantics change?




  parent reply	other threads:[~2007-07-30  5:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-30  3:22 v2.6.23-rc1-rt6-dw1 Daniel Walker
2007-07-30  5:17 ` v2.6.23-rc1-rt6-dw1 Arjan van de Ven
2007-07-30  5:20 ` Arjan van de Ven [this message]
2007-07-30 15:59   ` v2.6.23-rc1-rt6-dw1 Daniel Walker

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=1185772831.2686.6.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=dwalker@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.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

all inboxes | Powered by JetHome®