Skip to contentSkip to conversation

linux-next: build failure after merge of the rcu tree

DISCUSSION Stephen Rothwell 4 participants 8 messages Sep 1, 2015 – Sep 2, 2015

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

Hi Paul,

After merging the rcu tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: "sched_setscheduler_nocheck" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_down_write" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_up_write" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_down_read" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_up_read" [kernel/locking/locktorture.ko] undefined!
ERROR: "__percpu_init_rwsem" [kernel/locking/locktorture.ko] undefined!

Caused by commits

04be76a9b067 ("locktorture: Support rtmutex torturing") 40b2996f9b32 ("locktorture: Add torture tests for percpu_rwsem")

and maybe more.

I have used the rcu tree from next-20150831 for today.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#1 lore raw
Quoted 12 lines · Stephen Rothwell

Hi Paul,

After merging the rcu tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: "sched_setscheduler_nocheck" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_down_write" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_up_write" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_down_read" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_up_read" [kernel/locking/locktorture.ko] undefined!
ERROR: "__percpu_init_rwsem" [kernel/locking/locktorture.ko] undefined!

Quoted 8 lines

Caused by commits

04be76a9b067 ("locktorture: Support rtmutex torturing") 40b2996f9b32 ("locktorture: Add torture tests for percpu_rwsem")

and maybe more.

I have used the rcu tree from next-20150831 for today.

It is looking like I will be deferring these to v4.4, apologies for the hassle!

Thanx, Paul

#2 lore raw

Hi Paul,

Quoted 18 lines · On Tue, 1 Sep 2015 00:49:46 -0700 "Paul E. McKenney"…
Quoted 16 lines · Stephen Rothwell

After merging the rcu tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: "sched_setscheduler_nocheck" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_down_write" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_up_write" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_down_read" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_up_read" [kernel/locking/locktorture.ko] undefined!
ERROR: "__percpu_init_rwsem" [kernel/locking/locktorture.ko] undefined!

Caused by commits

04be76a9b067 ("locktorture: Support rtmutex torturing") 40b2996f9b32 ("locktorture: Add torture tests for percpu_rwsem")

Quoted 6 lines
Quoted 3 lines

and maybe more.

I have used the rcu tree from next-20150831 for today.

It is looking like I will be deferring these to v4.4, apologies for the hassle!

This still fails to build but now I only get the error about sched_setscheduler_nocheck.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#3 lore raw
Quoted 23 lines · Stephen Rothwell

Hi Paul,

Quoted 20 lines · On Tue, 1 Sep 2015 00:49:46 -0700 "Paul E. McKenney"…
Quoted 18 lines · Stephen Rothwell

After merging the rcu tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: "sched_setscheduler_nocheck" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_down_write" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_up_write" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_down_read" [kernel/locking/locktorture.ko] undefined!
ERROR: "percpu_up_read" [kernel/locking/locktorture.ko] undefined!
ERROR: "__percpu_init_rwsem" [kernel/locking/locktorture.ko] undefined!

Caused by commits

04be76a9b067 ("locktorture: Support rtmutex torturing") 40b2996f9b32 ("locktorture: Add torture tests for percpu_rwsem")

and maybe more.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

I have used the rcu tree from next-20150831 for today.

It is looking like I will be deferring these to v4.4, apologies for the hassle!

This still fails to build but now I only get the error about sched_setscheduler_nocheck.

OK, now I actually have deferred these to v4.4.

Davidlohr, the error is due to sched_setscheduler_nocheck() not being exported, so that Stephen gets this failure when building modules. This is 04be76a9b067 (locktorture: Support rtmutex torturing) in -rcu.

Thoughts?

Thanx, Paul

#4 lore raw
Quoted 5 lines · Paul E. McKenney

Davidlohr, the error is due to sched_setscheduler_nocheck() not being exported, so that Stephen gets this failure when building modules. This is 04be76a9b067 (locktorture: Support rtmutex torturing) in -rcu.

Thoughts?

Right, the below should take care of it. Although I think it makes sense to get this into at least 4.3 even if we won't use it until 4.4. Simply because we already export sched_setscheduler(). If you agree I guess we could route via -tip.

Thanks,
Davidlohr

----8<------------------------------------
Subject: [PATCH -next] sched: Export sched_setscheduler_nocheck

... just like regular sched_setscheduler(). We need this, for locktorture otherwise we can fail to build modules, ie:

ERROR: "sched_setscheduler_nocheck" [kernel/locking/locktorture.ko] undefined!

---
 kernel/sched/core.c | 1 +
 1 file changed, 1 insertion(+)
kernel/sched/core.c +1 -0
index 3595403..7b51f64 100644
@@ -4012,6 +4012,7 @@ int sched_setscheduler_nocheck(struct task_struct *p, int policy,
 {
 	return _sched_setscheduler(p, policy, param, false);
 }
+EXPORT_SYMBOL_GPL(sched_setscheduler_nocheck);
 
 static int
 do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
Signature · 1 line
2.1.4
#5 lore raw
Quoted 11 lines · Davidlohr Bueso
Quoted 5 lines · Paul E. McKenney

Davidlohr, the error is due to sched_setscheduler_nocheck() not being exported, so that Stephen gets this failure when building modules. This is 04be76a9b067 (locktorture: Support rtmutex torturing) in -rcu.

Thoughts?

Right, the below should take care of it. Although I think it makes sense to get this into at least 4.3 even if we won't use it until 4.4. Simply because we already export sched_setscheduler(). If you agree I guess we could route via -tip.

Given an ack from Peter or Ingo, I would happy to queue it. But we are talking 4.4 rather than 4.3, sorry!

Thanx, Paul

Quoted 35 lines

Thanks,
Davidlohr

----8<------------------------------------
Subject: [PATCH -next] sched: Export sched_setscheduler_nocheck

... just like regular sched_setscheduler(). We need this, for locktorture otherwise we can fail to build modules, ie:

ERROR: "sched_setscheduler_nocheck" [kernel/locking/locktorture.ko] undefined!

---
 kernel/sched/core.c | 1 +
 1 file changed, 1 insertion(+)
kernel/sched/core.c +1 -0
index 3595403..7b51f64 100644
@@ -4012,6 +4012,7 @@ int sched_setscheduler_nocheck(struct task_struct *p, int policy,
 {
 	return _sched_setscheduler(p, policy, param, false);
 }
+EXPORT_SYMBOL_GPL(sched_setscheduler_nocheck);
 
 static int
 do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
Signature · 1 line
2.1.4
Acked-by
#6 lore raw
Quoted 8 lines · Paul E. McKenney
Quoted 7 lines · Davidlohr Bueso
Quoted 5 lines · Paul E. McKenney

Davidlohr, the error is due to sched_setscheduler_nocheck() not being exported, so that Stephen gets this failure when building modules. This is 04be76a9b067 (locktorture: Support rtmutex torturing) in -rcu.

Thoughts?

Quoted 7 lines
Quoted 4 lines

Right, the below should take care of it. Although I think it makes sense to get this into at least 4.3 even if we won't use it until 4.4. Simply because we already export sched_setscheduler(). If you agree I guess we could route via -tip.

Given an ack from Peter or Ingo, I would happy to queue it. But we are talking 4.4 rather than 4.3, sorry!

The export looks good to me:

Thanks,

Ingo

Acked-by Ingo Molnar
#7 lore raw
Quoted 16 lines · Ingo Molnar
Quoted 13 lines · Paul E. McKenney
Quoted 11 lines · Davidlohr Bueso
Quoted 5 lines · Paul E. McKenney

Davidlohr, the error is due to sched_setscheduler_nocheck() not being exported, so that Stephen gets this failure when building modules. This is 04be76a9b067 (locktorture: Support rtmutex torturing) in -rcu.

Thoughts?

Right, the below should take care of it. Although I think it makes sense to get this into at least 4.3 even if we won't use it until 4.4. Simply because we already export sched_setscheduler(). If you agree I guess we could route via -tip.

Quoted 6 lines
Quoted 2 lines

Given an ack from Peter or Ingo, I would happy to queue it. But we are talking 4.4 rather than 4.3, sorry!

The export looks good to me:

Very good, queued for 4.4!

Thanx, Paul

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

sched: Export sched_setscheduler_nocheck

The new locktorture rtmutex_lock tests exercise priority boosting, which means that they need to set some tasks to real-time priority. To do this, they use sched_setscheduler_nocheck(). However, this is not exported to modules, which results in the following error when building locktorture as a module:

ERROR: "sched_setscheduler_nocheck" [kernel/locking/locktorture.ko] undefined!

This commit therefore adds an EXPORT_SYMBOL_GPL() to allow this function to be invoked from locktorture when built as a module.

kernel/sched/core.c +1 -0
index 5e73c79fadd0..5eee11b2b4b0 100644
@@ -3960,6 +3960,7 @@ int sched_setscheduler_nocheck(struct task_struct *p, int policy,
 {
 	return _sched_setscheduler(p, policy, param, false);
 }
+EXPORT_SYMBOL_GPL(sched_setscheduler_nocheck);
 
 static int
 do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)