* [PATCH] Convert tlbstate_lock spin_lock to raw_spin_lock [not found] <2c6d8d720809071806i54e58093vf87bec5175d9b074@mail.gmail.com> @ 2008-09-08 7:37 ` Chirag Jog 2008-09-08 14:15 ` Sujit Karataparambil 0 siblings, 1 reply; 3+ messages in thread From: Chirag Jog @ 2008-09-08 7:37 UTC (permalink / raw) To: xavier droubay; +Cc: linux-rt-users, LKML, Steven Rostedt, Thomas Gleixner * xavier droubay <xavier.droubay@gmail.com> [2008-09-08 03:06:51]: > Hello, > > I experienced this "rtmutex.c:743" known bug with rt3 patch, using > > http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.3.tar.bz2 > http://rt.et.redhat.com/download/patch-2.6.26.3-rt3.bz2 > > I compiled this kernel with the "make-kpkg" debian utility. > > I first compiled this kernel with NO SMP, NO HIGHMEM, and partial ACPI > (without fan, processor, ... modules). Attached file > "config-2.6.26.3-rt3lowlty.frwr.gz". > I didn't experience any problem with this kernel. > > I then enabled SMP and HIGHMEM, and experienced "rtmutex.c:743" BUG. > Attached files > "config-2.6.26.3-rt3rt-smp-hm.gz" and "dmesg.gz" for some BUGGY message. > > > I have seen somewhere on the archive, that some people still > experienced problems with SMP. > I guess no fix has been done from rt3 to rt7 patch. Can you confirm? > > If so, which recent kernel should I use in order to get smp and rt > running without problems? > This simple patch should solve the above problem. Seeing the config, its seems to be a 32bit box. It convert tlbstate_lock spin_lock to raw_spin_lock. Preemption has already been disabled, hence this change shouldn't affect latency numbers. Signed-Off-By: Chirag <chirag@linux.vnet.ibm.com> diff --git a/arch/x86/kernel/tlb_32.c b/arch/x86/kernel/tlb_32.c index 9bb2363..228849c 100644 --- a/arch/x86/kernel/tlb_32.c +++ b/arch/x86/kernel/tlb_32.c @@ -23,7 +23,7 @@ DEFINE_PER_CPU(struct tlb_state, cpu_tlbstate) static cpumask_t flush_cpumask; static struct mm_struct *flush_mm; static unsigned long flush_va; -static DEFINE_SPINLOCK(tlbstate_lock); +static DEFINE_RAW_SPINLOCK(tlbstate_lock); /* * We cannot call mmdrop() because we are in interrupt context, ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Convert tlbstate_lock spin_lock to raw_spin_lock 2008-09-08 7:37 ` [PATCH] Convert tlbstate_lock spin_lock to raw_spin_lock Chirag Jog @ 2008-09-08 14:15 ` Sujit Karataparambil 2008-09-08 15:04 ` Steven Rostedt 0 siblings, 1 reply; 3+ messages in thread From: Sujit Karataparambil @ 2008-09-08 14:15 UTC (permalink / raw) Cc: linux-rt-users Chirag, Kindly understand what xavier is trying to do. He is Trying to disable smp. The RT - Linux Code is dependent on the mutex lock to perform some soft/hard real time processing. This is an problem with the mutex lock. Kindly check with some one before signing off patches. Thanks, Sujit On 9/8/08, Chirag Jog <chirag@linux.vnet.ibm.com> wrote: > * xavier droubay <xavier.droubay@gmail.com> [2008-09-08 03:06:51]: > > > Hello, > > > > I experienced this "rtmutex.c:743" known bug with rt3 patch, using > > > > http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.3.tar.bz2 > > http://rt.et.redhat.com/download/patch-2.6.26.3-rt3.bz2 > > > > I compiled this kernel with the "make-kpkg" debian utility. > > > > I first compiled this kernel with NO SMP, NO HIGHMEM, and partial ACPI > > (without fan, processor, ... modules). Attached file > > "config-2.6.26.3-rt3lowlty.frwr.gz". > > I didn't experience any problem with this kernel. > > > > I then enabled SMP and HIGHMEM, and experienced "rtmutex.c:743" BUG. > > Attached files > > "config-2.6.26.3-rt3rt-smp-hm.gz" and "dmesg.gz" for some BUGGY message. > > > > > > I have seen somewhere on the archive, that some people still > > experienced problems with SMP. > > I guess no fix has been done from rt3 to rt7 patch. Can you confirm? > > > > If so, which recent kernel should I use in order to get smp and rt > > running without problems? > > > This simple patch should solve the above problem. Seeing the config, its > seems to be a 32bit box. > > > It convert tlbstate_lock spin_lock to raw_spin_lock. > Preemption has already been disabled, hence this change shouldn't > affect latency numbers. > > > Signed-Off-By: Chirag <chirag@linux.vnet.ibm.com> > > > diff --git a/arch/x86/kernel/tlb_32.c b/arch/x86/kernel/tlb_32.c > index 9bb2363..228849c 100644 > --- a/arch/x86/kernel/tlb_32.c > +++ b/arch/x86/kernel/tlb_32.c > @@ -23,7 +23,7 @@ DEFINE_PER_CPU(struct tlb_state, cpu_tlbstate) > static cpumask_t flush_cpumask; > static struct mm_struct *flush_mm; > static unsigned long flush_va; > -static DEFINE_SPINLOCK(tlbstate_lock); > +static DEFINE_RAW_SPINLOCK(tlbstate_lock); > > /* > * We cannot call mmdrop() because we are in interrupt context, > > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- --linux(2.4/2.6),bsd(4.5.x+),solaris(2.5+) ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Convert tlbstate_lock spin_lock to raw_spin_lock 2008-09-08 14:15 ` Sujit Karataparambil @ 2008-09-08 15:04 ` Steven Rostedt 0 siblings, 0 replies; 3+ messages in thread From: Steven Rostedt @ 2008-09-08 15:04 UTC (permalink / raw) To: Sujit Karataparambil Cc: linux-rt-users, xavier droubay, Chirag Jog, Thomas Gleixner, LKML [ Refrain from using "unlisted-recipients" please! ] On Mon, 8 Sep 2008, Sujit Karataparambil wrote: > Chirag, > > Kindly understand what xavier is trying to do. He is Trying to disable smp. > The RT - Linux Code is dependent on the mutex lock to perform some > soft/hard real time processing. This is an problem with the mutex lock. It is not a problem with the mutex lock. > > Kindly check with some one before signing off patches. The patch is legit. The problem is simply that functions like flush_tlb_current_task and flush_tlb_mm disable preemption and then call flush_tlb_others. This function locks the tlbstate_lock which is currently a rtmutex. An rtmutex can not be called with preemption disabled. The tlbstate_lock is static, small and confined. I'm not sure we can change this code (flushing the TLB) in a way where we can allow preemption. This may just be a latency that we must hit. -- Steve ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-08 15:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <2c6d8d720809071806i54e58093vf87bec5175d9b074@mail.gmail.com>
2008-09-08 7:37 ` [PATCH] Convert tlbstate_lock spin_lock to raw_spin_lock Chirag Jog
2008-09-08 14:15 ` Sujit Karataparambil
2008-09-08 15:04 ` Steven Rostedt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox