From: Andrea Righi <arighi@nvidia.com>
To: Emil Tsalapatis <emil@etsalapatis.com>
Cc: Tejun Heo <tj@kernel.org>, David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH sched_ext/for-6.19] sched_ext: Use ___v2 suffix for new kfuncs and fix scx build errors
Date: Wed, 22 Oct 2025 17:03:30 +0200 [thread overview]
Message-ID: <aPjyQsHoN62zEKOE@gpd4> (raw)
In-Reply-To: <CABFh=a4Vn+FCe9DTLt_p7RzNBSJFU-he+OhNqTK_Z3C5NbP7KA@mail.gmail.com>
On Wed, Oct 22, 2025 at 10:44:02AM -0400, Emil Tsalapatis wrote:
...
> > +/*
> > + * v6.19: Mirror the following _args structs, to prevent build errors in
> > + * kernels that don't have these structs defined yet.
> > + *
> > + * The kernel will carry these mirrored structs until v6.23 (see below).
> > + */
> > +struct scx_bpf_select_cpu_and_args {
> > + s32 prev_cpu;
> > + u64 wake_flags;
> > + u64 flags;
> > +};
> > +
> > +struct scx_bpf_dsq_insert_vtime_args {
> > + u64 dsq_id;
> > + u64 slice;
> > + u64 vtime;
> > + u64 enq_flags;
> > +};
> > +
>
> This redefinition seems to cause compilation problems when compiling
> the selftests on 6.19 w/ the patch (errors below). Turning the definitions
> into declarations gets the tests to compile.
>
> Maybe we can gate the definitions behind some ifdef? This issue aside,
> compiling the tests on a 6.17 system and running them on a 6.19 system
> still works, so everything else is in order.
>
> # cd /linux/tools/sched_ext
> # make -j9
Ah bummer, yes, we can probably put them behind an ifdef, let me do some
tests...
Thanks,
-Andrea
>
> In file included from scx_simple.bpf.c:23:
> In file included from /linux/tools/sched_ext/include/scx/common.bpf.h:765:
> /linux/tools/sched_ext/include/scx/compat.bpf.h:170:8: error: redefinition of
> 'scx_bpf_select_cpu_and_args'
> 170 | struct scx_bpf_select_cpu_and_args {
> | ^
> /linux/tools/sched_ext/build/include/vmlinux.h:83614:8: note: previous
> definition
> is here
> 83614 | struct scx_bpf_select_cpu_and_args {
> | ^
> In file included from scx_simple.bpf.c:23:
> In file included from /linux/tools/sched_ext/include/scx/common.bpf.h:765:
> /linux/tools/sched_ext/include/scx/compat.bpf.h:176:8: error: redefinition of
> 'scx_bpf_dsq_insert_vtime_args'
> 176 | struct scx_bpf_dsq_insert_vtime_args {
> | ^
> /linux/tools/sched_ext/build/include/vmlinux.h:83607:8: note: previous
> definition
> is here
> 83607 | struct scx_bpf_dsq_insert_vtime_args {
> | ^
> 2 errors generated.
> make: *** [Makefile:176:
> /linux/tools/sched_ext/build/obj/sched_ext/scx_simple.bpf.o] Error 1
> make: *** Waiting for unfinished jobs....
> In file included from scx_qmap.bpf.c:25:
> In file included from /linux/tools/sched_ext/include/scx/common.bpf.h:765:
> /linux/tools/sched_ext/include/scx/compat.bpf.h:170:8: error: redefinition of
> 'scx_bpf_select_cpu_and_args'
> 170 | struct scx_bpf_select_cpu_and_args {
> | ^
> /linux/tools/sched_ext/build/include/vmlinux.h:83614:8: note: previous
> definition
> is here
> 83614 | struct scx_bpf_select_cpu_and_args {
> | ^
> In file included from scx_qmap.bpf.c:25:
> In file included from /linux/tools/sched_ext/include/scx/common.bpf.h:765:
> /linux/tools/sched_ext/include/scx/compat.bpf.h:176:8: error: redefinition of
> 'scx_bpf_dsq_insert_vtime_args'
> 176 | struct scx_bpf_dsq_insert_vtime_args {
> | ^
> /linux/tools/sched_ext/build/include/vmlinux.h:83607:8: note: previous
> definition
> is here
> 83607 | struct scx_bpf_dsq_insert_vtime_args {
> | ^
> 2 errors generated.
> make: *** [Makefile:176:
> /linux/tools/sched_ext/build/obj/sched_ext/scx_qmap.bpf.o] Error 1
next prev parent reply other threads:[~2025-10-22 15:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 9:38 [PATCH sched_ext/for-6.19] sched_ext: Use ___v2 suffix for new kfuncs and fix scx build errors Andrea Righi
2025-10-22 14:44 ` Emil Tsalapatis
2025-10-22 15:03 ` Andrea Righi [this message]
2025-10-22 15:36 ` [PATCH v2 " Andrea Righi
2025-10-22 16:34 ` Tejun Heo
2025-10-22 19:38 ` Andrea Righi
2025-10-22 20:27 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aPjyQsHoN62zEKOE@gpd4 \
--to=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=emil@etsalapatis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
--cc=void@manifault.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.