* next-20200528 - build error in kernel/rcu/refperf.c
@ 2020-05-29 4:16 Valdis Klētnieks
2020-05-29 4:48 ` Randy Dunlap
2020-05-29 13:55 ` Paul E. McKenney
0 siblings, 2 replies; 5+ messages in thread
From: Valdis Klētnieks @ 2020-05-29 4:16 UTC (permalink / raw)
To: Paul E. McKenney, Josh Triplett, Steven Rostedt; +Cc: rcu, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 810 bytes --]
commit 9088b449814f788d24f35a5840b6b2c2a23cd32a
Author: Paul E. McKenney <paulmck@kernel.org>
Date: Mon May 25 17:22:24 2020 -0700
refperf: Provide module parameter to specify number of experiments
changes this line of code (line 389)
- reader_tasks[exp].result_avg = 1000 * process_durations(exp) / ((exp + 1) * loops);
+ result_avg[exp] = 1000 * process_durations(nreaders) / (nreaders * loops);
On a 32-bit ARM make allmodconfig with gcc 8.3, this results in:
ERROR: modpost: "__aeabi_uldivmod" [kernel/rcu/refperf.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:103: __modpost] Error 1
I admit not understanding why the original line of code worked and the new one doesn't.
Maybe gcc is smarter/dumber about the ranges of 'exp' and 'nreaders' than we thought?
[-- Attachment #2: Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: next-20200528 - build error in kernel/rcu/refperf.c
2020-05-29 4:16 next-20200528 - build error in kernel/rcu/refperf.c Valdis Klētnieks
@ 2020-05-29 4:48 ` Randy Dunlap
2020-05-29 5:24 ` Valdis Klētnieks
2020-05-29 13:55 ` Paul E. McKenney
1 sibling, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2020-05-29 4:48 UTC (permalink / raw)
To: Valdis Klētnieks, Paul E. McKenney, Josh Triplett, Steven Rostedt
Cc: rcu, linux-kernel
On 5/28/20 9:16 PM, Valdis Klētnieks wrote:
> commit 9088b449814f788d24f35a5840b6b2c2a23cd32a
> Author: Paul E. McKenney <paulmck@kernel.org>
> Date: Mon May 25 17:22:24 2020 -0700
>
> refperf: Provide module parameter to specify number of experiments
>
> changes this line of code (line 389)
>
> - reader_tasks[exp].result_avg = 1000 * process_durations(exp) / ((exp + 1) * loops);
> + result_avg[exp] = 1000 * process_durations(nreaders) / (nreaders * loops);
>
> On a 32-bit ARM make allmodconfig with gcc 8.3, this results in:
>
> ERROR: modpost: "__aeabi_uldivmod" [kernel/rcu/refperf.ko] undefined!
> make[1]: *** [scripts/Makefile.modpost:103: __modpost] Error 1
>
> I admit not understanding why the original line of code worked and the new one doesn't.
> Maybe gcc is smarter/dumber about the ranges of 'exp' and 'nreaders' than we thought?
>
Paul has already responded: (unfortunately)
"So I am restricting to 64BIT for the time being. Yeah, I know, lazy of
me. ;-)"
https://lore.kernel.org/lkml/20200528180855.GP2869@paulmck-ThinkPad-P72/
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: next-20200528 - build error in kernel/rcu/refperf.c
2020-05-29 4:48 ` Randy Dunlap
@ 2020-05-29 5:24 ` Valdis Klētnieks
2020-05-29 14:02 ` Paul E. McKenney
0 siblings, 1 reply; 5+ messages in thread
From: Valdis Klētnieks @ 2020-05-29 5:24 UTC (permalink / raw)
To: Randy Dunlap
Cc: Paul E. McKenney, Josh Triplett, Steven Rostedt, rcu, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 769 bytes --]
On Thu, 28 May 2020 21:48:18 -0700, Randy Dunlap said:
> > ERROR: modpost: "__aeabi_uldivmod" [kernel/rcu/refperf.ko] undefined!
Gaah. And the reason I didn't spot Paul's post while grepping my linux-kernel
mailbox is because *that* thread had a different undefined reference:
> > > > > > m68k-linux-ld: kernel/rcu/refperf.o: in function `main_func':
> > > > > > >> refperf.c:(.text+0x762): undefined reference to `__umoddi3'
> Paul has already responded: (unfortunately)
>
> "So I am restricting to 64BIT for the time being. Yeah, I know, lazy of
> me. ;-)"
It's the sort of issue that's well into "as long as it gets mostly fixed before
it hits Linus's tree" territory. I've seen lots of far worse work-arounds in
the years since the 2.5.47 kernel. :)
[-- Attachment #2: Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: next-20200528 - build error in kernel/rcu/refperf.c
2020-05-29 4:16 next-20200528 - build error in kernel/rcu/refperf.c Valdis Klētnieks
2020-05-29 4:48 ` Randy Dunlap
@ 2020-05-29 13:55 ` Paul E. McKenney
1 sibling, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2020-05-29 13:55 UTC (permalink / raw)
To: Valdis Klētnieks; +Cc: Josh Triplett, Steven Rostedt, rcu, linux-kernel
On Fri, May 29, 2020 at 12:16:31AM -0400, Valdis Klētnieks wrote:
> commit 9088b449814f788d24f35a5840b6b2c2a23cd32a
> Author: Paul E. McKenney <paulmck@kernel.org>
> Date: Mon May 25 17:22:24 2020 -0700
>
> refperf: Provide module parameter to specify number of experiments
>
> changes this line of code (line 389)
>
> - reader_tasks[exp].result_avg = 1000 * process_durations(exp) / ((exp + 1) * loops);
> + result_avg[exp] = 1000 * process_durations(nreaders) / (nreaders * loops);
>
> On a 32-bit ARM make allmodconfig with gcc 8.3, this results in:
>
> ERROR: modpost: "__aeabi_uldivmod" [kernel/rcu/refperf.ko] undefined!
> make[1]: *** [scripts/Makefile.modpost:103: __modpost] Error 1
>
> I admit not understanding why the original line of code worked and the new one doesn't.
> Maybe gcc is smarter/dumber about the ranges of 'exp' and 'nreaders' than we thought?
I was surprised by that as well, but yesterday I took the lazy way out
by making this module depend on 64BIT. (0day reported a similar issue
on m68k.) So this issue should no longer show up. ;-)
Thanx, Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: next-20200528 - build error in kernel/rcu/refperf.c
2020-05-29 5:24 ` Valdis Klētnieks
@ 2020-05-29 14:02 ` Paul E. McKenney
0 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2020-05-29 14:02 UTC (permalink / raw)
To: Valdis Klētnieks
Cc: Randy Dunlap, Josh Triplett, Steven Rostedt, rcu, linux-kernel
On Fri, May 29, 2020 at 01:24:39AM -0400, Valdis Klētnieks wrote:
> On Thu, 28 May 2020 21:48:18 -0700, Randy Dunlap said:
>
> > > ERROR: modpost: "__aeabi_uldivmod" [kernel/rcu/refperf.ko] undefined!
>
> Gaah. And the reason I didn't spot Paul's post while grepping my linux-kernel
> mailbox is because *that* thread had a different undefined reference:
>
> > > > > > > m68k-linux-ld: kernel/rcu/refperf.o: in function `main_func':
> > > > > > > >> refperf.c:(.text+0x762): undefined reference to `__umoddi3'
>
> > Paul has already responded: (unfortunately)
> >
> > "So I am restricting to 64BIT for the time being. Yeah, I know, lazy of
> > me. ;-)"
>
> It's the sort of issue that's well into "as long as it gets mostly fixed before
> it hits Linus's tree" territory. I've seen lots of far worse work-arounds in
> the years since the 2.5.47 kernel. :)
Fair enough!
Also as noted on the other thread, in this case, doing this 64-bit
division the hard way shouldn't be a problem: The performance test is
finished and nothing else is happening. So I have to wonder whether it
would be possible to detect this based on some sort of link-time checking,
presumably in conjunction with -O0 to avoid confusing the whitelist with
compiler optimizations.
That would allow use of C-language "/" and "%" while still allowing
gratuitous uses to be questioned.
Hey, I can dream, can't I? ;-)
Thanx, Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-29 14:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 4:16 next-20200528 - build error in kernel/rcu/refperf.c Valdis Klētnieks
2020-05-29 4:48 ` Randy Dunlap
2020-05-29 5:24 ` Valdis Klētnieks
2020-05-29 14:02 ` Paul E. McKenney
2020-05-29 13:55 ` Paul E. McKenney
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.