Skip to contentSkip to conversation

v3.0.9-rt26-rc1

PATCH In review Steven Rostedt 2 participants 8 messages Nov 19, 2011 – Nov 20, 2011

Subsystems (4)
lore
Share & tools
lore

Steven Rostedt

author reviewer
#0 lore raw

cover v3.0.9-rt26-rc1

Dear RT Folks,

This is the RT stable review cycle. As I am just starting to manage the 3.0-rt stable tree, I'm in the process of creating scripts and such to send out patches. I will always send out a -rc1 to give people a chance to yell at me for something stupid I did. It will also allow others to run this under their own tests as I have a limited testing that I do.

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).

I will also be updating the git tree on kernel.org with the final release but the pre releases will not be in the public tree. The final release will also include the full broken out patches.

to build a 3.0.9-rt26-rc1 tree, 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.9.xz

http://www.kernel.org/pub/linux/kernel/projects/rt/3.0/patch-3.0.9-rt26-rc1.patch.xz

You can also build from 3.0.9-rt25 by applying the incremental patch:

http://www.kernel.org/pub/linux/kernel/projects/rt/3.0/incr/patch-3.0.9-rt25-rt26-rc1.patch.xz

If all goes well, this patch will be converted to the main release next Tuesday: 11/22/2011

Enjoy,

-- Steve

John Kacur (2):
softirq: Export in_serving_softirq()
rcu: Fix macro substitution for synchronize_rcu_bh() on RT

Peter Zijlstra (1):
x86: crypto: Reduce preempt disabled regions

Thomas Gleixner (1):
dm: Make rt aware

----

 arch/x86/crypto/aesni-intel_glue.c |   24 +++++++++++++-----------
 drivers/md/dm.c                    |    4 ++--
 include/linux/rcutree.h            |    2 +-
 kernel/softirq.c                   |    1 +
 4 files changed, 17 insertions(+), 14 deletions(-)
author reviewer
#1 lore raw

PATCH 1/5 softirq: Export in_serving_softirq()

From: John Kacur <[email protected]>

ERROR: "in_serving_softirq" [net/sched/cls_cgroup.ko] undefined!

The above can be fixed by exporting in_serving_softirq

---
 kernel/softirq.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
kernel/softirq.c +1 -0
index e8756aa..026a283 100644
@@ -447,6 +447,7 @@ int in_serving_softirq(void)
 	preempt_enable();
 	return res;
 }
+EXPORT_SYMBOL(in_serving_softirq);
 
 /*
  * Called with bh and local interrupts disabled. For full RT cpu must
Signature · 1 line
1.7.7.1
Reviewed-by on v1 1/5
#2 lore raw

Re: [PATCH 1/5] softirq: Export in_serving_softirq()

Quoted 8 lines · Steven Rostedt

From: John Kacur <[email protected]>

ERROR: "in_serving_softirq" [net/sched/cls_cgroup.ko] undefined!

The above can be fixed by exporting in_serving_softirq

Cc Paul McKenney <[email protected]>
Quoted 24 lines
---
 kernel/softirq.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
kernel/softirq.c +1 -0
index e8756aa..026a283 100644
@@ -447,6 +447,7 @@ int in_serving_softirq(void)
 	preempt_enable();
 	return res;
 }
+EXPORT_SYMBOL(in_serving_softirq);
 
 /*
  * Called with bh and local interrupts disabled. For full RT cpu must
Signature · 1 line
1.7.7.1
author reviewer
#3 lore raw

PATCH 2/5 rcu: Fix macro substitution for synchronize_rcu_bh() on RT

In reply to Steven Rostedt

From: John Kacur <[email protected]>

kernel/rcutorture.c:492: error: ‘synchronize_rcu_bh’ undeclared here (not in a function)

synchronize_rcu_bh() is not just called as a normal function, but can also be referenced as a function pointer. When CONFIG_PREEMPT_RT_FULL is enabled, synchronize_rcu_bh() is defined as synchronize_rcu(), but needs to be defined without the parenthesis because the compiler will complain when synchronize_rcu_bh is referenced as a function pointer and not a function.

---
 include/linux/rcutree.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/rcutree.h +1 -1
index 7a25aea..3bf47dc 100644
@@ -60,7 +60,7 @@ static inline void exit_rcu(void)
 #ifndef CONFIG_PREEMPT_RT_FULL
 extern void synchronize_rcu_bh(void);
 #else
-# define synchronize_rcu_bh()	synchronize_rcu()
+# define synchronize_rcu_bh	synchronize_rcu
 #endif
 extern void synchronize_sched_expedited(void);
 extern void synchronize_rcu_expedited(void);
Signature · 1 line
1.7.7.1
Reviewed-by on v1 2/5
#4 lore raw

Re: [PATCH 2/5] rcu: Fix macro substitution for synchronize_rcu_bh() on RT

Quoted 11 lines · Steven Rostedt

From: John Kacur <[email protected]>

kernel/rcutorture.c:492: error: ‘synchronize_rcu_bh’ undeclared here (not in a function)

synchronize_rcu_bh() is not just called as a normal function, but can also be referenced as a function pointer. When CONFIG_PREEMPT_RT_FULL is enabled, synchronize_rcu_bh() is defined as synchronize_rcu(), but needs to be defined without the parenthesis because the compiler will complain when synchronize_rcu_bh is referenced as a function pointer and not a function.

Quoted 6 lines
Quoted 21 lines
---
 include/linux/rcutree.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/rcutree.h +1 -1
index 7a25aea..3bf47dc 100644
@@ -60,7 +60,7 @@ static inline void exit_rcu(void)
 #ifndef CONFIG_PREEMPT_RT_FULL
 extern void synchronize_rcu_bh(void);
 #else
-# define synchronize_rcu_bh()	synchronize_rcu()
+# define synchronize_rcu_bh	synchronize_rcu
 #endif
 extern void synchronize_sched_expedited(void);
 extern void synchronize_rcu_expedited(void);
Signature · 1 line
1.7.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author reviewer
#5 lore raw

PATCH 3/5 x86: crypto: Reduce preempt disabled regions

In reply to Steven Rostedt

From: Peter Zijlstra <[email protected]>

Restrict the preempt disabled regions to the actual floating point operations and enable preemption for the administrative actions.

This is necessary on RT to avoid that kfree and other operations are called with preemption disabled.

---
 arch/x86/crypto/aesni-intel_glue.c |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)
arch/x86/crypto/aesni-intel_glue.c +13 -11
index feee8ff..81ec77c 100644
@@ -288,14 +288,14 @@ static int ecb_encrypt(struct blkcipher_desc *desc,
 	err = blkcipher_walk_virt(desc, &walk);
 	desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
 
-	kernel_fpu_begin();
 	while ((nbytes = walk.nbytes)) {
+		kernel_fpu_begin();
 		aesni_ecb_enc(ctx, walk.dst.virt.addr, walk.src.virt.addr,
-			      nbytes & AES_BLOCK_MASK);
+				nbytes & AES_BLOCK_MASK);
+		kernel_fpu_end();
 		nbytes &= AES_BLOCK_SIZE - 1;
 		err = blkcipher_walk_done(desc, &walk, nbytes);
 	}
-	kernel_fpu_end();
 
 	return err;
 }
@@ -312,14 +312,14 @@ static int ecb_decrypt(struct blkcipher_desc *desc,
 	err = blkcipher_walk_virt(desc, &walk);
 	desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
 
-	kernel_fpu_begin();
 	while ((nbytes = walk.nbytes)) {
+		kernel_fpu_begin();
 		aesni_ecb_dec(ctx, walk.dst.virt.addr, walk.src.virt.addr,
 			      nbytes & AES_BLOCK_MASK);
+		kernel_fpu_end();
 		nbytes &= AES_BLOCK_SIZE - 1;
 		err = blkcipher_walk_done(desc, &walk, nbytes);
 	}
-	kernel_fpu_end();
 
 	return err;
 }
@@ -358,14 +358,14 @@ static int cbc_encrypt(struct blkcipher_desc *desc,
 	err = blkcipher_walk_virt(desc, &walk);
 	desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
 
-	kernel_fpu_begin();
 	while ((nbytes = walk.nbytes)) {
+		kernel_fpu_begin();
 		aesni_cbc_enc(ctx, walk.dst.virt.addr, walk.src.virt.addr,
 			      nbytes & AES_BLOCK_MASK, walk.iv);
+		kernel_fpu_end();
 		nbytes &= AES_BLOCK_SIZE - 1;
 		err = blkcipher_walk_done(desc, &walk, nbytes);
 	}
-	kernel_fpu_end();
 
 	return err;
 }
@@ -382,14 +382,14 @@ static int cbc_decrypt(struct blkcipher_desc *desc,
 	err = blkcipher_walk_virt(desc, &walk);
 	desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
 
-	kernel_fpu_begin();
 	while ((nbytes = walk.nbytes)) {
+		kernel_fpu_begin();
 		aesni_cbc_dec(ctx, walk.dst.virt.addr, walk.src.virt.addr,
 			      nbytes & AES_BLOCK_MASK, walk.iv);
+		kernel_fpu_end();
 		nbytes &= AES_BLOCK_SIZE - 1;
 		err = blkcipher_walk_done(desc, &walk, nbytes);
 	}
-	kernel_fpu_end();
 
 	return err;
 }
@@ -444,18 +444,20 @@ static int ctr_crypt(struct blkcipher_desc *desc,
 	err = blkcipher_walk_virt_block(desc, &walk, AES_BLOCK_SIZE);
 	desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
 
-	kernel_fpu_begin();
 	while ((nbytes = walk.nbytes) >= AES_BLOCK_SIZE) {
+		kernel_fpu_begin();
 		aesni_ctr_enc(ctx, walk.dst.virt.addr, walk.src.virt.addr,
 			      nbytes & AES_BLOCK_MASK, walk.iv);
+		kernel_fpu_end();
 		nbytes &= AES_BLOCK_SIZE - 1;
 		err = blkcipher_walk_done(desc, &walk, nbytes);
 	}
 	if (walk.nbytes) {
+		kernel_fpu_begin();
 		ctr_crypt_final(ctx, &walk);
+		kernel_fpu_end();
 		err = blkcipher_walk_done(desc, &walk, 0);
 	}
-	kernel_fpu_end();
 
 	return err;
 }
Signature · 1 line
1.7.7.1
author reviewer
#6 lore raw

PATCH 4/5 dm: Make rt aware

In reply to Steven Rostedt

From: Thomas Gleixner <[email protected]>

Use the BUG_ON_NONRT variant for the irq_disabled() checks. RT has interrupts legitimately enabled here as we cant deadlock against the irq thread due to the "sleeping spinlocks" conversion.

---
 drivers/md/dm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/md/dm.c +2 -2
index 41abc6d..67207d6 100644
@@ -1644,14 +1644,14 @@ static void dm_request_fn(struct request_queue *q)
 		if (map_request(ti, clone, md))
 			goto requeued;
 
-		BUG_ON(!irqs_disabled());
+		BUG_ON_NONRT(!irqs_disabled());
 		spin_lock(q->queue_lock);
 	}
 
 	goto out;
 
 requeued:
-	BUG_ON(!irqs_disabled());
+	BUG_ON_NONRT(!irqs_disabled());
 	spin_lock(q->queue_lock);
 
 delay_and_out:
Signature · 1 line
1.7.7.1
author reviewer
#7 lore raw

PATCH 5/5 Linux 3.0.9-rt26-rc1

In reply to Steven Rostedt

From: Steven Rostedt <[email protected]>

---
 localversion-rt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
localversion-rt +1 -1
index c5b71f9..02556f4 100644
@@ -1 +1 @@
--rt25
+-rt26-rc1
Signature · 1 line
1.7.7.1