2021-01-21 14:44:13

by Sven Schnelle

[permalink] [raw]
Subject: Warning with next-20210121 on s390

there's a warning with linux-next on s390:

[ 33.893818] systemd-xdg-autostart-generator[544]: Not generating service for XDG autostart app-at\x2dspi\x2ddbus\x2dbus-autostart.service, startup phases are not supported.
[ 54.613344] ------------[ cut here ]------------
[ 54.613702] Late current task rescheduling may be lost
[ 54.613709] WARNING: CPU: 0 PID: 574 at linux/kernel/sched/core.c:628 sched_resched_local_assert_allowed+0x86/0x90
[ 54.613714] Modules linked in:
[ 54.613717] CPU: 0 PID: 574 Comm: qemu-system-s39 Not tainted 5.11.0-rc4-next-20210121 #2601
[ 54.613721] Hardware name: IBM 3906 M04 704 (z/VM 7.1.0)
[ 54.613724] Krnl PSW : 0404e00180000000 0000000000d86bea (sched_resched_local_assert_allowed+0x8a/0x90)
[ 54.613730] R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3

This is because of a non-obvious merge conflict between 56e62a737028
("s390: convert to generic entry") and 845f44e8ef28 ("sched: Report local
wake up on resched blind zone within idle loop"). Can you include the attached patch
into linux-next?

Thanks,
Sven


2021-01-21 14:50:54

by Sven Schnelle

[permalink] [raw]
Subject: [PATCH] s390: allow reschedule on syscall restart

Commit 845f44e8ef28 ("sched: Report local wake up on resched blind zone
within idle loop") from next-20210121 causes a warning because s390
doesn't call sched_resched_local_allow() when restarting a syscall.

Signed-off-by: Sven Schnelle <[email protected]>
---
arch/s390/kernel/syscall.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/s390/kernel/syscall.c b/arch/s390/kernel/syscall.c
index bc8e650e377d..2b39ac40f970 100644
--- a/arch/s390/kernel/syscall.c
+++ b/arch/s390/kernel/syscall.c
@@ -162,6 +162,7 @@ void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
do_syscall(regs);
if (!test_pt_regs_flag(regs, PIF_SYSCALL_RESTART))
break;
+ sched_resched_local_allow();
local_irq_enable();
}
exit_to_user_mode();
--
2.17.1

2021-01-21 21:42:29

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [PATCH] s390: allow reschedule on syscall restart

Hi all,

On Thu, 21 Jan 2021 15:39:26 +0100 Sven Schnelle <[email protected]> wrote:
>
> Commit 845f44e8ef28 ("sched: Report local wake up on resched blind zone
> within idle loop") from next-20210121 causes a warning because s390
> doesn't call sched_resched_local_allow() when restarting a syscall.
>
> Signed-off-by: Sven Schnelle <[email protected]>
> ---
> arch/s390/kernel/syscall.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/s390/kernel/syscall.c b/arch/s390/kernel/syscall.c
> index bc8e650e377d..2b39ac40f970 100644
> --- a/arch/s390/kernel/syscall.c
> +++ b/arch/s390/kernel/syscall.c
> @@ -162,6 +162,7 @@ void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
> do_syscall(regs);
> if (!test_pt_regs_flag(regs, PIF_SYSCALL_RESTART))
> break;
> + sched_resched_local_allow();
> local_irq_enable();
> }
> exit_to_user_mode();

I add that today as a merge fixup patch to the merge of the rcu tree
(which contains commit 845f44e8ef28 ("sched: Report local wake up on
resched blind zone within idle loop") ).

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-01-21 21:48:54

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH] s390: allow reschedule on syscall restart

On Fri, Jan 22, 2021 at 08:32:49AM +1100, Stephen Rothwell wrote:
> Hi all,
>
> On Thu, 21 Jan 2021 15:39:26 +0100 Sven Schnelle <[email protected]> wrote:
> >
> > Commit 845f44e8ef28 ("sched: Report local wake up on resched blind zone
> > within idle loop") from next-20210121 causes a warning because s390
> > doesn't call sched_resched_local_allow() when restarting a syscall.
> >
> > Signed-off-by: Sven Schnelle <[email protected]>
> > ---
> > arch/s390/kernel/syscall.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/s390/kernel/syscall.c b/arch/s390/kernel/syscall.c
> > index bc8e650e377d..2b39ac40f970 100644
> > --- a/arch/s390/kernel/syscall.c
> > +++ b/arch/s390/kernel/syscall.c
> > @@ -162,6 +162,7 @@ void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
> > do_syscall(regs);
> > if (!test_pt_regs_flag(regs, PIF_SYSCALL_RESTART))
> > break;
> > + sched_resched_local_allow();
> > local_irq_enable();
> > }
> > exit_to_user_mode();
>
> I add that today as a merge fixup patch to the merge of the rcu tree
> (which contains commit 845f44e8ef28 ("sched: Report local wake up on
> resched blind zone within idle loop") ).

If Frederic has no objections, I will fold this in with attribution.

Either way, good catch!

Thanx, Paul

2021-01-21 22:34:53

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [PATCH] s390: allow reschedule on syscall restart

Hi all,

On Fri, 22 Jan 2021 08:32:49 +1100 Stephen Rothwell <[email protected]> wrote:
>
> I add that today as a merge fixup patch to the merge of the rcu tree
> (which contains commit 845f44e8ef28 ("sched: Report local wake up on
> resched blind zone within idle loop") ).

That is now commit

0932934fd95e ("sched: Report local wake up on resched blind zone within idle loop")

in the rcu tree.
--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-01-26 12:37:06

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [PATCH] s390: allow reschedule on syscall restart

Hi all,

On Tue, 26 Jan 2021 07:59:51 +0100 Christian Borntraeger <[email protected]> wrote:
>
> On 21.01.21 15:39, Sven Schnelle wrote:
> > Commit 845f44e8ef28 ("sched: Report local wake up on resched blind zone
> > within idle loop") from next-20210121 causes a warning because s390
> > doesn't call sched_resched_local_allow() when restarting a syscall.
> >
> > Signed-off-by: Sven Schnelle <[email protected]>
> > ---
> > arch/s390/kernel/syscall.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/s390/kernel/syscall.c b/arch/s390/kernel/syscall.c
> > index bc8e650e377d..2b39ac40f970 100644
> > --- a/arch/s390/kernel/syscall.c
> > +++ b/arch/s390/kernel/syscall.c
> > @@ -162,6 +162,7 @@ void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
> > do_syscall(regs);
> > if (!test_pt_regs_flag(regs, PIF_SYSCALL_RESTART))
> > break;
> > + sched_resched_local_allow();
> > local_irq_enable();
> > }
> > exit_to_user_mode();
>
> Yesterdays next now fails with
>
>
> arch/s390/kernel/syscall.c: In function '__do_syscall':
> arch/s390/kernel/syscall.c:165:3: error: implicit declaration of function 'sched_resched_local_allow' [-Werror=implicit-function-declaration]
> 165 | sched_resched_local_allow();
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
> make[2]: *** [scripts/Makefile.build:288: arch/s390/kernel/syscall.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [scripts/Makefile.build:530: arch/s390/kernel] Error 2
> make[1]: *** Waiting for unfinished jobs....

I have now removed the merge fix up for tomorrow. It seems that the
commits that needed it have been removed :-(

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-01-26 14:52:09

by Sven Schnelle

[permalink] [raw]
Subject: Re: [PATCH] s390: allow reschedule on syscall restart

Christian Borntraeger <[email protected]> writes:

> On 21.01.21 15:39, Sven Schnelle wrote:
>> Commit 845f44e8ef28 ("sched: Report local wake up on resched blind zone
>> within idle loop") from next-20210121 causes a warning because s390
>> doesn't call sched_resched_local_allow() when restarting a syscall.
>>
>> Signed-off-by: Sven Schnelle <[email protected]>
>> ---
>> arch/s390/kernel/syscall.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/s390/kernel/syscall.c b/arch/s390/kernel/syscall.c
>> index bc8e650e377d..2b39ac40f970 100644
>> --- a/arch/s390/kernel/syscall.c
>> +++ b/arch/s390/kernel/syscall.c
>> @@ -162,6 +162,7 @@ void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
>> do_syscall(regs);
>> if (!test_pt_regs_flag(regs, PIF_SYSCALL_RESTART))
>> break;
>> + sched_resched_local_allow();
>> local_irq_enable();
>> }
>> exit_to_user_mode();
>
> Yesterdays next now fails with
>
>
> arch/s390/kernel/syscall.c: In function '__do_syscall':
> arch/s390/kernel/syscall.c:165:3: error: implicit declaration of function 'sched_resched_local_allow' [-Werror=implicit-function-declaration]
> 165 | sched_resched_local_allow();
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
> make[2]: *** [scripts/Makefile.build:288: arch/s390/kernel/syscall.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [scripts/Makefile.build:530: arch/s390/kernel] Error 2
> make[1]: *** Waiting for unfinished jobs....

Looks to me like 845f44e8ef28 ("sched: Report local wake up on resched
blind zone") was removed from linux-next. Stephen, can you remove my
commit as well? It is no longer needed.

Thanks
Sven

2021-01-26 15:15:53

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH] s390: allow reschedule on syscall restart

On Tue, Jan 26, 2021 at 09:25:53PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> On Tue, 26 Jan 2021 07:59:51 +0100 Christian Borntraeger <[email protected]> wrote:
> >
> > On 21.01.21 15:39, Sven Schnelle wrote:
> > > Commit 845f44e8ef28 ("sched: Report local wake up on resched blind zone
> > > within idle loop") from next-20210121 causes a warning because s390
> > > doesn't call sched_resched_local_allow() when restarting a syscall.
> > >
> > > Signed-off-by: Sven Schnelle <[email protected]>
> > > ---
> > > arch/s390/kernel/syscall.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/arch/s390/kernel/syscall.c b/arch/s390/kernel/syscall.c
> > > index bc8e650e377d..2b39ac40f970 100644
> > > --- a/arch/s390/kernel/syscall.c
> > > +++ b/arch/s390/kernel/syscall.c
> > > @@ -162,6 +162,7 @@ void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
> > > do_syscall(regs);
> > > if (!test_pt_regs_flag(regs, PIF_SYSCALL_RESTART))
> > > break;
> > > + sched_resched_local_allow();
> > > local_irq_enable();
> > > }
> > > exit_to_user_mode();
> >
> > Yesterdays next now fails with
> >
> >
> > arch/s390/kernel/syscall.c: In function '__do_syscall':
> > arch/s390/kernel/syscall.c:165:3: error: implicit declaration of function 'sched_resched_local_allow' [-Werror=implicit-function-declaration]
> > 165 | sched_resched_local_allow();
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~
> > cc1: some warnings being treated as errors
> > make[2]: *** [scripts/Makefile.build:288: arch/s390/kernel/syscall.o] Error 1
> > make[2]: *** Waiting for unfinished jobs....
> > make[1]: *** [scripts/Makefile.build:530: arch/s390/kernel] Error 2
> > make[1]: *** Waiting for unfinished jobs....
>
> I have now removed the merge fix up for tomorrow. It seems that the
> commits that needed it have been removed :-(

Review comments mean that they need rework, apologies for the hassle!

Thanx, Paul

2021-01-26 18:28:55

by Christian Borntraeger

[permalink] [raw]
Subject: Re: [PATCH] s390: allow reschedule on syscall restart

On 21.01.21 15:39, Sven Schnelle wrote:
> Commit 845f44e8ef28 ("sched: Report local wake up on resched blind zone
> within idle loop") from next-20210121 causes a warning because s390
> doesn't call sched_resched_local_allow() when restarting a syscall.
>
> Signed-off-by: Sven Schnelle <[email protected]>
> ---
> arch/s390/kernel/syscall.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/s390/kernel/syscall.c b/arch/s390/kernel/syscall.c
> index bc8e650e377d..2b39ac40f970 100644
> --- a/arch/s390/kernel/syscall.c
> +++ b/arch/s390/kernel/syscall.c
> @@ -162,6 +162,7 @@ void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
> do_syscall(regs);
> if (!test_pt_regs_flag(regs, PIF_SYSCALL_RESTART))
> break;
> + sched_resched_local_allow();
> local_irq_enable();
> }
> exit_to_user_mode();

Yesterdays next now fails with


arch/s390/kernel/syscall.c: In function '__do_syscall':
arch/s390/kernel/syscall.c:165:3: error: implicit declaration of function 'sched_resched_local_allow' [-Werror=implicit-function-declaration]
165 | sched_resched_local_allow();
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:288: arch/s390/kernel/syscall.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.build:530: arch/s390/kernel] Error 2
make[1]: *** Waiting for unfinished jobs....