Skip to contentSkip to conversation

Linux 3.12.15-rt26-rc1

PATCH In review Steven Rostedt 2 participants 7 messages May 1, 2014 – May 2, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Linux 3.12.15-rt26-rc1

Dear RT Folks,

The 3.12-rt kernel is entering the stable phase. But instead of just pulling the last development version into stable, there were a few bugs that needed to be fixed first. The 3.12.15-rt26 will go through an rc phase before it is officially released as stable.

This is the RT stable review cycle of patch 3.12.15-rt26-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 5/2/2014.

Enjoy,

-- Steve

To build 3.12.15-rt26-rc1 directly, the following patches should be applied:

http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.12.tar.xz

http://www.kernel.org/pub/linux/kernel/v3.x/patch-3.12.15.xz

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

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

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

Changes from 3.12.15-rt25:

---

Steven Rostedt (1):
rt: Move migrate_disable up in trylocks

Steven Rostedt (Red Hat) (2):
net: gianfar: Fix missing return of gfar_clean_tx_ring() Linux 3.12.15-rt26-rc1

----

 drivers/net/ethernet/freescale/gianfar.c |  1 +
 kernel/rt.c                              | 20 ++++++++++++--------
 localversion-rt                          |  2 +-
 3 files changed, 14 insertions(+), 9 deletions(-)
#1 lore raw

PATCH 1/3 rt: Move migrate_disable up in trylocks

3.12.15-rt26-rc1 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Steven Rostedt <[email protected]>

The changes to move the migrate_disable() down in the trylocks() caused race conditions to appear in the cpu hotplug code. The migrate disables must be done before any of the rtmutexes are taken, otherwise a lock may be held that prevents hotplug from moving forward.

Cc Mike Galbraith <[email protected]>
Cc Nicholas Mc Guire <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc linux-rt-users <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc John Kacur <[email protected]>
Cc Clark Williams <[email protected]>
---
 kernel/rt.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
kernel/rt.c +12 -8
index 5d17727..5f44def 100644
@@ -180,12 +180,15 @@ EXPORT_SYMBOL(_mutex_unlock);
  */
 int __lockfunc rt_write_trylock(rwlock_t *rwlock)
 {
-	int ret = rt_mutex_trylock(&rwlock->lock);
+	int ret;
+
+	migrate_disable();
+	ret = rt_mutex_trylock(&rwlock->lock);
 
-	if (ret) {
+	if (ret)
 		rwlock_acquire(&rwlock->dep_map, 0, 1, _RET_IP_);
-		migrate_disable();
-	}
+	else
+		migrate_enable();
 
 	return ret;
 }
@@ -212,11 +215,12 @@ int __lockfunc rt_read_trylock(rwlock_t *rwlock)
 	 * write locked.
 	 */
 	if (rt_mutex_owner(lock) != current) {
+		migrate_disable();
 		ret = rt_mutex_trylock(lock);
-		if (ret) {
+		if (ret)
 			rwlock_acquire(&rwlock->dep_map, 0, 1, _RET_IP_);
-			migrate_disable();
-		}
+		else
+			migrate_enable();
 	} else if (!rwlock->read_depth) {
 		ret = 0;
 	}
@@ -245,8 +249,8 @@ void __lockfunc rt_read_lock(rwlock_t *rwlock)
 	 */
 	if (rt_mutex_owner(lock) != current) {
 		rwlock_acquire(&rwlock->dep_map, 0, 0, _RET_IP_);
-		__rt_spin_lock(lock);
 		migrate_disable();
+		__rt_spin_lock(lock);
 	}
 	rwlock->read_depth++;
 }
Signature · 1 line
1.8.5.3
#2 lore raw

Re: [PATCH RT 1/3] rt: Move migrate_disable up in trylocks

On 05/01/2014 02:47 AM, Steven Rostedt wrote:

Could this wait until it appears in the development release?

Sebastian

#3 lore raw

Re: [PATCH RT 1/3] rt: Move migrate_disable up in trylocks

Quoted 3 lines · On Fri, 02 May 2014 09:11:23 +0200 Sebastian Andrzej Siewior…

On 05/01/2014 02:47 AM, Steven Rostedt wrote:

Could this wait until it appears in the development release?

I would need to delay the release then as I wont release a kernel that fails the cpu stress test.

I don't have a problem with delaying this though.

-- Steve

#4 lore raw

Re: [PATCH RT 1/3] rt: Move migrate_disable up in trylocks

In reply to Steven Rostedt
Quoted 9 lines · * Steven Rostedt | 2014-04-30 20:47:58 [-0400]:

From: Steven Rostedt <[email protected]>

The changes to move the migrate_disable() down in the trylocks() caused race conditions to appear in the cpu hotplug code. The migrate disables must be done before any of the rtmutexes are taken, otherwise a lock may be held that prevents hotplug from moving forward.

Okay. I am taking a modified version (so it applies) of this into v3.14 tree. Mike also suggested to drop migrate_disable-pushd-down-in-atomic_dec_and_spin_lo.patch because we which is basicaly the some thing. And then we have migrate_disable-pushd-down-in-rt_spin_trylock_irqsav.patch which we could drop as well for the same reason.

Sebastian

#5 lore raw

PATCH 2/3 net: gianfar: Fix missing return of gfar_clean_tx_ring()

In reply to Steven Rostedt

3.12.15-rt26-rc1 stable review patch.
If anyone has any objections, please let me know.

------------------

From: "Steven Rostedt (Red Hat)" <[email protected]>

The patch "net: gianfar: do not try to cleanup TX packets if they are not done" for 3.12-rt left out the return value for gfar_clean_tx_ring(). This would cause an error when building this module. Note, this module does not build on x86 and was not tested because of that.

---
 drivers/net/ethernet/freescale/gianfar.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/freescale/gianfar.c +1 -0
index 091945c..df27493 100644
@@ -2615,6 +2615,7 @@ static int gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
 	tx_queue->dirty_tx = bdp;
 
 	netdev_tx_completed_queue(txq, howmany, bytes_sent);
+	return howmany;
 }
 
 static void gfar_schedule_cleanup(struct gfar_priv_grp *gfargrp)
Signature · 1 line
1.8.5.3
#6 lore raw

PATCH 3/3 Linux 3.12.15-rt26-rc1

In reply to Steven Rostedt

3.12.15-rt26-rc1 stable review patch.
If anyone has any objections, please let me know.

------------------

From: "Steven Rostedt (Red Hat)" <[email protected]>

---
 localversion-rt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
localversion-rt +1 -1
index c5b71f9..02556f4 100644
@@ -1 +1 @@
--rt25
+-rt26-rc1
Signature · 1 line
1.8.5.3