linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: rafael@kernel.org, viresh.kumar@linaro.org,
	linux-pm@vger.kernel.org, void@manifault.com,
	linux-kernel@vger.kernel.org, kernel-team@meta.com,
	mingo@redhat.com, peterz@infradead.org,
	David Vernet <dvernet@meta.com>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH v2 2/2] sched_ext: Add cpuperf support
Date: Fri, 12 Jul 2024 07:10:55 -1000	[thread overview]
Message-ID: <ZpFjn4GXNXvSnWnK@slm.duckdns.org> (raw)
In-Reply-To: <CAKfTPtDdG+fhZjG0JEtXm+rq3w_v3iSrYxDLe0XXurOLEcOuNw@mail.gmail.com>

Hello,

On Fri, Jul 12, 2024 at 12:12:32PM +0200, Vincent Guittot wrote:
...
> II failed to setup my dev system for reproducing your use case in time
> and I'm going to be away for the coming weeks so I suppose that you
> should move forward and I will look at that when back to my dev system

Thankfully, this should be pretty easy to fix up however we want afterwards.

> It seems that "make -C tools/sched_ext ARCH=arm64 LLVM=-16" doesn't
> use clang-16 everywhere like the rest of the kernel which triggers
> error on my system:

Hmm... there is llvm prefix/suffix handling in the Makefile. I wonder what's
broken.

> make -C <path-to-linux>/linux/tools/sched_ext ARCH=arm64
> LOCALVERSION=+ LLVM=-16
> O=<path-to-linux>/out/kernel/arm64-llvm/tools/sched_ext
> ...
> clang-16 -g -O0 -fPIC -std=gnu89 -Wbad-function-cast
> -Wdeclaration-after-statement -Wformat-security -Wformat-y2k
> -Winit-self -Wmissing-declarations -Wmissing-prototypes
> -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked
> -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum
> -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wshadow
> -Wno-switch-enum -Werror -Wall
> -I<path-to-linux>/out/kernel/arm64-llvm/tools/sched_ext/build/obj/libbpf/
> -I<path-to-linux>/linux/tools/include
> -I<path-to-linux>/linux/tools/include/uapi -fvisibility=hidden
> -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  \
> --shared -Wl,-soname,libbpf.so.1 \
> -Wl,--version-script=libbpf.map
> <path-to-linux>/out/kernel/arm64-llvm/tools/sched_ext/build/obj/libbpf/sharedobjs/libbpf-in.o
> -lelf -lz -o <path-to-linux>/out/kernel/arm64-llvm/tools/sched_ext/build/obj/libbpf/libbpf.so.1.5.0

So, thi sis regular arm target buliding.

> clang -g -D__TARGET_ARCH_arm64 -mlittle-endian
> -I<path-to-linux>/linux/tools/sched_ext/include
> -I<path-to-linux>/linux/tools/sched_ext/include/bpf-compat
> -I<path-to-linux>/out/kernel/arm64-llvm/tools/sched_ext/build/include
> -I<path-to-linux>/linux/tools/include/uapi -I../../include -idirafter
> /usr/lib/llvm-14/lib/clang/14.0.0/include -idirafter
> /usr/local/include -idirafter /usr/include/x86_64-linux-gnu -idirafter
> /usr/include  -Wall -Wno-compare-distinct-pointer-types -O2 -mcpu=v3
> -target bpf -c scx_simple.bpf.c -o
> <path-to-linux>/out/kernel/arm64-llvm/tools/sched_ext/build/obj/sched_ext/scx_simple.bpf.o
> In file included from scx_simple.bpf.c:23:
> <path-to-linux>/linux/tools/sched_ext/include/scx/common.bpf.h:27:17:
> error: use of undeclared identifier 'SCX_DSQ_FLAG_BUILTIN'
>         _Static_assert(SCX_DSQ_FLAG_BUILTIN,
>                        ^
> fatal error: too many errors emitted, stopping now [-ferror-limit=]
> 5 warnings and 20 errors generated.

This is BPF.

The Makefile is mostly copied from other existing BPF Makefiles under tools,
so I don't quite understand why things are set up this way but

  CC := $(LLVM_PREFIX)clang$(LLVM_SUFFIX) $(CLANG_FLAGS) -fintegrated-as

is what's used to build regular targets, while

  $(CLANG) $(BPF_CFLAGS) -target bpf -c $< -o $@

is what's used to build BPF targets. It's not too out there to use a
different compiler for BPF targtes, so maybe that's why? I'll ask BPF folks.

Thanks.

-- 
tejun

  reply	other threads:[~2024-07-12 17:10 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19  3:12 [PATCHSET sched_ext/for-6.11] sched_ext: Integrate with schedutil Tejun Heo
2024-06-19  3:12 ` [PATCH 1/2] cpufreq_schedutil: Refactor sugov_cpu_is_busy() Tejun Heo
2024-06-19 14:07   ` Christian Loehle
2024-06-19 18:57     ` Tejun Heo
2024-06-19 19:07       ` Tejun Heo
2024-06-20  9:40         ` Christian Loehle
2024-06-19 18:45   ` Rafael J. Wysocki
2024-06-19 19:53     ` Tejun Heo
2024-06-20 17:57       ` Rafael J. Wysocki
2024-06-20 18:08         ` Tejun Heo
2024-06-21 22:38   ` Tejun Heo
2024-06-19  3:12 ` [PATCH 2/2] sched_ext: Add cpuperf support Tejun Heo
2024-06-19 14:07   ` Christian Loehle
2024-06-19 19:19     ` Tejun Heo
2024-06-19 19:51   ` [PATCH v2 " Tejun Heo
2024-06-21 22:39     ` Tejun Heo
2024-07-05 12:41     ` Vincent Guittot
2024-07-05 18:22       ` Tejun Heo
2024-07-06  9:01         ` Vincent Guittot
2024-07-07  1:44           ` Tejun Heo
2024-07-08  6:37             ` Vincent Guittot
2024-07-08 18:20               ` Tejun Heo
2024-07-08 19:51                 ` Vincent Guittot
2024-07-08 21:08                   ` Tejun Heo
2024-07-09 13:36                     ` Vincent Guittot
2024-07-09 16:43                       ` Tejun Heo
2024-07-12 10:12                         ` Vincent Guittot
2024-07-12 17:10                           ` Tejun Heo [this message]
2024-07-02 10:23   ` [PATCH " Hongyan Xia
2024-07-02 16:37     ` Tejun Heo
2024-07-02 17:12       ` Hongyan Xia
2024-07-02 17:56         ` Tejun Heo
2024-07-02 20:41           ` Hongyan Xia
2024-07-02 21:12             ` Tejun Heo
2024-07-24 23:45   ` Qais Yousef
2024-07-31  1:05     ` 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=ZpFjn4GXNXvSnWnK@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=dvernet@meta.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).