Skip to content

Commit

Permalink
Merge pull request torvalds#64 from sched-ext/README
Browse files Browse the repository at this point in the history
Update README, and improve build usability
  • Loading branch information
htejun authored Oct 30, 2023
2 parents 52911e1 + 3f4b885 commit 9b7423e
Show file tree
Hide file tree
Showing 6 changed files with 254 additions and 83 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1341,6 +1341,12 @@ ifneq ($(wildcard $(resolve_btfids_O)),)
$(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean
endif

tools-clean-targets := sched_ext
PHONY += $(tools-clean-targets)
$(tools-clean-targets):
$(Q)$(MAKE) -sC tools $@_clean
tools_clean: $(tools-clean-targets)

# Clear a bunch of variables before executing the submake
ifeq ($(quiet),silent_)
tools_silent=s
Expand Down Expand Up @@ -1510,7 +1516,7 @@ PHONY += $(mrproper-dirs) mrproper
$(mrproper-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)

mrproper: clean $(mrproper-dirs)
mrproper: clean $(mrproper-dirs) tools_clean
$(call cmd,rmfiles)
@find . $(RCS_FIND_IGNORE) \
\( -name '*.rmeta' \) \
Expand Down
10 changes: 9 additions & 1 deletion tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ help:
@echo ' pci - PCI tools'
@echo ' perf - Linux performance measurement and analysis tool'
@echo ' selftests - various kernel selftests'
@echo ' sched_ext - sched_ext example schedulers'
@echo ' bootconfig - boot config tool'
@echo ' spi - spi tools'
@echo ' tmon - thermal monitoring and tuning tool'
Expand Down Expand Up @@ -92,6 +93,9 @@ perf: FORCE
$(Q)mkdir -p $(PERF_O) .
$(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=

sched_ext: FORCE
$(call descend,sched_ext)

selftests: FORCE
$(call descend,testing/$@)

Expand Down Expand Up @@ -185,6 +189,9 @@ perf_clean:
$(Q)mkdir -p $(PERF_O) .
$(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= clean

sched_ext_clean:
$(call descend,sched_ext,clean)

selftests_clean:
$(call descend,testing/$(@:_clean=),clean)

Expand Down Expand Up @@ -214,6 +221,7 @@ clean: acpi_clean cgroup_clean counter_clean cpupower_clean hv_clean firewire_cl
mm_clean bpf_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
freefall_clean build_clean libbpf_clean libsubcmd_clean \
gpio_clean objtool_clean leds_clean wmi_clean pci_clean firmware_clean debugging_clean \
intel-speed-select_clean tracing_clean thermal_clean thermometer_clean thermal-engine_clean
intel-speed-select_clean tracing_clean thermal_clean thermometer_clean thermal-engine_clean \
sched_ext_clean

.PHONY: FORCE
1 change: 1 addition & 0 deletions tools/sched_ext/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ scx_userland
*.skel.h
*.subskel.h
/tools/
build/
9 changes: 9 additions & 0 deletions tools/sched_ext/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CONFIG_BPF=y
CONFIG_SCHED_CLASS_EXT=y
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT=y
CONFIG_DEBUG_INFO_BTF=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_JIT_DEFAULT_ON=y
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
CONFIG_PAHOLE_HAS_BTF_TAG=y
9 changes: 8 additions & 1 deletion tools/sched_ext/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ clean:
rm -f *.o *.bpf.o *.skel.h *.subskel.h
rm -f scx_simple scx_qmap scx_central scx_pair scx_flatcg scx_userland

fullclean: clean
$(Q)$(MAKE) -sC ../../ clean

help:
@echo 'Building targets:'
@echo ' all - Compile all schedulers'
Expand Down Expand Up @@ -282,8 +285,12 @@ help:
@echo 'Cleaning targets:'
@echo ' clean - Remove all generated files, including intermediate'
@echo ' rust files for rust schedulers.'
@echo ''
@echo ' fullclean - Remove all generated files, including intermediate'
@echo ' rust files for rust schedulers, and also trigger a'
@echo ' clean of the kernel at the root of the whole repository.'

.PHONY: all scx_rusty clean help
.PHONY: all scx_rusty clean fullclean help

# delete failed targets
.DELETE_ON_ERROR:
Expand Down
Loading

0 comments on commit 9b7423e

Please sign in to comment.