3.0.33-rt54-rc1
Subsystems (4)
cover 3.0.33-rt54-rc1
Dear RT Folks,
This is the RT stable review cycle of patch 3.0.33-rt54-rc1.
Please scream at me if I messed something up. Please test the patches too.
The -rc release will be uploaded to kernel.org and will be deleted when the final release is out. This is just a review release (or release candidate).
The pre-releases will not be pushed to the git repository, only the final release is.
If all goes well, this patch will be converted to the next main release on 6/12/2012.
Enjoy,
-- Steve
To build 3.0.33-rt54-rc1 directly, the following patches should be applied:
http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.xz
http://www.kernel.org/pub/linux/kernel/v3.0/patch-3.0.33.xz
http://www.kernel.org/pub/linux/kernel/projects/rt/3.0/patch-3.0.33-rt54-rc1.patch.xz
You can also build from 3.0.33-rt53 by applying the incremental patch:
http://www.kernel.org/pub/linux/kernel/projects/rt/3.0/incr/patch-3.0.33-rt53-rt54-rc1.patch.xz
Changes from 3.0.33-rt53:
---
John Kacur (1):
scsi: qla2xxx: Use local_irq_save_nort() in qla2x00_poll
Priyanka Jain (1):
net,RT:REmove preemption disabling in netif_rx()
Steven Rostedt (1):
Linux 3.0.33-rt54-rc1
Thomas Gleixner (1):
mips-remove-smp-reserve-lock.patch
----
arch/mips/cavium-octeon/smp.c | 6 ------ drivers/scsi/qla2xxx/qla_inline.h | 4 ++-- localversion-rt | 2 +- net/core/dev.c | 8 ++++---- 4 files changed, 7 insertions(+), 13 deletions(-)
PATCH 1/4 scsi: qla2xxx: Use local_irq_save_nort() in qla2x00_poll
From: John Kacur <[email protected]>
RT triggers the following:
[ 11.307652] [<ffffffff81077b27>] __might_sleep+0xe7/0x110 [ 11.307663] [<ffffffff8150e524>] rt_spin_lock+0x24/0x60 [ 11.307670] [<ffffffff8150da78>] ? rt_spin_lock_slowunlock+0x78/0x90 [ 11.307703] [<ffffffffa0272d83>] qla24xx_intr_handler+0x63/0x2d0 [qla2xxx] [ 11.307736] [<ffffffffa0262307>] qla2x00_poll+0x67/0x90 [qla2xxx]
Function qla2x00_poll does local_irq_save() before calling qla24xx_intr_handler which has a spinlock. Since spinlocks are sleepable on rt, it is not allowed to call them with interrupts disabled. Therefore we use local_irq_save_nort() instead which saves flags without disabling interrupts.
This fix needs to be applied to v3.0-rt, v3.2-rt and v3.4-rt
--- drivers/scsi/qla2xxx/qla_inline.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_inline.h +2 -2
@@ -36,12 +36,12 @@ qla2x00_poll(struct rsp_que *rsp) {unsigned long flags;struct qla_hw_data *ha = rsp->hw; -local_irq_save (flags); +local_irq_save_nort (flags);if (IS_QLA82XX (ha))qla82xx_poll (0 , rsp);else ha->isp_ops->intr_handler (0 , rsp); -local_irq_restore (flags); +local_irq_restore_nort (flags); } static inline uint8_t *
Signature · 1 line
1.7.10
PATCH 2/4 net,RT:REmove preemption disabling in netif_rx()
In reply to Steven RostedtFrom: Priyanka Jain <[email protected]>
1)enqueue_to_backlog() (called from netif_rx) should be
bind to a particluar CPU. This can be achieved by disabling migration. No need to disable preemption
2)Fixes crash "BUG: scheduling while atomic: ksoftirqd"
in case of RT.
If preemption is disabled, enqueue_to_backog() is called in atomic context. And if backlog exceeds its count, kfree_skb() is called. But in RT, kfree_skb() might gets scheduled out, so it expects non atomic context.
3)When CONFIG_PREEMPT_RT_FULL is not defined,
migrate_enable(), migrate_disable() maps to
preempt_enable() and preempt_disable(), so no
change in functionality in case of non-RT.
-Replace preempt_enable(), preempt_disable() with
migrate_enable(), migrate_disable() respectively
-Replace get_cpu(), put_cpu() with get_cpu_light(),
put_cpu_light() respectively
--- net/core/dev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/core/dev.c +4 -4
@@ -2898,7 +2898,7 @@ int netif_rx(struct sk_buff *skb)struct rps_dev_flow voidflow, *rflow = &voidflow;int cpu; -preempt_disable (); +migrate_disable ();rcu_read_lock (); cpu =get_rps_cpu (skb->dev, skb, &rflow);
@@ -2908,13 +2908,13 @@ int netif_rx(struct sk_buff *skb) ret =enqueue_to_backlog (skb, cpu, &rflow->last_qtail);rcu_read_unlock (); - preempt_enable(); + migrate_enable(); }#else {unsigned int qtail; - ret =enqueue_to_backlog (skb,get_cpu (), &qtail); -put_cpu (); + ret =enqueue_to_backlog (skb,get_cpu_light (), &qtail); +put_cpu_light (); }#endif return ret;
Signature · 1 line
1.7.10
PATCH 3/4 mips-remove-smp-reserve-lock.patch
In reply to Steven RostedtFrom: Thomas Gleixner <[email protected]>
Instead of making the lock raw, remove it as it protects nothing.
--- arch/mips/cavium-octeon/smp.c | 6 ------ 1 file changed, 6 deletions(-)
arch/mips/cavium-octeon/smp.c +0 -6
@@ -257,8 +257,6 @@ DEFINE_PER_CPU(int, cpu_state);extern void fixup_irqs (void ); -static DEFINE_SPINLOCK (smp_reserve_lock); -static int octeon_cpu_disable (void ) {unsigned int cpu =smp_processor_id ();
@@ -266,8 +264,6 @@ static int octeon_cpu_disable(void)if (cpu ==0 )return -EBUSY ; -spin_lock (&smp_reserve_lock); -cpu_clear (cpu, cpu_online_map);cpu_clear (cpu, cpu_callin_map);local_irq_disable ();
@@ -277,8 +273,6 @@ static int octeon_cpu_disable(void)flush_cache_all ();local_flush_tlb_all (); -spin_unlock (&smp_reserve_lock); -return 0 ; }
Signature · 1 line
1.7.10
Re: [PATCH RT 3/4] mips-remove-smp-reserve-lock.patch
Quoted 3 lines · Steven Rostedt
From: Thomas Gleixner<[email protected]>
Instead of making the lock raw, remove it as it protects nothing.
I don't know how you guys are managing the RT branch, but this seems quite similar to:
a3c8b4faeeccb33dbad6969bc9e50bf409f167e7 (MIPS: Cavium: Remove smp_reserve_lock.)
David Daney
Quoted 39 lines
Signed-off-by Thomas Gleixner<[email protected]>Signed-off-by Steven Rostedt<[email protected]>--- arch/mips/cavium-octeon/smp.c | 6 ------ 1 file changed, 6 deletions(-)arch/mips/cavium-octeon/smp.c +0
-6@@ -257,8 +257,6 @@ DEFINE_PER_CPU(int, cpu_state);extern void fixup_irqs (void ); -static DEFINE_SPINLOCK (smp_reserve_lock); -static int octeon_cpu_disable (void ) {unsigned int cpu =smp_processor_id ();@@ -266,8 +264,6 @@ static int octeon_cpu_disable(void)if (cpu ==0 )return -EBUSY ; -spin_lock (&smp_reserve_lock); -cpu_clear (cpu, cpu_online_map);cpu_clear (cpu, cpu_callin_map);local_irq_disable ();@@ -277,8 +273,6 @@ static int octeon_cpu_disable(void)flush_cache_all ();local_flush_tlb_all (); -spin_unlock (&smp_reserve_lock); -return 0 ; }
Re: [PATCH RT 3/4] mips-remove-smp-reserve-lock.patch
Quoted 10 lines · David Daney
Quoted 3 lines · Steven Rostedt
From: Thomas Gleixner<[email protected]>
Instead of making the lock raw, remove it as it protects nothing.
I don't know how you guys are managing the RT branch, but this seems quite similar to:
a3c8b4faeeccb33dbad6969bc9e50bf409f167e7(MIPS: Cavium: Removesmp_reserve_lock.)
Great! Then we don't need to worry about it :-)
But as it doesn't seem that this patch was marked as stable, we will be carrying it in -rt where we support older kernels.
Should it go to mainline stable?
-- Steve
Quoted 3 lines
David Daney
Re: [PATCH RT 3/4] mips-remove-smp-reserve-lock.patch
Quoted 12 lines · Steven Rostedt
Quoted 10 lines · David Daney
Quoted 3 lines · Steven Rostedt
From: Thomas Gleixner<[email protected]>
Instead of making the lock raw, remove it as it protects nothing.
I don't know how you guys are managing the RT branch, but this seems quite similar to:
a3c8b4faeeccb33dbad6969bc9e50bf409f167e7(MIPS: Cavium: Removesmp_reserve_lock.)
Quoted 7 lines
Great! Then we don't need to worry about it :-)
But as it doesn't seem that this patch was marked as stable, we will be carrying it in -rt where we support older kernels.
Should it go to mainline stable?
I don't think it is necessary. As far as I know, RT may be the only thing that needs it.
David Daney
Quoted 7 lines
-- Steve
Quoted 3 lines
David Daney
Re: [PATCH RT 3/4] mips-remove-smp-reserve-lock.patch
Quoted 5 lines · David Daney
Quoted 2 lines
Should it go to mainline stable?
I don't think it is necessary. As far as I know, RT may be the only thing that needs it.
Ah, you're right. As this is just an issue because it is called with interrupts disabled (from stop_machine). Although it's interesting that the mips code, re-enables interrupts from that function.
Quoted 1 line
From
kernel/cpu.c:
_cpu_down() {
__stop_machine(take_cpu_down, &tcd_param, cpumask_of(cpu));take_cpu_down() {
err = __cpu_disable();kernel/stop_machine.c:
__stop_machine(int (*fn)(void *) ...) {
local_irq_save(flags);
hard_irq_disable();
ret = (*fn)(data);
local_irq_restore(flags);arch/mips/include/asm/smp.h:
static inline int __cpu_disable(void)
{
extern struct plat_smp_ops *mp_ops; /* private */
return mp_ops->cpu_disable();
}
arch/mips/cavium-octeon/smp.c:
octeon_cpu_disable(void) {
local_irq_disable();
fixup_irqs();
local_irq_enable();struct plat_smp_ops octeon_smp_ops = {
.cpu_disable = octeon_cpu_disable,
Is this expected? It causes the cpu notifiers to be called with interrupts enabled. Not sure if that's a problem or not.
-- Steve
Re: [PATCH RT 3/4] mips-remove-smp-reserve-lock.patch
Quoted 45 lines · Steven Rostedt
Quoted 5 lines · David Daney
Quoted 2 lines
Should it go to mainline stable?
I don't think it is necessary. As far as I know, RT may be the only thing that needs it.
Ah, you're right. As this is just an issue because it is called with interrupts disabled (from
stop_machine). Although it's interesting that the mips code, re-enables interrupts from that function.From
kernel/cpu.c:_cpu_down() { __stop_machine(take_cpu_down,&tcd_param, cpumask_of(cpu));take_cpu_down() { err = __cpu_disable();
kernel/stop_machine.c:__stop_machine(int (*fn)(void *) ...) { local_irq_save(flags); hard_irq_disable(); ret = (*fn)(data); local_irq_restore(flags);
arch/mips/include/asm/smp.h:static inline int
__cpu_disable(void)
{
extern structplat_smp_ops*mp_ops; /* private */return
mp_ops->cpu_disable();
}
arch/mips/cavium-octeon/smp.c:octeon_cpu_disable(void) { local_irq_disable(); fixup_irqs(); local_irq_enable();
Quoted 6 lines
struct
plat_smp_opsocteon_smp_ops= {
.cpu_disable =octeon_cpu_disable,Is this expected? It causes the cpu notifiers to be called with interrupts enabled. Not sure if that's a problem or not.
I am inclined to go with your instinct here. Probably we shouldn't unconditionally local_irq_enable() here.
Perhaps {,raw}_local_irq_save/{,raw}local_irq_restore would be better. Or even no local irq enable manipulation...
In any event, I may let Ralf sort it out.
David Daney
PATCH 4/4 Linux 3.0.33-rt54-rc1
In reply to Steven RostedtFrom: Steven Rostedt <[email protected]>
--- localversion-rt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
localversion-rt +1 -1
@@ -1 +1 @@ --rt53 +-rt54-rc1
Signature · 1 line
1.7.10