Some system BIOS configuration may provide option to disable E-cores.
As part of this change, CPUID feature for hybrid (Leaf 7 sub leaf 0,
EDX[15] = 0) may not be set. But HWP performance limits will still be
using a scaling factor like any other hybrid enabled system.
The current check for applying scaling factor will fail when hybrid
CPUID feature is not set and the only way to make sure that scaling
should be applied by checking CPPC nominal frequency and nominal
performance.
First, or systems predating Alder Lake, the CPPC nominal frequency and
nominal performance are 0, which can be used to distinguish those
systems from hybrid systems with disabled E-cores.
Second, if the CPPC nominal frequency and nominal performance are
defined, which indicates the need to use a special scaling factor, and
the nominal performance value multiplied by 100 is not equal to the
nominal frequency one, use hybrid scaling factor.
This can be done for all HWP systems without additional CPU model check.
Signed-off-by: Srinivas Pandruvada <email address hidden>
[ rjw: Subject and changelog edits, removal of unneeded parens, comment
edits ]
Signed-off-by: Rafael J. Wysocki <email address hidden>
(cherry picked from commit 0fcfc9e51990246a9813475716746ff5eb98c6aa)
Signed-off-by: Michael Reed <email address hidden>
UBUNTU: [Packaging] annotations: various code cleanups
kconfig: Fix pylint violations
Fix the following:
R0205: Class 'Config' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
E1101: Instance of 'Config' has no '_parse' member (no-member)
W0613: Unused argument 'arch' (unused-argument)
W0613: Unused argument 'flavour' (unused-argument)
W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
R0201: Method could be a function (no-self-use)
E1101: Instance of 'Config' has no 'config' member (no-member)
W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
W0105: String statement has no effect (pointless-string-statement)
W0123: Use of eval (eval-used)
W0102: Dangerous default value [] as argument (dangerous-default-value)
R1723: Unnecessary "elif" after "break" (no-else-break)
R1705: Unnecessary "elif" after "return" (no-else-return)
R1704: Redefining argument with the local name 'arch' (redefined-argument-from-local)
Since 0b63accf87225b5eb7e52814c374cf02d733d4bb, the test includes a
verification of time passage that is unstable as it is prone to
different results based on the system load.
Other investigations led to disabling this test in various other
places/projects. For example, Linaro also disabled it[1].
We have chosen to keep this test but to force its result unconditionally
successful as opposed to reverting the aforementioned commit because:
1. it keeps running the test with results and data that we can use in
the future for any "smarter" way to deal with it - eg. statistical
approach
2. it minimizes the maintenance burden of this patch kept in our kernel
trees
It is worth mentioning that upstream was contacted via the mailing list
with no feedback[2]. The request was to increase the current tolerance
set at 10%.
There are some issues with the bpf/nat6to4.c building.
1. It use TEST_CUSTOM_PROGS, which will add the nat6to4.o to
kselftest-list file and run by common run_tests.
2. When building the test via `make -C tools/testing/selftests/
TARGETS="net"`, the nat6to4.o will be build in selftests/net/bpf/
folder. But in test udpgro_frglist.sh it refers to ../bpf/nat6to4.o.
The correct path should be ./bpf/nat6to4.o.
3. If building the test via `make -C tools/testing/selftests/ TARGETS="net"
install`. The nat6to4.o will be installed to kselftest_install/net/
folder. Then the udpgro_frglist.sh should refer to ./nat6to4.o.
To fix the confusing test path, let's just move the nat6to4.c to net folder
and build it as TEST_GEN_FILES.
Fixes: edae34a3ed92 ("selftests net: add UDP GRO fraglist + bpf self-tests")
Tested-by: Björn Töpel <email address hidden>
Signed-off-by: Hangbin Liu <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Paolo Abeni <email address hidden>
(backported from 3c107f36db061603bee7564fbd6388b1f1879fd3 net-next)
[agherzan: This change merges the bpf Makefile into the main net
Makefile where more tests were added in the meanwhile. The backport
consisted only in matching the current state of these tests in the
TEST_GEN_FILES and OUTPUT sections.]
Signed-off-by: Andrei Gherzan <email address hidden>
Signed-off-by: Andrea Righi <email address hidden>
cd2be84...
by
=?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <email address hidden>
selftests: net: Fix O=dir builds
The BPF Makefile in net/bpf did incorrect path substitution for O=dir
builds, e.g.
make O=/tmp/kselftest headers
make O=/tmp/kselftest -C tools/testing/selftests
would fail in selftest builds [1] net/ with
clang-16: error: no such file or directory: 'kselftest/net/bpf/nat6to4.c'
clang-16: error: no input files
Add a pattern prerequisite and an order-only-prerequisite (for
creating the directory), to resolve the issue.
[1] https://<email address hidden>/
Reported-by: kernel test robot <email address hidden>
Fixes: 837a3d66d698 ("selftests: net: Add cross-compilation support for BPF programs")
Signed-off-by: Björn Töpel <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry-picked from 17961a37ce4077ae43128ba5ce0b1dfd8f02fdb9)
Signed-off-by: Andrei Gherzan <email address hidden>
Signed-off-by: Andrea Righi <email address hidden>
b9ceb18...
by
=?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <email address hidden>
selftests: net: Add cross-compilation support for BPF programs
The selftests/net does not have proper cross-compilation support, and
does not properly state libbpf as a dependency. Mimic/copy the BPF
build from selftests/bpf, which has the nice side-effect that libbpf
is built as well.
Signed-off-by: Björn Töpel <email address hidden>
Reviewed-by: Anders Roxell <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Paolo Abeni <email address hidden>
(cherry-picked from 837a3d66d698516ad2330e122eba9752ec3a48ed)
Signed-off-by: Andrei Gherzan <email address hidden>
Signed-off-by: Andrea Righi <email address hidden>
This mainline bpf selftest (nat6to4) requires additional package
dependencies not satisfied by the Ubuntu kernel Build-depends and
unsatisfiable when cross compilers are installed. Disable it to allow
the rest of selftests/ to build.
Signed-off-by: Kamal Mostafa <email address hidden>
[changed Config -> SAUCE in the subject]
Signed-off-by: Andrea Righi <email address hidden>
UBUNTU: [Packaging] annotations: Check validity of FLAVOUR_DEP
FLAVOUR_DEP is used to map flavors from the main annotations file to
flavors from includes. Currently, there is no check that any of the
listed flavors exists or is valid so the resulting behavior is
(probably) undefined/unexpected. Add a sanity check to verify the
FLAVOUR_DEP flavors.
UBUNTU: [Packaging] annotations: Write out annotations with notes first
When writing the annotations file, separate them into two groups: With
and without a note. Write the group with notes first and separate the
other group with a visual marker.
The idea is that all configs that are set/modified manually should have
an annotation note and putting them at the top of the annotations file
should make it easier to figure out what the config of this kernel is
about.