Skip to contentSkip to conversation

3.0.23-rt40-rc1

PATCH In review Steven Rostedt 2 participants 10 messages Mar 14, 2012

Subsystems (7)
Networking VFS Block layer ACPI +3 more subsystems
lore
Share & tools
lore

Steven Rostedt

author reviewer
#0 lore raw

cover 3.0.23-rt40-rc1

Dear RT Folks,

This is the RT stable review cycle of patch 3.0.23-rt40-rc1.

Please scream at me if I messed something up. Please test the patches too.

Note that this release will be quick, and I plan on pushing out 3.0.23-rt40 tomorrow, and start testing and release 3.0.24-rt41.

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 3/14/2012.

Enjoy,

-- Steve

To build 3.0.23-rt40-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.23.xz

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

You can also build from 3.0.23-rt39 by applying the incremental patch:

http://www.kernel.org/pub/linux/kernel/projects/rt/3.0/incr/patch-3.0.23-rt39-rt40-rc1.patch.xz

Changes from 3.0.23-rt39:

---

Steven Rostedt (2):
Revert "ACPI: Convert embedded controller lock to raw spinlock" Linux 3.0.23-rt40-rc1

Thomas Gleixner (5):
softirq: Check preemption after reenabling interrupts
rt: Introduce cpu_chill()
fs: dcache: Use cpu_chill() in trylock loops
fs: namespace: Use cpu_chill() instead of cpu_relax()
net: Use cpu_chill() instead of cpu_relax()

----

 block/blk-iopoll.c      |    3 +++
 block/blk-softirq.c     |    3 +++
 drivers/acpi/ec.c       |   22 +++++++++++-----------
 drivers/acpi/internal.h |    2 +-
 fs/autofs4/autofs_i.h   |    1 +
 fs/autofs4/expire.c     |    2 +-
 fs/dcache.c             |    7 ++++---
 fs/namespace.c          |    3 ++-
 include/linux/delay.h   |    6 ++++++
 include/linux/preempt.h |    3 +++
 localversion-rt         |    2 +-
 net/core/dev.c          |    6 ++++++
 net/rds/ib_rdma.c       |    3 ++-
 13 files changed, 44 insertions(+), 19 deletions(-)
author reviewer
#1 lore raw

PATCH 1/7 Revert "ACPI: Convert embedded controller lock to raw spinlock"

From: Steven Rostedt <[email protected]>

This reverts commit 1a39c79b4d1a6911a39083719a999fbfba7287ae.

---
 drivers/acpi/ec.c       |   22 +++++++++++-----------
 drivers/acpi/internal.h |    2 +-
 2 files changed, 12 insertions(+), 12 deletions(-)
drivers/acpi/ec.c +11 -11
index db0e6c3..b72a603 100644
@@ -152,10 +152,10 @@ static int ec_transaction_done(struct acpi_ec *ec)
 {
 	unsigned long flags;
 	int ret = 0;
-	raw_spin_lock_irqsave(&ec->curr_lock, flags);
+	spin_lock_irqsave(&ec->curr_lock, flags);
 	if (!ec->curr || ec->curr->done)
 		ret = 1;
-	raw_spin_unlock_irqrestore(&ec->curr_lock, flags);
+	spin_unlock_irqrestore(&ec->curr_lock, flags);
 	return ret;
 }
 
@@ -169,7 +169,7 @@ static void start_transaction(struct acpi_ec *ec)
 static void advance_transaction(struct acpi_ec *ec, u8 status)
 {
 	unsigned long flags;
-	raw_spin_lock_irqsave(&ec->curr_lock, flags);
+	spin_lock_irqsave(&ec->curr_lock, flags);
 	if (!ec->curr)
 		goto unlock;
 	if (ec->curr->wlen > ec->curr->wi) {
@@ -194,7 +194,7 @@ err:
 	if (in_interrupt())
 		++ec->curr->irq_count;
 unlock:
-	raw_spin_unlock_irqrestore(&ec->curr_lock, flags);
+	spin_unlock_irqrestore(&ec->curr_lock, flags);
 }
 
 static int acpi_ec_sync_query(struct acpi_ec *ec);
@@ -232,9 +232,9 @@ static int ec_poll(struct acpi_ec *ec)
 		if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF)
 			break;
 		pr_debug(PREFIX "controller reset, restart transaction\n");
-		raw_spin_lock_irqsave(&ec->curr_lock, flags);
+		spin_lock_irqsave(&ec->curr_lock, flags);
 		start_transaction(ec);
-		raw_spin_unlock_irqrestore(&ec->curr_lock, flags);
+		spin_unlock_irqrestore(&ec->curr_lock, flags);
 	}
 	return -ETIME;
 }
@@ -247,17 +247,17 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
 	if (EC_FLAGS_MSI)
 		udelay(ACPI_EC_MSI_UDELAY);
 	/* start transaction */
-	raw_spin_lock_irqsave(&ec->curr_lock, tmp);
+	spin_lock_irqsave(&ec->curr_lock, tmp);
 	/* following two actions should be kept atomic */
 	ec->curr = t;
 	start_transaction(ec);
 	if (ec->curr->command == ACPI_EC_COMMAND_QUERY)
 		clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
-	raw_spin_unlock_irqrestore(&ec->curr_lock, tmp);
+	spin_unlock_irqrestore(&ec->curr_lock, tmp);
 	ret = ec_poll(ec);
-	raw_spin_lock_irqsave(&ec->curr_lock, tmp);
+	spin_lock_irqsave(&ec->curr_lock, tmp);
 	ec->curr = NULL;
-	raw_spin_unlock_irqrestore(&ec->curr_lock, tmp);
+	spin_unlock_irqrestore(&ec->curr_lock, tmp);
 	return ret;
 }
 
@@ -678,7 +678,7 @@ static struct acpi_ec *make_acpi_ec(void)
 	mutex_init(&ec->lock);
 	init_swait_head(&ec->wait);
 	INIT_LIST_HEAD(&ec->list);
-	raw_spin_lock_init(&ec->curr_lock);
+	spin_lock_init(&ec->curr_lock);
 	return ec;
 }
 
drivers/acpi/internal.h +1 -1
index 2519b6e..6f889ba 100644
@@ -64,7 +64,7 @@ struct acpi_ec {
 	struct swait_head wait;
 	struct list_head list;
 	struct transaction *curr;
-	raw_spinlock_t curr_lock;
+	spinlock_t curr_lock;
 };
 
 extern struct acpi_ec *first_ec;
Signature · 1 line
1.7.8.3
author reviewer
#2 lore raw

PATCH 2/7 softirq: Check preemption after reenabling interrupts

In reply to Steven Rostedt

From: Thomas Gleixner <[email protected]>

raise_softirq_irqoff() disables interrupts and wakes the softirq daemon, but after reenabling interrupts there is no preemption check, so the execution of the softirq thread might be delayed arbitrarily.

In principle we could add that check to local_irq_enable/restore, but that's overkill as the rasie_softirq_irqoff() sections are the only ones which show this behaviour.

---
 block/blk-iopoll.c      |    3 +++
 block/blk-softirq.c     |    3 +++
 include/linux/preempt.h |    3 +++
 net/core/dev.c          |    6 ++++++
 4 files changed, 15 insertions(+), 0 deletions(-)
block/blk-iopoll.c +3 -0
index 58916af..f7ca9b4 100644
@@ -38,6 +38,7 @@ void blk_iopoll_sched(struct blk_iopoll *iop)
 	list_add_tail(&iop->list, &__get_cpu_var(blk_cpu_iopoll));
 	__raise_softirq_irqoff(BLOCK_IOPOLL_SOFTIRQ);
 	local_irq_restore(flags);
+	preempt_check_resched_rt();
 }
 EXPORT_SYMBOL(blk_iopoll_sched);
 
@@ -135,6 +136,7 @@ static void blk_iopoll_softirq(struct softirq_action *h)
 		__raise_softirq_irqoff(BLOCK_IOPOLL_SOFTIRQ);
 
 	local_irq_enable();
+	preempt_check_resched_rt();
 }
 
 /**
@@ -204,6 +206,7 @@ static int __cpuinit blk_iopoll_cpu_notify(struct notifier_block *self,
 				 &__get_cpu_var(blk_cpu_iopoll));
 		__raise_softirq_irqoff(BLOCK_IOPOLL_SOFTIRQ);
 		local_irq_enable();
+		preempt_check_resched_rt();
 	}
 
 	return NOTIFY_OK;
block/blk-softirq.c +3 -0
index ee9c216..0206963 100644
@@ -50,6 +50,7 @@ static void trigger_softirq(void *data)
 		raise_softirq_irqoff(BLOCK_SOFTIRQ);
 
 	local_irq_restore(flags);
+	preempt_check_resched_rt();
 }
 
 /*
@@ -92,6 +93,7 @@ static int __cpuinit blk_cpu_notify(struct notifier_block *self,
 				 &__get_cpu_var(blk_cpu_done));
 		raise_softirq_irqoff(BLOCK_SOFTIRQ);
 		local_irq_enable();
+		preempt_check_resched_rt();
 	}
 
 	return NOTIFY_OK;
@@ -139,6 +141,7 @@ do_local:
 		goto do_local;
 
 	local_irq_restore(flags);
+	preempt_check_resched_rt();
 }
 
 /**
include/linux/preempt.h +3 -0
index 7a2bbbb..11412d7 100644
@@ -41,8 +41,10 @@ do { \
 
 #ifndef CONFIG_PREEMPT_RT_BASE
 # define preempt_enable_no_resched()	__preempt_enable_no_resched()
+# define preempt_check_resched_rt()	do { } while (0)
 #else
 # define preempt_enable_no_resched()	preempt_enable()
+# define preempt_check_resched_rt()	preempt_check_resched()
 #endif
 
 #define preempt_check_resched() \
@@ -93,6 +95,7 @@ do { \
 #define preempt_enable_no_resched()	do { } while (0)
 #define preempt_enable()		do { } while (0)
 #define preempt_check_resched()		do { } while (0)
+#define preempt_check_resched_rt()	do { } while (0)
 
 #define preempt_disable_notrace()		do { } while (0)
 #define preempt_enable_no_resched_notrace()	do { } while (0)
net/core/dev.c +6 -0
index 7606d18..b250c1d 100644
@@ -1705,6 +1705,7 @@ static inline void __netif_reschedule(struct Qdisc *q)
 	sd->output_queue_tailp = &q->next_sched;
 	raise_softirq_irqoff(NET_TX_SOFTIRQ);
 	local_irq_restore(flags);
+	preempt_check_resched_rt();
 }
 
 void __netif_schedule(struct Qdisc *q)
@@ -1726,6 +1727,7 @@ void dev_kfree_skb_irq(struct sk_buff *skb)
 		sd->completion_queue = skb;
 		raise_softirq_irqoff(NET_TX_SOFTIRQ);
 		local_irq_restore(flags);
+		preempt_check_resched_rt();
 	}
 }
 EXPORT_SYMBOL(dev_kfree_skb_irq);
@@ -2837,6 +2839,7 @@ enqueue:
 	rps_unlock(sd);
 
 	local_irq_restore(flags);
+	preempt_check_resched_rt();
 
 	atomic_long_inc(&skb->dev->rx_dropped);
 	kfree_skb(skb);
@@ -3659,6 +3662,7 @@ static void net_rps_action_and_irq_enable(struct softnet_data *sd)
 	} else
 #endif
 		local_irq_enable();
+	preempt_check_resched_rt();
 }
 
 static int process_backlog(struct napi_struct *napi, int quota)
@@ -3731,6 +3735,7 @@ void __napi_schedule(struct napi_struct *n)
 	local_irq_save(flags);
 	____napi_schedule(&__get_cpu_var(softnet_data), n);
 	local_irq_restore(flags);
+	preempt_check_resched_rt();
 }
 EXPORT_SYMBOL(__napi_schedule);
 
@@ -6233,6 +6238,7 @@ static int dev_cpu_callback(struct notifier_block *nfb,
 
 	raise_softirq_irqoff(NET_TX_SOFTIRQ);
 	local_irq_enable();
+	preempt_check_resched_rt();
 
 	/* Process offline CPU's input_pkt_queue */
 	while ((skb = __skb_dequeue(&oldsd->process_queue))) {
Signature · 1 line
1.7.8.3
author reviewer
#3 lore raw

PATCH 3/7 rt: Introduce cpu_chill()

In reply to Steven Rostedt

From: Thomas Gleixner <[email protected]>

Retry loops on RT might loop forever when the modifying side was preempted. Add cpu_chill() to replace cpu_relax(). cpu_chill() defaults to cpu_relax() for non RT. On RT it puts the looping task to sleep for a tick so the preempted task can make progress.

---
 include/linux/delay.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
include/linux/delay.h +6 -0
index a6ecb34..e23a7c0 100644
@@ -52,4 +52,10 @@ static inline void ssleep(unsigned int seconds)
 	msleep(seconds * 1000);
 }
 
+#ifdef CONFIG_PREEMPT_RT_FULL
+# define cpu_chill()	msleep(1)
+#else
+# define cpu_chill()	cpu_relax()
+#endif
+
 #endif /* defined(_LINUX_DELAY_H) */
Signature · 1 line
1.7.8.3
author reviewer
#4 lore raw

PATCH 4/7 fs: dcache: Use cpu_chill() in trylock loops

In reply to Steven Rostedt

From: Thomas Gleixner <[email protected]>

Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system make progress.

---
 fs/autofs4/autofs_i.h |    1 +
 fs/autofs4/expire.c   |    2 +-
 fs/dcache.c           |    7 ++++---
 3 files changed, 6 insertions(+), 4 deletions(-)
fs/autofs4/autofs_i.h +1 -0
index b620114..83424ab 100644
@@ -34,6 +34,7 @@
 #include <linux/sched.h>
 #include <linux/mount.h>
 #include <linux/namei.h>
+#include <linux/delay.h>
 #include <asm/current.h>
 #include <asm/uaccess.h>
 
fs/autofs4/expire.c +1 -1
index d8b6184..f4abda3 100644
@@ -170,7 +170,7 @@ again:
 			parent = p->d_parent;
 			if (!seq_spin_trylock(&parent->d_lock)) {
 				seq_spin_unlock(&p->d_lock);
-				cpu_relax();
+				cpu_chill();
 				goto relock;
 			}
 			seq_spin_unlock(&p->d_lock);
fs/dcache.c +4 -3
index 10580be..eedf276 100644
@@ -36,6 +36,7 @@
 #include <linux/bit_spinlock.h>
 #include <linux/rculist_bl.h>
 #include <linux/prefetch.h>
+#include <linux/delay.h>
 #include "internal.h"
 
 /*
@@ -360,7 +361,7 @@ static inline struct dentry *dentry_kill(struct dentry *dentry, int ref)
 	if (inode && !spin_trylock(&inode->i_lock)) {
 relock:
 		seq_spin_unlock(&dentry->d_lock);
-		cpu_relax();
+		cpu_chill();
 		return dentry; /* try again with same dentry */
 	}
 	if (IS_ROOT(dentry))
@@ -738,7 +739,7 @@ relock:
 
 		if (!seq_spin_trylock(&dentry->d_lock)) {
 			spin_unlock(&dcache_lru_lock);
-			cpu_relax();
+			cpu_chill();
 			goto relock;
 		}
 
@@ -2053,7 +2054,7 @@ again:
 	if (dentry->d_count == 1) {
 		if (inode && !spin_trylock(&inode->i_lock)) {
 			seq_spin_unlock(&dentry->d_lock);
-			cpu_relax();
+			cpu_chill();
 			goto again;
 		}
 		dentry->d_flags &= ~DCACHE_CANT_MOUNT;
Signature · 1 line
1.7.8.3
author reviewer
#5 lore raw

PATCH 5/7 fs: namespace: Use cpu_chill() instead of cpu_relax()

In reply to Steven Rostedt

From: Thomas Gleixner <[email protected]>

Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system make progress.

---
 fs/namespace.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
fs/namespace.c +2 -1
index c563781..3270cde 100644
@@ -31,6 +31,7 @@
 #include <linux/idr.h>
 #include <linux/fs_struct.h>
 #include <linux/fsnotify.h>
+#include <linux/delay.h>
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
 #include "pnode.h"
@@ -346,7 +347,7 @@ int mnt_want_write(struct vfsmount *mnt)
 	 */
 	while (mnt->mnt_flags & MNT_WRITE_HOLD) {
 		preempt_enable();
-		cpu_relax();
+		cpu_chill();
 		preempt_disable();
 	}
 	/*
Signature · 1 line
1.7.8.3
author reviewer
#6 lore raw

PATCH 6/7 net: Use cpu_chill() instead of cpu_relax()

In reply to Steven Rostedt

From: Thomas Gleixner <[email protected]>

Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system make progress.

---
 net/rds/ib_rdma.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
net/rds/ib_rdma.c +2 -1
index 819c35a..256ad87 100644
@@ -33,6 +33,7 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/rculist.h>
+#include <linux/delay.h>
 
 #include "rds.h"
 #include "ib.h"
@@ -294,7 +295,7 @@ static inline void wait_clean_list_grace(void)
 	for_each_online_cpu(cpu) {
 		flag = &per_cpu(clean_list_grace, cpu);
 		while (test_bit(CLEAN_LIST_BUSY_BIT, flag))
-			cpu_relax();
+			cpu_chill();
 	}
 }
 
Signature · 1 line
1.7.8.3
author reviewer
#7 lore raw

PATCH 7/7 Linux 3.0.23-rt40-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 5498386..a055872 100644
@@ -1 +1 @@
--rt39
+-rt40-rc1
Signature · 1 line
1.7.8.3
#8 lore raw
In reply to Steven Rostedt

Am Mittwoch 14 März 2012 schrieb Steven Rostedt:

Quoted 8 lines

Changes from 3.0.23-rt39:

---

Steven Rostedt (2):
Revert "ACPI: Convert embedded controller lock to raw spinlock" Linux 3.0.23-rt40-rc1

How about also reverting the commit that has changed acpi_gbl_gpe_lock to a raw spinlock?

Thanks,
Karsten
--
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
#9 lore raw
Quoted 8 lines · Karsten Wiese

Am Mittwoch 14 März 2012 schrieb Steven Rostedt:

Quoted 5 lines

Changes from 3.0.23-rt39:

---

Quoted 7 lines
Quoted 3 lines

Steven Rostedt (2):
Revert "ACPI: Convert embedded controller lock to raw spinlock" Linux 3.0.23-rt40-rc1

How about also reverting the commit that has changed acpi_gbl_gpe_lock to a raw spinlock?

Hmm, you're right, I missed that.

It's harder to find things removed from Thomas's series than it is to add new stuff :-/

As I'm ready to push this, I'll do the removal after updating to 3.0.24.

-- Steve

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