Re: [PATCH] Fix preemption off of irq context on x86-64 with PREEMPT_BKL

2005-03-27 Thread Andi Kleen
On Sun, Mar 27, 2005 at 01:19:06AM +0100, Christophe Saout wrote:
> Hi,
> 
> > x86_64-fix-config_preempt.patch
> >   x86_64: Fix CONFIG_PREEMPT
> 
> This patch causes another bug to show up some lines below with
> CONFIG_PREEMPT_BKL. schedule releases the BKL which it shouldn't do.
> 
> Call preempt_schedule_irq instead (like for i386). This seems to fix the
> easily reproducible filesystem errors I've seen (with reiserfs, which
> heavily relies on the BKL).

I would not apply this one for now. It needs checking if the
patch that requires this change does not require more changes.

-Andi


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Fix preemption off of irq context on x86-64 with PREEMPT_BKL

2005-03-26 Thread Christophe Saout
Hi,

> x86_64-fix-config_preempt.patch
>   x86_64: Fix CONFIG_PREEMPT

This patch causes another bug to show up some lines below with
CONFIG_PREEMPT_BKL. schedule releases the BKL which it shouldn't do.

Call preempt_schedule_irq instead (like for i386). This seems to fix the
easily reproducible filesystem errors I've seen (with reiserfs, which
heavily relies on the BKL).

Signed-off-by: Christophe Saout <[EMAIL PROTECTED]>

--- linux-2.6.12-rc1-mm2.orig/arch/x86_64/kernel/entry.S2005-03-24 
17:32:22.0 +0100
+++ linux-2.6.12-rc1-mm2/arch/x86_64/kernel/entry.S 2005-03-26 
23:40:30.0 +0100
@@ -517,12 +517,7 @@
jnc  retint_restore_args
bt   $9,EFLAGS-ARGOFFSET(%rsp)  /* interrupts off? */
jnc  retint_restore_args
-   movl $PREEMPT_ACTIVE,threadinfo_preempt_count(%rcx)
-   sti
-   call schedule
-   cli
-   GET_THREAD_INFO(%rcx)
-   movl $0,threadinfo_preempt_count(%rcx) 
+   call preempt_schedule_irq
jmp exit_intr
 #endif 
CFI_ENDPROC



signature.asc
Description: This is a digitally signed message part