Skip to contentSkip to conversation

4.1.3-rt3

ANNOUNCE Sebastian Andrzej Siewior 3 participants 4 messages Jul 25, 2015 – Aug 16, 2015

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

Dear RT folks!

I'm pleased to announce the v4.1.3-rt3 patch set.
Changes since v4.1.3-rt2:

- fix compile of locktorture. Patch by Wolfgang M. Reimer.

- fix compile pid_namespace without lockdep on ARM. Patch by Grygorii Strashko

- The annoying "cpufreq_stat_notifier_trans: No policy found" is finally gone.

- xor / raid_pq
The max latency will increase into the ms range if the raid6_pq is loaded. This should not matter under normal circumstances because that module should only be loaded at boot time if required (and not while a -RT task is active in production). It might also get loaded at run-time manually.
Dropping the preempt_disable() might cause different results for the individual implementations. People who don't care (load it at run-time) don't need to load it at all. People who care (load it boot time) would prefer to stick with the best implementation. Therefore I think it is enough to document this (don't load it at run time if you don't need it) and I cross it off my list. Patches are welcome if someone needs / has an improvement.

Known issues:

- bcache is disabled.

- CPU hotplug works in general. Steven's test script however deadlocks usually on the second invocation.

You can get this release via the git tree at:

    git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-4.1.y-rt
    git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-4.1.y-rt-rebase
    git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-4.1.y-rt-queue

The delta patch against 4.0.8-rt5 is appended below and can be found here:

    https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/incr/patch-4.1.3-rt2-rt3.patch.xz

The RT patch against 4.1.3 can be found here:

    https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/patch-4.1.3-rt3.patch.xz

The split quilt queue is available at:

    https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/patches-4.1.3-rt3.tar.xz

Sebastian

drivers/cpufreq/cpufreq.c +3 -32
index 8ae655c364f4..ce1d93e93d1a 100644
@@ -64,12 +64,6 @@ static inline bool has_target(void)
 	return cpufreq_driver->target_index || cpufreq_driver->target;
 }
 
-/*
- * rwsem to guarantee that cpufreq driver module doesn't unload during critical
- * sections
- */
-static DECLARE_RWSEM(cpufreq_rwsem);
-
 /* internal prototypes */
 static int __cpufreq_governor(struct cpufreq_policy *policy,
 		unsigned int event);
@@ -215,9 +209,6 @@ struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
 	if (cpu >= nr_cpu_ids)
 		return NULL;
 
-	if (!down_read_trylock(&cpufreq_rwsem))
-		return NULL;
-
 	/* get the cpufreq driver */
 	read_lock_irqsave(&cpufreq_driver_lock, flags);
 
@@ -230,9 +221,6 @@ struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
 
 	read_unlock_irqrestore(&cpufreq_driver_lock, flags);
 
-	if (!policy)
-		up_read(&cpufreq_rwsem);
-
 	return policy;
 }
 EXPORT_SYMBOL_GPL(cpufreq_cpu_get);
@@ -240,7 +228,6 @@ EXPORT_SYMBOL_GPL(cpufreq_cpu_get);
 void cpufreq_cpu_put(struct cpufreq_policy *policy)
 {
 	kobject_put(&policy->kobj);
-	up_read(&cpufreq_rwsem);
 }
 EXPORT_SYMBOL_GPL(cpufreq_cpu_put);
 
@@ -765,9 +752,6 @@ static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf)
 	struct freq_attr *fattr = to_attr(attr);
 	ssize_t ret;
 
-	if (!down_read_trylock(&cpufreq_rwsem))
-		return -EINVAL;
-
 	down_read(&policy->rwsem);
 
 	if (fattr->show)
@@ -776,7 +760,6 @@ static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf)
 		ret = -EIO;
 
 	up_read(&policy->rwsem);
-	up_read(&cpufreq_rwsem);
 
 	return ret;
 }
@@ -793,9 +776,6 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
 	if (!cpu_online(policy->cpu))
 		goto unlock;
 
-	if (!down_read_trylock(&cpufreq_rwsem))
-		goto unlock;
-
 	down_write(&policy->rwsem);
 
 	if (fattr->store)
@@ -804,8 +784,6 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
 		ret = -EIO;
 
 	up_write(&policy->rwsem);
-
-	up_read(&cpufreq_rwsem);
 unlock:
 	put_online_cpus();
 
@@ -1117,16 +1095,12 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
 	if (unlikely(policy))
 		return 0;
 
-	if (!down_read_trylock(&cpufreq_rwsem))
-		return 0;
-
 	/* Check if this cpu was hot-unplugged earlier and has siblings */
 	read_lock_irqsave(&cpufreq_driver_lock, flags);
 	for_each_policy(policy) {
 		if (cpumask_test_cpu(cpu, policy->related_cpus)) {
 			read_unlock_irqrestore(&cpufreq_driver_lock, flags);
 			ret = cpufreq_add_policy_cpu(policy, cpu, dev);
-			up_read(&cpufreq_rwsem);
 			return ret;
 		}
 	}
@@ -1269,8 +1243,6 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
 
 	kobject_uevent(&policy->kobj, KOBJ_ADD);
 
-	up_read(&cpufreq_rwsem);
-
 	/* Callback for handling stuff after policy is ready */
 	if (cpufreq_driver->ready)
 		cpufreq_driver->ready(policy);
@@ -1304,8 +1276,6 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
 	cpufreq_policy_free(policy);
 
 nomem_out:
-	up_read(&cpufreq_rwsem);
-
 	return ret;
 }
 
@@ -2499,19 +2469,20 @@ int cpufreq_unregister_driver(struct cpufreq_driver *driver)
 
 	pr_debug("unregistering driver %s\n", driver->name);
 
+	/* Protect against concurrent cpu hotplug */
+	get_online_cpus();
 	subsys_interface_unregister(&cpufreq_interface);
 	if (cpufreq_boost_supported())
 		cpufreq_sysfs_remove_file(&boost.attr);
 
 	unregister_hotcpu_notifier(&cpufreq_cpu_notifier);
 
-	down_write(&cpufreq_rwsem);
 	write_lock_irqsave(&cpufreq_driver_lock, flags);
 
 	cpufreq_driver = NULL;
 
 	write_unlock_irqrestore(&cpufreq_driver_lock, flags);
-	up_write(&cpufreq_rwsem);
+	put_online_cpus();
 
 	return 0;
 }
include/linux/pid.h +1 -0
index 23705a53abba..2cc64b779f03 100644
@@ -2,6 +2,7 @@
 #define _LINUX_PID_H
 
 #include <linux/rcupdate.h>
+#include <linux/atomic.h>
 
 enum pid_type
 {
kernel/locking/locktorture.c +0 -1
index ec8cce259779..aa60d919e336 100644
@@ -24,7 +24,6 @@
 #include <linux/module.h>
 #include <linux/kthread.h>
 #include <linux/spinlock.h>
-#include <linux/rwlock.h>
 #include <linux/mutex.h>
 #include <linux/rwsem.h>
 #include <linux/smp.h>
localversion-rt +1 -1
index c3054d08a112..1445cd65885c 100644
@@ -1 +1 @@
--rt2
+-rt3
#1 lore raw

Re: [ANNOUNCE] 4.1.3-rt3 - xmit queue timeout, oops, rcu stalls

Quoted 3 lines · Sebastian Andrzej Siewior

Dear RT folks!

I'm pleased to announce the v4.1.3-rt3 patch set.

...

I've had a few hangs with nothing left behind to debug... but today I find this:

(NOTE: I'm attaching a file with the details, I don't know if my mailer will mangled these lines)

----

Aug  5 10:46:18 localhost kernel: [ 2343.673560] WARNING: CPU: 3 PID: 43 at net/sched/sch_generic.c:303 dev_watchdog+0x26f/0x280()
Aug  5 10:46:18 localhost kernel: [ 2343.673561] NETDEV WATCHDOG: eth1 (e1000e): transmit queue 0 timed out

----

and then:

----

Aug  5 10:46:18 localhost kernel: [ 2343.673679] e1000e 0000:04:00.0 eth1: Reset adapter unexpectedly
Aug  5 10:46:30 localhost kernel: [ 2355.706987] ata5.00: exception Emask 0x40 SAct 0x0 SErr 0x80800 action 0x6 frozen
Aug  5 10:46:30 localhost kernel: [ 2355.706990] ata5: SError: { HostInt 10B8B }
Aug  5 10:46:30 localhost kernel: [ 2355.707003] ata5.00: cmd a0/00:00:00:08:00/00:00:00:00:00/a0 tag 0 pio 16392 in
Aug  5 10:46:30 localhost kernel: [ 2355.707003]          Get event status notification 4a 01 00 00 10 00 00 00 08 00res 40/00:03:00:00:00/00:00:00:00:00/a0 Emask 0x44 (timeout)
Aug  5 10:46:30 localhost kernel: [ 2355.707005] ata5.00: status: { DRDY }
Aug  5 10:46:30 localhost kernel: [ 2355.707007] ata5: hard resetting link

----

same one but later in the log:

----

Aug  5 10:46:18 localhost kernel: WARNING: CPU: 3 PID: 43 at net/sched/sch_generic.c:303 dev_watchdog+0x26f/0x280()
Aug  5 10:46:18 localhost kernel: NETDEV WATCHDOG: eth1 (e1000e): transmit queue 0 timed out

----

Things apparently keep working and then:

----

Aug  5 11:58:36 localhost kernel: [ 6678.122596] Network Receive[2409]: segfault at 28 ip 0000003c4c293ca9 sp 00007fb6f64dbb58 error 6 in libc-2.18.so[3c4c200000+1b4000]
Aug  5 11:58:36 localhost kernel: Network Receive[2409]: segfault at 28 ip 0000003c4c293ca9 sp 00007fb6f64dbb58 error 6 in libc-2.18.so[3c4c200000+1b4000]
Aug  5 11:58:36 localhost kernel: timekeeping watchdog: Marking clocksource 'tsc' as unstable, because the skew is too large:
Aug  5 11:58:36 localhost kernel: 	'hpet' wd_now: 47ebf654 wd_last: c0debfe6 mask: ffffffff
Aug  5 11:58:36 localhost kernel: 	'tsc' cs_now: 154f6e564f7d cs_last: 7784d315c59 mask: ffffffffffffffff
Aug  5 11:58:36 localhost systemd: Starting dnf makecache...
Aug  5 11:58:36 localhost kernel: [ 6678.123233] timekeeping watchdog: Marking clocksource 'tsc' as unstable, because the skew is too large:
Aug  5 11:58:36 localhost kernel: [ 6678.123237] 	'hpet' wd_now: 47ebf654 wd_last: c0debfe6 mask: ffffffff
Aug  5 11:58:36 localhost kernel: [ 6678.123238] 	'tsc' cs_now: 154f6e564f7d cs_last: 7784d315c59 mask: ffffffffffffffff
Aug  5 11:58:36 localhost kernel: [ 6678.146207] Switched to clocksource hpet
Aug  5 11:58:36 localhost kernel: Switched to clocksource hpet
Aug  5 11:58:36 localhost kernel: [ 6678.150087] BUG: unable to handle kernel NULL pointer dereference at 0000000000000ea0
Aug  5 11:58:36 localhost kernel: [ 6678.150097] IP: [<ffffffffa05d922e>] nfs40_discover_server_trunking+0x5e/0x110 [nfsv4]
Aug  5 11:58:36 localhost kernel: [ 6678.150098] PGD 7f3c83067 PUD 7f46fb067 PMD 0
Aug  5 11:58:36 localhost kernel: [ 6678.150099] Oops: 0000 [#1] PREEMPT SMP

----

And eventually (later) get a ton of these:

----

Aug  5 11:59:36 localhost kernel: [ 6738.107181] INFO: rcu_preempt detected stalls on CPUs/tasks: {} (detected by 3, t=60002 jiffies, g=37092, c=37091, q=0)
Aug  5 11:59:36 localhost kernel: [ 6738.107183] All QSes seen, last rcu_preempt kthread activity 1 (4301410925-4301410924), jiffies_till_next_fqs=3, root ->qsmask 0x0

----

So something is left in a not good state...

-- Fernando

#2 lore raw

RE: [ANNOUNCE] 4.1.3-rt3 - xmit queue timeout, oops, rcu stalls

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

Quoted 98 lines

Subject: Re: [ANNOUNCE] 4.1.3-rt3 - xmit queue timeout, oops, rcu stalls
To: [email protected]; [email protected]
CC: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
From: [email protected]
Date: Thu, 6 Aug 2015 10:50:22 -0700

Quoted 3 lines · Sebastian Andrzej Siewior

Dear RT folks!

I'm pleased to announce the v4.1.3-rt3 patch set.

...

I've had a few hangs with nothing left behind to debug... but today I find this:

(NOTE: I'm attaching a file with the details, I don't know if my mailer will mangled these lines)

----
Aug 5 10:46:18 localhost kernel: [ 2343.673560] WARNING: CPU: 3 PID: 43 at net/sched/sch_generic.c:303 dev_watchdog+0x26f/0x280() Aug 5 10:46:18 localhost kernel: [ 2343.673561] NETDEV WATCHDOG: eth1 (e1000e): transmit queue 0 timed out
----

and then:

----
Aug 5 10:46:18 localhost kernel: [ 2343.673679] e1000e 0000:04:00.0
eth1: Reset adapter unexpectedly
Aug 5 10:46:30 localhost kernel: [ 2355.706987] ata5.00: exception Emask 0x40 SAct 0x0 SErr 0x80800 action 0x6 frozen
Aug 5 10:46:30 localhost kernel: [ 2355.706990] ata5: SError: { HostInt 10B8B }
Aug 5 10:46:30 localhost kernel: [ 2355.707003] ata5.00: cmd a0/00:00:00:08:00/00:00:00:00:00/a0 tag 0 pio 16392 in
Aug 5 10:46:30 localhost kernel: [ 2355.707003] Get event status notification 4a 01 00 00 10 00 00 00 08 00res 40/00:03:00:00:00/00:00:00:00:00/a0 Emask 0x44 (timeout)
Aug 5 10:46:30 localhost kernel: [ 2355.707005] ata5.00: status: { DRDY } Aug 5 10:46:30 localhost kernel: [ 2355.707007] ata5: hard resetting link
----

same one but later in the log:

----
Aug 5 10:46:18 localhost kernel: WARNING: CPU: 3 PID: 43 at net/sched/sch_generic.c:303 dev_watchdog+0x26f/0x280() Aug 5 10:46:18 localhost kernel: NETDEV WATCHDOG: eth1 (e1000e):
transmit queue 0 timed out
----

Things apparently keep working and then:

----
Aug 5 11:58:36 localhost kernel: [ 6678.122596] Network Receive[2409]:
segfault at 28 ip 0000003c4c293ca9 sp 00007fb6f64dbb58 error 6 in libc-2.18.so[3c4c200000+1b4000]
Aug 5 11:58:36 localhost kernel: Network Receive[2409]: segfault at 28 ip 0000003c4c293ca9 sp 00007fb6f64dbb58 error 6 in libc-2.18.so[3c4c200000+1b4000]
Aug 5 11:58:36 localhost kernel: timekeeping watchdog: Marking clocksource 'tsc' as unstable, because the skew is too large:
Aug 5 11:58:36 localhost kernel: 'hpet' wd_now: 47ebf654 wd_last:
c0debfe6 mask: ffffffff
Aug 5 11:58:36 localhost kernel: 'tsc' cs_now: 154f6e564f7d cs_last:
7784d315c59 mask: ffffffffffffffff
Aug 5 11:58:36 localhost systemd: Starting dnf makecache... Aug 5 11:58:36 localhost kernel: [ 6678.123233] timekeeping watchdog:
Marking clocksource 'tsc' as unstable, because the skew is too large:
Aug 5 11:58:36 localhost kernel: [ 6678.123237] 'hpet' wd_now:
47ebf654 wd_last: c0debfe6 mask: ffffffff
Aug 5 11:58:36 localhost kernel: [ 6678.123238] 'tsc' cs_now:
154f6e564f7d cs_last: 7784d315c59 mask: ffffffffffffffff
Aug 5 11:58:36 localhost kernel: [ 6678.146207] Switched to clocksource hpet
Aug 5 11:58:36 localhost kernel: Switched to clocksource hpet Aug 5 11:58:36 localhost kernel: [ 6678.150087] BUG: unable to handle kernel NULL pointer dereference at 0000000000000ea0
Aug 5 11:58:36 localhost kernel: [ 6678.150097] IP:
[<ffffffffa05d922e>] nfs40_discover_server_trunking+0x5e/0x110 [nfsv4] Aug 5 11:58:36 localhost kernel: [ 6678.150098] PGD 7f3c83067 PUD 7f46fb067 PMD 0
Aug 5 11:58:36 localhost kernel: [ 6678.150099] Oops: 0000 [#1] PREEMPT SMP
----

And eventually (later) get a ton of these:

----
Aug 5 11:59:36 localhost kernel: [ 6738.107181] INFO: rcu_preempt detected stalls on CPUs/tasks: {} (detected by 3, t=60002 jiffies, g=37092, c=37091, q=0)
Aug 5 11:59:36 localhost kernel: [ 6738.107183] All QSes seen, last rcu_preempt kthread activity 1 (4301410925-4301410924), jiffies_till_next_fqs=3, root ->qsmask 0x0
----

Quoted 3 lines

So something is left in a not good state...

-- Fernando

Do you still have your box setup to capture a vmcore?  Also, is this my latest build?  I've been having issues with LUKs.

If you do still have your system setup to capture a vmcore, maybe set:

kernel.panic_on_oops = 1
In your /etc/sysctl.conf and then reboot to this kernel.

John.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw

Re: [ANNOUNCE] 4.1.3-rt3 - xmit queue timeout, oops, rcu stalls

In reply to Fernando Lopez-Lezcano
Quoted 9 lines · * Fernando Lopez-Lezcano | 2015-08-06 10:50:22 [-0700]:

I've had a few hangs with nothing left behind to debug... but today I find this:

----

Aug  5 10:46:18 localhost kernel: [ 2343.673560] WARNING: CPU: 3 PID:
43 at net/sched/sch_generic.c:303 dev_watchdog+0x26f/0x280()
Aug  5 10:46:18 localhost kernel: [ 2343.673561] NETDEV WATCHDOG:

eth1 (e1000e): transmit queue 0 timed out
----

Your network controller did not manage to send TX packets.

Quoted 5 lines

and then:

----

Aug  5 10:46:18 localhost kernel: [ 2343.673679] e1000e 0000:04:00.0

eth1: Reset adapter unexpectedly

this is the consequene of the former problem.

Quoted 11 lines
Aug  5 10:46:30 localhost kernel: [ 2355.706987] ata5.00: exception
Emask 0x40 SAct 0x0 SErr 0x80800 action 0x6 frozen
Aug  5 10:46:30 localhost kernel: [ 2355.706990] ata5: SError: {
HostInt 10B8B }
Aug  5 10:46:30 localhost kernel: [ 2355.707003] ata5.00: cmd
a0/00:00:00:08:00/00:00:00:00:00/a0 tag 0 pio 16392 in
Aug  5 10:46:30 localhost kernel: [ 2355.707003]          Get event
status notification 4a 01 00 00 10 00 00 00 08 00res
40/00:03:00:00:00/00:00:00:00:00/a0 Emask 0x44 (timeout)
Aug  5 10:46:30 localhost kernel: [ 2355.707005] ata5.00: status: { DRDY }
Aug  5 10:46:30 localhost kernel: [ 2355.707007] ata5: hard resetting link

And now ata5 (hard disk?) suddenly got another problem and the link gets reset.

Quoted 5 lines

----

Aug  5 10:46:18 localhost kernel: WARNING: CPU: 3 PID: 43 at
net/sched/sch_generic.c:303 dev_watchdog+0x26f/0x280()
Aug  5 10:46:18 localhost kernel: NETDEV WATCHDOG: eth1 (e1000e):

transmit queue 0 timed out

ethernet is still not working.

Quoted 6 lines
Aug  5 11:58:36 localhost kernel: [ 6678.122596] Network
Receive[2409]: segfault at 28 ip 0000003c4c293ca9 sp 00007fb6f64dbb58
error 6 in libc-2.18.so[3c4c200000+1b4000]
Aug  5 11:58:36 localhost kernel: Network Receive[2409]: segfault at

28 ip 0000003c4c293ca9 sp 00007fb6f64dbb58 error 6 in libc-2.18.so[3c4c200000+1b4000]

and now we have a segfault in libc. You box is kind of falling apart.

Quoted 9 lines

And eventually (later) get a ton of these:

----

Aug  5 11:59:36 localhost kernel: [ 6738.107181] INFO: rcu_preempt
detected stalls on CPUs/tasks: {} (detected by 3, t=60002 jiffies,
g=37092, c=37091, q=0)
Aug  5 11:59:36 localhost kernel: [ 6738.107183] All QSes seen, last

rcu_preempt kthread activity 1 (4301410925-4301410924), jiffies_till_next_fqs=3, root ->qsmask 0x0

one CPU hangs and does not make any progress.

Quoted 2 lines

So something is left in a not good state...

Can you reproduce this and if so with and without -RT? There is nothing in the what would indicate a -RT bug.

Quoted 1 line

-- Fernando

Sebastian