All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] assorted fixes, ARM port to kernel 4.19
@ 2019-06-01 15:14 Philippe Gerum
  2019-06-01 15:14 ` [PATCH 1/8] lib/cobalt: init: fix misleading message Philippe Gerum
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Philippe Gerum @ 2019-06-01 15:14 UTC (permalink / raw)
  To: xenomai; +Cc: Jan Kiszka, Philippe Gerum

This is material for both 3.0.9 and -next.

Philippe Gerum (8):
  lib/cobalt: init: fix misleading message
  cobalt/arm: fix context switching code for 4.19+
  drivers/udd: fix spurious select() read events
  testsuite/smokey: sched-quota: allow up to 1.5% deviation from plan
  testsuite/smokey: reset main()'s SCHED_OTHER policy before each test
  cobalt/thread: send backtracing request only when XNWARN is set
  cobalt/thread: fix error status (-EINTR) of xnthread_killall()
  lib/cobalt: kickstart backtrace() from safe context

 include/cobalt/kernel/rtdm/udd.h           |  2 +-
 kernel/cobalt/arch/arm/switch.S            | 54 +++++++++++++++++++++-
 kernel/cobalt/thread.c                     | 10 ++--
 kernel/drivers/udd/udd.c                   | 31 ++++++++-----
 lib/cobalt/init.c                          |  2 +-
 lib/cobalt/sigshadow.c                     |  8 ++++
 testsuite/smokey/main.c                    |  2 +
 testsuite/smokey/sched-quota/sched-quota.c |  2 +-
 8 files changed, 91 insertions(+), 20 deletions(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/8] lib/cobalt: init: fix misleading message
  2019-06-01 15:14 [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Philippe Gerum
@ 2019-06-01 15:14 ` Philippe Gerum
  2019-06-01 15:14 ` [PATCH 2/8] cobalt/arm: fix context switching code for 4.19+ Philippe Gerum
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Philippe Gerum @ 2019-06-01 15:14 UTC (permalink / raw)
  To: xenomai; +Cc: Jan Kiszka, Philippe Gerum

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
 lib/cobalt/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c
index 7d19c6c31..02a99c569 100644
--- a/lib/cobalt/init.c
+++ b/lib/cobalt/init.c
@@ -163,7 +163,7 @@ static void low_init(void)
 		early_panic("ABI mismatch: required r%lu, provided r%lu",
 			    XENOMAI_ABI_REV, f->feat_abirev);
 	case -EAGAIN:
-		early_panic("Cobalt core present but disabled "
+		early_panic("Cobalt core present but stopped "
 			    "(use corectl --start)");
 	case -ENOSYS:
 		early_panic("Cobalt core not enabled in kernel");
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/8] cobalt/arm: fix context switching code for 4.19+
  2019-06-01 15:14 [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Philippe Gerum
  2019-06-01 15:14 ` [PATCH 1/8] lib/cobalt: init: fix misleading message Philippe Gerum
@ 2019-06-01 15:14 ` Philippe Gerum
  2019-06-01 15:14 ` [PATCH 3/8] drivers/udd: fix spurious select() read events Philippe Gerum
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Philippe Gerum @ 2019-06-01 15:14 UTC (permalink / raw)
  To: xenomai; +Cc: Jan Kiszka, Philippe Gerum

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
 kernel/cobalt/arch/arm/switch.S | 54 ++++++++++++++++++++++++++++++++-
 1 file changed, 53 insertions(+), 1 deletion(-)

diff --git a/kernel/cobalt/arch/arm/switch.S b/kernel/cobalt/arch/arm/switch.S
index 505fd5af2..9fc847ab0 100644
--- a/kernel/cobalt/arch/arm/switch.S
+++ b/kernel/cobalt/arch/arm/switch.S
@@ -110,7 +110,6 @@ ENDPROC(__asm_vfp_load)
 	.endm
 #endif
 
-/*
 /*
  * Switch context routine.
  *
@@ -134,8 +133,15 @@ ENDPROC(__asm_vfp_load)
  *
  *  Calling args:
  * r0 = previous thread_info, r1 = next thread_info
+ *
+ * FIXME: this is ugly, at some point we should stop duplicating
+ * what __switch_to() does, dropping specific fpu management from
+ * Cobalt in the same move; this will have to wait until Dovetail
+ * is substituted to the I-pipe though, since the former already
+ * provides the support we need for this. --rpm
  */
 ENTRY(__asm_thread_switch)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
 	add     ip, r0, #TI_CPU_SAVE
  ARM(	stmia	ip!, {r4 - sl, fp, sp, lr} )	@ Store most regs on stack
  THUMB(	stmia	ip!, {r4 - sl, fp}	   )	@ Store most regs on stack
@@ -165,3 +171,49 @@ ENTRY(__asm_thread_switch)
  THUMB(	ldr	sp, [ip], #4		   )
  THUMB(	ldr	pc, [ip]		   )
 ENDPROC(__asm_thread_switch)
+
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) */
+
+#include <asm/unwind.h>
+
+ UNWIND(.fnstart	)
+ UNWIND(.cantunwind	)
+	add	ip, r0, #TI_CPU_SAVE
+ ARM(	stmia	ip!, {r4 - sl, fp, sp, lr} )	@ Store most regs on stack
+ THUMB(	stmia	ip!, {r4 - sl, fp}	   )	@ Store most regs on stack
+ THUMB(	str	sp, [ip], #4		   )
+ THUMB(	str	lr, [ip], #4		   )
+	ldr	r4, [r1, #TI_TP_VALUE]
+	ldr	r5, [r1, #TI_TP_VALUE + 4]
+#ifdef CONFIG_CPU_USE_DOMAINS
+	mrc	p15, 0, r6, c3, c0, 0		@ Get domain register
+	str	r6, [r0, #TI_CPU_DOMAIN]	@ Save old domain register
+	ldr	r6, [r1, #TI_CPU_DOMAIN]
+#endif
+	switch_tls r0, r4, r5, r3, r7
+#if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_SMP)
+	ldr	r7, [r1, #TI_TASK]
+	ldr	r8, =__stack_chk_guard
+	.if (TSK_STACK_CANARY > IMM12_MASK)
+	add	r7, r7, #TSK_STACK_CANARY & ~IMM12_MASK
+	.endif
+	ldr	r7, [r7, #TSK_STACK_CANARY & IMM12_MASK]
+#endif
+#ifdef CONFIG_CPU_USE_DOMAINS
+	mcr	p15, 0, r6, c3, c0, 0		@ Set domain register
+#endif
+	mov	r5, r0
+	fpu_switch r4
+	add	r4, r1, #TI_CPU_SAVE
+#if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_SMP)
+	str	r7, [r8]
+#endif
+ THUMB(	mov	ip, r4			   )
+	mov	r0, r5
+ ARM(	ldmia	r4, {r4 - sl, fp, sp, pc}  )	@ Load all regs saved previously
+ THUMB(	ldmia	ip!, {r4 - sl, fp}	   )	@ Load all regs saved previously
+ THUMB(	ldr	sp, [ip], #4		   )
+ THUMB(	ldr	pc, [ip]		   )
+ UNWIND(.fnend		)
+
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) */
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/8] drivers/udd: fix spurious select() read events
  2019-06-01 15:14 [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Philippe Gerum
  2019-06-01 15:14 ` [PATCH 1/8] lib/cobalt: init: fix misleading message Philippe Gerum
  2019-06-01 15:14 ` [PATCH 2/8] cobalt/arm: fix context switching code for 4.19+ Philippe Gerum
@ 2019-06-01 15:14 ` Philippe Gerum
  2019-06-01 15:14 ` [PATCH 4/8] testsuite/smokey: sched-quota: allow up to 1.5% deviation from plan Philippe Gerum
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Philippe Gerum @ 2019-06-01 15:14 UTC (permalink / raw)
  To: xenomai; +Cc: Jan Kiszka, Philippe Gerum

See https://xenomai.org/pipermail/xenomai/2017-July/037494.html

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
 include/cobalt/kernel/rtdm/udd.h |  2 +-
 kernel/drivers/udd/udd.c         | 31 ++++++++++++++++++++-----------
 2 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/include/cobalt/kernel/rtdm/udd.h b/include/cobalt/kernel/rtdm/udd.h
index 550ba9d24..bc2a68db6 100644
--- a/include/cobalt/kernel/rtdm/udd.h
+++ b/include/cobalt/kernel/rtdm/udd.h
@@ -306,7 +306,7 @@ struct udd_device {
 	/** Reserved to the UDD core. */
 	struct udd_reserved {
 		rtdm_irq_t irqh;
-		atomic_t event;
+		u32 event_count;
 		struct udd_signotify signfy;
 		struct rtdm_event pulse;
 		struct rtdm_driver driver;
diff --git a/kernel/drivers/udd/udd.c b/kernel/drivers/udd/udd.c
index 972db1225..b086096cc 100644
--- a/kernel/drivers/udd/udd.c
+++ b/kernel/drivers/udd/udd.c
@@ -117,7 +117,8 @@ static ssize_t udd_read_rt(struct rtdm_fd *fd,
 	struct udd_context *context;
 	struct udd_reserved *ur;
 	struct udd_device *udd;
-	ssize_t ret;
+	rtdm_lockctx_t ctx;
+	ssize_t ret = 0;
 	u32 count;
 
 	if (len != sizeof(count))
@@ -130,15 +131,20 @@ static ssize_t udd_read_rt(struct rtdm_fd *fd,
 	ur = &udd->__reserved;
 	context = rtdm_fd_to_private(fd);
 
-	for (;;) {
-		if (atomic_read(&ur->event) != context->event_count)
-			break;
+	cobalt_atomic_enter(ctx);
+
+	if (ur->event_count != context->event_count)
+		rtdm_event_clear(&ur->pulse);
+	else
 		ret = rtdm_event_wait(&ur->pulse);
-		if (ret)
-			return ret;
-	}
 
-	count = atomic_read(&ur->event);
+	count = ur->event_count;
+
+	cobalt_atomic_leave(ctx);
+
+	if (ret)
+		return ret;
+
 	context->event_count = count;
 	ret = rtdm_copy_to_user(fd, buf, &count, sizeof(count));
 
@@ -404,7 +410,7 @@ int udd_register_device(struct udd_device *udd)
 	} else
 		ur->mapper_name = NULL;
 
-	atomic_set(&ur->event, 0);
+	ur->event_count = 0;
 	rtdm_event_init(&ur->pulse, 0);
 	ur->signfy.pid = -1;
 
@@ -501,12 +507,15 @@ void udd_notify_event(struct udd_device *udd)
 {
 	struct udd_reserved *ur = &udd->__reserved;
 	union sigval sival;
+	rtdm_lockctx_t ctx;
 
-	atomic_inc(&ur->event);
+	cobalt_atomic_enter(ctx);
+	ur->event_count++;
 	rtdm_event_signal(&ur->pulse);
+	cobalt_atomic_leave(ctx);
 
 	if (ur->signfy.pid > 0) {
-		sival.sival_int = atomic_read(&ur->event);
+		sival.sival_int = (int)ur->event_count;
 		__cobalt_sigqueue(ur->signfy.pid, ur->signfy.sig, &sival);
 	}
 }
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/8] testsuite/smokey: sched-quota: allow up to 1.5% deviation from plan
  2019-06-01 15:14 [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Philippe Gerum
                   ` (2 preceding siblings ...)
  2019-06-01 15:14 ` [PATCH 3/8] drivers/udd: fix spurious select() read events Philippe Gerum
@ 2019-06-01 15:14 ` Philippe Gerum
  2019-06-01 15:14 ` [PATCH 5/8] testsuite/smokey: reset main()'s SCHED_OTHER policy before each test Philippe Gerum
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Philippe Gerum @ 2019-06-01 15:14 UTC (permalink / raw)
  To: xenomai; +Cc: Jan Kiszka, Philippe Gerum

[+/-]0.5% is too strict on some architectures (e.g. x86) where the
test run may crunch numbers faster than the calibration did. 1.5% is a
probabilistic attempt to cope with this variation while remaining
within acceptable bounds.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
 testsuite/smokey/sched-quota/sched-quota.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuite/smokey/sched-quota/sched-quota.c b/testsuite/smokey/sched-quota/sched-quota.c
index 10ecfad44..5c35b551d 100644
--- a/testsuite/smokey/sched-quota/sched-quota.c
+++ b/testsuite/smokey/sched-quota/sched-quota.c
@@ -327,7 +327,7 @@ static int run_sched_quota(struct smokey_test *t, int argc, char *const argv[])
 	smokey_trace("%d thread%s: cap=%d%%, effective=%.1f%%",
 		     nrthreads, nrthreads > 1 ? "s": "", quota, effective);
 
-	if (!smokey_on_vm && fabs(effective - (double)quota) > 0.5) {
+	if (!smokey_on_vm && fabs(effective - (double)quota) > 1.5) {
 		smokey_warning("out of quota: %.1f%%",
 			       effective - (double)quota);
 		return -EPROTO;
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/8] testsuite/smokey: reset main()'s SCHED_OTHER policy before each test
  2019-06-01 15:14 [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Philippe Gerum
                   ` (3 preceding siblings ...)
  2019-06-01 15:14 ` [PATCH 4/8] testsuite/smokey: sched-quota: allow up to 1.5% deviation from plan Philippe Gerum
@ 2019-06-01 15:14 ` Philippe Gerum
  2019-06-03 11:09   ` Jan Kiszka
  2019-06-01 15:15 ` [PATCH 6/8] cobalt/thread: send backtracing request only when XNWARN is set Philippe Gerum
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 13+ messages in thread
From: Philippe Gerum @ 2019-06-01 15:14 UTC (permalink / raw)
  To: xenomai; +Cc: Jan Kiszka, Philippe Gerum

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
 testsuite/smokey/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testsuite/smokey/main.c b/testsuite/smokey/main.c
index 12321dfc5..5702e825a 100644
--- a/testsuite/smokey/main.c
+++ b/testsuite/smokey/main.c
@@ -22,6 +22,7 @@
 
 int main(int argc, char *const argv[])
 {
+	struct sched_param param = { .sched_priority = 0 };
 	struct smokey_test *t;
 	int ret, fails = 0;
 
@@ -29,6 +30,7 @@ int main(int argc, char *const argv[])
 		return 0;
 
 	for_each_smokey_test(t) {
+		pthread_setschedparam(pthread_self(), SCHED_OTHER, &param);
 		ret = t->run(t, argc, argv);
 		if (ret) {
 			if (ret == -ENOSYS) {
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 6/8] cobalt/thread: send backtracing request only when XNWARN is set
  2019-06-01 15:14 [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Philippe Gerum
                   ` (4 preceding siblings ...)
  2019-06-01 15:14 ` [PATCH 5/8] testsuite/smokey: reset main()'s SCHED_OTHER policy before each test Philippe Gerum
@ 2019-06-01 15:15 ` Philippe Gerum
  2019-06-01 15:15 ` [PATCH 7/8] cobalt/thread: fix error status (-EINTR) of xnthread_killall() Philippe Gerum
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Philippe Gerum @ 2019-06-01 15:15 UTC (permalink / raw)
  To: xenomai; +Cc: Jan Kiszka, Philippe Gerum

If the relaxing thread did not ask for being warned upon such event,
there is no point in asking for a backtrace.

See https://www.xenomai.org/pipermail/xenomai/2019-May/040925.html

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
 kernel/cobalt/thread.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index fa7a65569..6caf9ef37 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -2131,11 +2131,11 @@ void xnthread_relax(int notify, int reason)
 	 * information.
 	 */
 	xnthread_propagate_schedparam(thread);
-	
+
 	if (xnthread_test_state(thread, XNUSER) && notify) {
-		xndebug_notify_relax(thread, reason);
 		if (xnthread_test_state(thread, XNWARN)) {
 			/* Help debugging spurious relaxes. */
+			xndebug_notify_relax(thread, reason);
 			memset(&si, 0, sizeof(si));
 			si.si_signo = SIGDEBUG;
 			si.si_code = SI_QUEUE;
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 7/8] cobalt/thread: fix error status (-EINTR) of xnthread_killall()
  2019-06-01 15:14 [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Philippe Gerum
                   ` (5 preceding siblings ...)
  2019-06-01 15:15 ` [PATCH 6/8] cobalt/thread: send backtracing request only when XNWARN is set Philippe Gerum
@ 2019-06-01 15:15 ` Philippe Gerum
  2019-06-01 15:15 ` [PATCH 8/8] lib/cobalt: kickstart backtrace() from safe context Philippe Gerum
  2019-06-03 15:00 ` [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Jan Kiszka
  8 siblings, 0 replies; 13+ messages in thread
From: Philippe Gerum @ 2019-06-01 15:15 UTC (permalink / raw)
  To: xenomai; +Cc: Jan Kiszka, Philippe Gerum

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
 kernel/cobalt/thread.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index 6caf9ef37..2f1988061 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -2588,7 +2588,7 @@ int xnthread_killall(int grace, int mask)
 	xnlock_get_irqsave(&nklock, s);
 
 	nrthreads = cobalt_nrthreads;
-	
+
 	xnsched_for_each_thread(t) {
 		if (xnthread_test_state(t, XNROOT) ||
 		    xnthread_test_state(t, mask) != mask ||
@@ -2632,10 +2632,10 @@ int xnthread_killall(int grace, int mask)
 		printk(XENO_INFO "joined %d threads\n",
 		       count + nrkilled - cobalt_nrthreads);
 
-	return ret < 0 ? EINTR : 0;
+	return ret < 0 ? -EINTR : 0;
 }
 EXPORT_SYMBOL_GPL(xnthread_killall);
-		     
+
 /* Xenomai's generic personality. */
 struct xnthread_personality xenomai_personality = {
 	.name = "core",
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 8/8] lib/cobalt: kickstart backtrace() from safe context
  2019-06-01 15:14 [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Philippe Gerum
                   ` (6 preceding siblings ...)
  2019-06-01 15:15 ` [PATCH 7/8] cobalt/thread: fix error status (-EINTR) of xnthread_killall() Philippe Gerum
@ 2019-06-01 15:15 ` Philippe Gerum
  2019-06-03 15:00 ` [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Jan Kiszka
  8 siblings, 0 replies; 13+ messages in thread
From: Philippe Gerum @ 2019-06-01 15:15 UTC (permalink / raw)
  To: xenomai; +Cc: Jan Kiszka, Philippe Gerum

Kickstart backtrace() so that it may call malloc() from a safe context
when installing the SIGSHADOW handler, not later on from that handler.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
 lib/cobalt/sigshadow.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/cobalt/sigshadow.c b/lib/cobalt/sigshadow.c
index fc8adf648..68d3e6276 100644
--- a/lib/cobalt/sigshadow.c
+++ b/lib/cobalt/sigshadow.c
@@ -97,10 +97,18 @@ static void sigshadow_handler(int sig, siginfo_t *si, void *ctxt)
 
 static void install_sigshadow(void)
 {
+	void *dummy[SIGSHADOW_BACKTRACE_DEPTH];
 	struct sigaction new_sigshadow_action;
 	sigset_t saved_sigset;
 	sigset_t mask_sigset;
 
+	/*
+	 * Kickstart backtrace() so that it may call malloc() from a
+	 * safe context right now, not later on from the sigshadow
+	 * handler.
+	 */
+	backtrace(dummy, SIGSHADOW_BACKTRACE_DEPTH);
+
 	sigemptyset(&mask_sigset);
 	sigaddset(&mask_sigset, SIGSHADOW);
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/8] testsuite/smokey: reset main()'s SCHED_OTHER policy before each test
  2019-06-01 15:14 ` [PATCH 5/8] testsuite/smokey: reset main()'s SCHED_OTHER policy before each test Philippe Gerum
@ 2019-06-03 11:09   ` Jan Kiszka
  2019-06-03 11:51     ` Philippe Gerum
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2019-06-03 11:09 UTC (permalink / raw)
  To: Philippe Gerum, xenomai

On 01.06.19 17:14, Philippe Gerum wrote:
> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
> ---
>   testsuite/smokey/main.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/testsuite/smokey/main.c b/testsuite/smokey/main.c
> index 12321dfc5..5702e825a 100644
> --- a/testsuite/smokey/main.c
> +++ b/testsuite/smokey/main.c
> @@ -22,6 +22,7 @@
>   
>   int main(int argc, char *const argv[])
>   {
> +	struct sched_param param = { .sched_priority = 0 };
>   	struct smokey_test *t;
>   	int ret, fails = 0;
>   
> @@ -29,6 +30,7 @@ int main(int argc, char *const argv[])
>   		return 0;
>   
>   	for_each_smokey_test(t) {
> +		pthread_setschedparam(pthread_self(), SCHED_OTHER, &param);
>   		ret = t->run(t, argc, argv);
>   		if (ret) {
>   			if (ret == -ENOSYS) {
> 

Is that a cosmetic cleanup, or did we see tests failing or doing the wrong 
thing? Just to clarify the importance of this fix, also for stable (a few word 
in the commit log would have done that trick for me ;) ).

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/8] testsuite/smokey: reset main()'s SCHED_OTHER policy before each test
  2019-06-03 11:09   ` Jan Kiszka
@ 2019-06-03 11:51     ` Philippe Gerum
  2019-06-03 12:29       ` Jan Kiszka
  0 siblings, 1 reply; 13+ messages in thread
From: Philippe Gerum @ 2019-06-03 11:51 UTC (permalink / raw)
  To: Jan Kiszka, xenomai

On 6/3/19 1:09 PM, Jan Kiszka wrote:
> On 01.06.19 17:14, Philippe Gerum wrote:
>> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
>> ---
>>   testsuite/smokey/main.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/testsuite/smokey/main.c b/testsuite/smokey/main.c
>> index 12321dfc5..5702e825a 100644
>> --- a/testsuite/smokey/main.c
>> +++ b/testsuite/smokey/main.c
>> @@ -22,6 +22,7 @@
>>     int main(int argc, char *const argv[])
>>   {
>> +    struct sched_param param = { .sched_priority = 0 };
>>       struct smokey_test *t;
>>       int ret, fails = 0;
>>   @@ -29,6 +30,7 @@ int main(int argc, char *const argv[])
>>           return 0;
>>         for_each_smokey_test(t) {
>> +        pthread_setschedparam(pthread_self(), SCHED_OTHER, &param);
>>           ret = t->run(t, argc, argv);
>>           if (ret) {
>>               if (ret == -ENOSYS) {
>>
> 
> Is that a cosmetic cleanup, or did we see tests failing or doing the
> wrong thing? Just to clarify the importance of this fix, also for stable
> (a few word in the commit log would have done that trick for me ;) ).
> 

https://www.xenomai.org/pipermail/xenomai/2019-May/040925.html


-- 
Philippe.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/8] testsuite/smokey: reset main()'s SCHED_OTHER policy before each test
  2019-06-03 11:51     ` Philippe Gerum
@ 2019-06-03 12:29       ` Jan Kiszka
  0 siblings, 0 replies; 13+ messages in thread
From: Jan Kiszka @ 2019-06-03 12:29 UTC (permalink / raw)
  To: Philippe Gerum, xenomai

On 03.06.19 13:51, Philippe Gerum wrote:
> On 6/3/19 1:09 PM, Jan Kiszka wrote:
>> On 01.06.19 17:14, Philippe Gerum wrote:
>>> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
>>> ---
>>>    testsuite/smokey/main.c | 2 ++
>>>    1 file changed, 2 insertions(+)
>>>
>>> diff --git a/testsuite/smokey/main.c b/testsuite/smokey/main.c
>>> index 12321dfc5..5702e825a 100644
>>> --- a/testsuite/smokey/main.c
>>> +++ b/testsuite/smokey/main.c
>>> @@ -22,6 +22,7 @@
>>>      int main(int argc, char *const argv[])
>>>    {
>>> +    struct sched_param param = { .sched_priority = 0 };
>>>        struct smokey_test *t;
>>>        int ret, fails = 0;
>>>    @@ -29,6 +30,7 @@ int main(int argc, char *const argv[])
>>>            return 0;
>>>          for_each_smokey_test(t) {
>>> +        pthread_setschedparam(pthread_self(), SCHED_OTHER, &param);
>>>            ret = t->run(t, argc, argv);
>>>            if (ret) {
>>>                if (ret == -ENOSYS) {
>>>
>>
>> Is that a cosmetic cleanup, or did we see tests failing or doing the
>> wrong thing? Just to clarify the importance of this fix, also for stable
>> (a few word in the commit log would have done that trick for me ;) ).
>>
> 
> https://www.xenomai.org/pipermail/xenomai/2019-May/040925.html
> 
> 

Thanks, adding that now and also picking it for stable.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/8] assorted fixes, ARM port to kernel 4.19
  2019-06-01 15:14 [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Philippe Gerum
                   ` (7 preceding siblings ...)
  2019-06-01 15:15 ` [PATCH 8/8] lib/cobalt: kickstart backtrace() from safe context Philippe Gerum
@ 2019-06-03 15:00 ` Jan Kiszka
  8 siblings, 0 replies; 13+ messages in thread
From: Jan Kiszka @ 2019-06-03 15:00 UTC (permalink / raw)
  To: Philippe Gerum, xenomai

On 01.06.19 17:14, Philippe Gerum wrote:
> This is material for both 3.0.9 and -next.
> 
> Philippe Gerum (8):
>    lib/cobalt: init: fix misleading message
>    cobalt/arm: fix context switching code for 4.19+
>    drivers/udd: fix spurious select() read events
>    testsuite/smokey: sched-quota: allow up to 1.5% deviation from plan
>    testsuite/smokey: reset main()'s SCHED_OTHER policy before each test
>    cobalt/thread: send backtracing request only when XNWARN is set
>    cobalt/thread: fix error status (-EINTR) of xnthread_killall()
>    lib/cobalt: kickstart backtrace() from safe context
> 
>   include/cobalt/kernel/rtdm/udd.h           |  2 +-
>   kernel/cobalt/arch/arm/switch.S            | 54 +++++++++++++++++++++-
>   kernel/cobalt/thread.c                     | 10 ++--
>   kernel/drivers/udd/udd.c                   | 31 ++++++++-----
>   lib/cobalt/init.c                          |  2 +-
>   lib/cobalt/sigshadow.c                     |  8 ++++
>   testsuite/smokey/main.c                    |  2 +
>   testsuite/smokey/sched-quota/sched-quota.c |  2 +-
>   8 files changed, 91 insertions(+), 20 deletions(-)
> 

Whole series in next, patches 3-8 also in stable.

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-06-03 15:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-01 15:14 [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Philippe Gerum
2019-06-01 15:14 ` [PATCH 1/8] lib/cobalt: init: fix misleading message Philippe Gerum
2019-06-01 15:14 ` [PATCH 2/8] cobalt/arm: fix context switching code for 4.19+ Philippe Gerum
2019-06-01 15:14 ` [PATCH 3/8] drivers/udd: fix spurious select() read events Philippe Gerum
2019-06-01 15:14 ` [PATCH 4/8] testsuite/smokey: sched-quota: allow up to 1.5% deviation from plan Philippe Gerum
2019-06-01 15:14 ` [PATCH 5/8] testsuite/smokey: reset main()'s SCHED_OTHER policy before each test Philippe Gerum
2019-06-03 11:09   ` Jan Kiszka
2019-06-03 11:51     ` Philippe Gerum
2019-06-03 12:29       ` Jan Kiszka
2019-06-01 15:15 ` [PATCH 6/8] cobalt/thread: send backtracing request only when XNWARN is set Philippe Gerum
2019-06-01 15:15 ` [PATCH 7/8] cobalt/thread: fix error status (-EINTR) of xnthread_killall() Philippe Gerum
2019-06-01 15:15 ` [PATCH 8/8] lib/cobalt: kickstart backtrace() from safe context Philippe Gerum
2019-06-03 15:00 ` [PATCH 0/8] assorted fixes, ARM port to kernel 4.19 Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.