Commit graph

7336 commits

Author SHA1 Message Date
f37c1e4577 Revert "smp: Use migrate disable/enable in smp_call_function_single_async()"
This reverts commit b6764b2064.
2024-12-18 00:32:11 +01:00
613c9dd5f1 Revert "rcu: Make the grace period workers unbound again"
This reverts commit 27bb889ce3.
2024-12-18 00:32:04 +01:00
07889cad44 Revert "blkdev: set max nr_requests to 64"
This reverts commit 6112d0b006.
2024-12-18 00:31:57 +01:00
ea96a0db96 Revert "sysctl: promote several nodes out of CONFIG_SCHED_DEBUG"
This reverts commit 26944181d5.
2024-12-18 00:17:01 +01:00
e1b24976b4 Revert "mfc: Reduce QoS boosting from Samsung hacks"
This reverts commit 9ba60fb174.
2024-12-17 23:31:44 +01:00
cac147d1b1 Revert "PM / freezer: Reduce freeze timeout to 1 second for Android"
This reverts commit a163b49c80.
2024-12-17 23:31:21 +01:00
dcc7a0ac59 Revert "mm: vmstat: use power efficient workingqueues"
This reverts commit 48ff313424.
2024-12-17 23:31:00 +01:00
0cb16ca2c7 Revert "configs: drop KZEROD"
This reverts commit cb9bb6b647.
2024-12-17 23:30:37 +01:00
08513bfea7 defconfig: a53x_defconfig: Set FRAME_WARN to 0 2024-12-17 23:22:38 +01:00
Ksawlii
87f89d5a22 drivers: media,net,staging: Make temp_buffer unused 2024-12-17 23:12:17 +01:00
Ksawlii
326c808f5c Revert "configs: kill SCHEDSTATS and SCHED_DEBUG"
This reverts commit a0e697bdf0.
2024-12-17 22:26:44 +01:00
ed56d57a18 drivers: media,net,staging: Nuke ld.lld warnings 2024-12-17 22:23:59 +01:00
8530406bc1 drivers: exynos: camera: is-vender.c: Specify enum camera2_sensor_hdr_mode 2024-12-17 22:01:43 +01:00
48e91d7106 drivers: sm5714_typec.c: Specify enum typec_port_type 2024-12-17 21:57:37 +01:00
7fc0858b6e drivers: sec_input: stm_cmd.c: Expand snprintf sizes 2024-12-17 21:43:20 +01:00
825fa0d2ea Revert "sched/fair: apply init protection"
This reverts commit 1811b5b3e5.
2024-12-17 21:14:50 +01:00
2023e9d3a9 kernel: core.c: Forgot to remove HEAD 2024-12-17 21:11:04 +01:00
15afa770f5 Revert "fs,kernel,mm: tune to Ktweak balance"
This reverts commit 50e7a3b302.
2024-12-17 20:58:55 +01:00
635001307c Revert "kernel_build: Modify KCFLAGS"
This reverts commit 0a82d8c18f.
2024-12-17 20:44:21 +01:00
0a82d8c18f kernel_build: Modify KCFLAGS 2024-12-17 20:43:21 +01:00
62d7b53266 Revert "Makefile: Modify KCFLAGS for less warnings"
This reverts commit b50e74dc28.
2024-12-17 20:41:54 +01:00
b50e74dc28 Makefile: Modify KCFLAGS for less warnings 2024-12-17 20:40:27 +01:00
Jaewon Kim
0adf530671 FROMLIST: memblock: handle overlapped reserved memory region
It is not common, but defining an overlapped region is possible.
Actually memblock_add_range allows to overlap with existing ones.

The memsize currently does not handle this overlapped case. But this
patch tries to handle one overlapped case.

Here's the case.

There is an unknown memsize region, which means the region was removed
and not passed at bootloader stage. And there is a reserved memory
region defined in device tree which is overlapped with the unknown
region.

We expect that information in device tree make the unknown region clear.
This patch handle the overlapped region with following conditions.

1) The already existing overlapped region should be unknown and no-map.
2) The newly added region should have a name, and its region should be
same with or part of the existing one.

Here is an example.

Before this patch, memsize shows both overlapped region.

0x0ea000000-0x0ed900000 0x03900000 (   58368 KB ) nomap unusable overlapped
0x0ea000000-0x0f1400000 0x07400000 (  118784 KB ) nomap unusable unknown

After this patch, the overlapped region is named.

0x0ea000000-0x0ed900000 0x03900000 (   58368 KB ) nomap unusable overlapped
0x0e9b00000-0x0ea000000 0x00500000 (    5120 KB ) nomap unusable unknown

Bug: 340432773
Signed-off-by: Jaewon Kim <jaewon31.kim@samsung.com>
Link: https://lore.kernel.org/linux-mm/20240521023957.2587005-4-jaewon31.kim@samsung.com/
Change-Id: I7091eedcebd1f2f771124c157e5e00600b9a36fd
2024-12-17 20:36:47 +01:00
Nahuel Gómez
b8c6547f74 configs: disable some unnecessary DSS stuff
We can't disable the whole driver because it handles last_kmsg.

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 20:36:22 +01:00
Nahuel Gómez
cb9bb6b647 configs: drop KZEROD
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 20:35:27 +01:00
Nahuel Gómez
9632f64cde ARM64: dts/s5e8825: drop more reserved memory
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 20:35:06 +01:00
Nahuel Gómez
171825cf94 ARM64: dts/s5e8825: disable more unused stuff
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 20:32:57 +01:00
Nahuel Gómez
554d5fd356 ARM64: dts: s5e8825: disable some debug stuff
These are disabled in the kernel already, so it's pointless to have them here.

This time we keep dss on, because otherwise last_kmsg stops working.

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 20:32:54 +01:00
Danny Lin
39410cb2f3 mm: Add likelihood labels to quiet_vmstat conditions
These labels are based on observations from a running system as well as
from inspecting the code:

!delayed_work_pending:
  true  = 3509732
  false = 7495535

!need_update:
  true  = 6656251
  false = 840000

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Samuel Pascua <pascua.samuel.14@gmail.com>
2024-12-17 20:32:50 +01:00
freak07
48ff313424 mm: vmstat: use power efficient workingqueues
(cherry picked from commit 52e60a930f0480f2082bc65836c7edb4861de7aa)
(cherry picked from commit bb05861a4f3bb99b76e7e43ba17f3659fcb12443)
(cherry picked from commit d92be4aa5222a52104bed81fe60c5c10a091b4c1)
Signed-off-by: Samuel Pascua <sgpascua@ngcp.ph>
Signed-off-by: Samuel Pascua <pascua.samuel.14@gmail.com>
2024-12-17 20:32:46 +01:00
yehonatan2020
50f2fde1f2 mfc: Import IS_UHD_RES definition 2024-12-17 20:32:27 +01:00
Tyler Nijmeh
e983caf81d sched: core: Minimize number of tasks to load balance
We don't want sched_nr_migrate to be too high, as that would impact
real-time latencies as the load balancing process for SCHED_OTHER
disallows IRQ interrupts.

Instead of making this a constant value, let's use an amount that
relates to the CPU performance of a device.

Consider that a device with a very weak 4 core processor needs to load
balance 32 tasks from the most busy-but-idle CPU. That balancing would
take significantly longer than a device with 8 cores.

On the contrary view, that same 8 core device balancing 32 tasks would
have no issues with SCHED_OTHER performance, however, real-time tasks
would suffer more jitter than is necessary.

Let's only balance as many tasks as there are CPUs in a device for
optimal SCHED_OTHER performance and SCHED_FIFO / SCHED_RR latency.
2024-12-17 20:32:22 +01:00
Sultan Alsawaf
a163b49c80 PM / freezer: Reduce freeze timeout to 1 second for Android
Freezing processes on Android usually takes less than 100 ms, and if it
takes longer than that to the point where the 20 second freeze timeout is
reached, it's because the remaining processes to be frozen are deadlocked
waiting for something from a process which is already frozen. There's no
point in burning power trying to freeze for that long, so reduce the freeze
timeout to a very generous 1 second for Android and don't let anything mess
with it.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Panchajanya1999 <kernel@panchajanya.dev>
(cherry picked from commit 72fc44bd8bcfb6d1cbaafb2053173cd985d81d0c)
(cherry picked from commit 7097f6cabd228cf426da77ee71088e56beba3cd0)
(cherry picked from commit 4f1c2d26818d846c0aea6713652e2a0eaa6a23c4)
(cherry picked from commit d416b35f8187c0605ac8816e4d771288514876f1)
2024-12-17 20:32:18 +01:00
Sultan Alsawaf
3af8699aee timekeeping: Keep the tick alive when CPUs cycle out of s2idle
When some CPUs cycle out of s2idle due to non-wakeup IRQs, it's possible
for them to run while the CPU responsible for jiffies updates remains idle.
This can delay the execution of timers indefinitely until the CPU managing
the jiffies updates finally wakes up, by which point everything could be
dead if enough time passes.

Fix it by handing off timekeeping duties when the timekeeping CPU enters
s2idle and freezes its tick. When all CPUs are in s2idle, the first one to
wake up for any reason (either from a wakeup IRQ or non-wakeup IRQ) will
assume responsibility for the timekeeping tick.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Panchajanya1999 <kernel@panchajanya.dev>
(cherry picked from commit 717100653a78c63fe56b95721fffee5fad96ee91)
(cherry picked from commit 83196f829f9e2d4aef6a4d30ac449a7bfc985208)
(cherry picked from commit ab251b18b95c2fe80f457dabdf2e7132a6b0ea27)
(cherry picked from commit e58369f386e19f02bc5db1a155040e54dd201a60)
2024-12-17 20:32:12 +01:00
Sultan Alsawaf
b6764b2064 smp: Use migrate disable/enable in smp_call_function_single_async()
Asynchronous IPI users must already handle csd object lifetimes on their
own, so there's no need to prevent re-entrancy on a single CPU inside
smp_call_function_single_async(). As such, smp_call_function_single_async()
can be made more RT-friendly by just using migrate enable/disable instead
of disabling preemption, since preventing migration is all that's needed.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Panchajanya1999 <kernel@panchajanya.dev>
(cherry picked from commit 9983455a67226511e036f19f8725cd54bac10aa1)
(cherry picked from commit a792f43200afd6594a1e07b3cb11d048a9ec1218)
(cherry picked from commit f2d0b87c64e5a1e7b73430950f92d7a64d39c964)
(cherry picked from commit 0076a73f19418f3f7867b6ce2fa93f46105458c5)
2024-12-17 20:32:08 +01:00
Sultan Alsawaf
27bb889ce3 rcu: Make the grace period workers unbound again
After a dedicated grace-period workqueue was added to RCU in order to
benefit from rescuer threads, the relevant workers were moved to the new
workqueue away from system_power_efficient_wq. The old workqueue was
unbound, which is desirable for performance reasons. Making the workers
bound measurably regressed performance, so make them unbound again.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Panchajanya1999 <kernel@panchajanya.dev>
(cherry picked from commit 139be6da6ee92c8b0aa2d19081fa230435082054)
(cherry picked from commit 3428cd70087fe5fd538d96e89f8f12266aacc2d1)
(cherry picked from commit b4e1beb3e73ccd6f341f95020becfff0b7139745)
(cherry picked from commit 428f05ee3318ed4314317bb697abec26a4bcc930)
2024-12-17 20:31:57 +01:00
Nahuel Gómez
6112d0b006 blkdev: set max nr_requests to 64
To align with Ktweak balance.

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 20:30:24 +01:00
Nathan Chancellor
f268fdb66d BACKPORT: FROMGIT: kbuild: Remove support for Clang's ThinLTO caching
There is an issue in clang's ThinLTO caching (enabled for the kernel via
'--thinlto-cache-dir') with .incbin, which the kernel occasionally uses
to include data within the kernel, such as the .config file for
/proc/config.gz. For example, when changing the .config and rebuilding
vmlinux, the copy of .config in vmlinux does not match the copy of
.config in the build folder:

  $ echo 'CONFIG_LTO_NONE=n
  CONFIG_LTO_CLANG_THIN=y
  CONFIG_IKCONFIG=y
  CONFIG_HEADERS_INSTALL=y' >kernel/configs/repro.config

  $ make -skj"$(nproc)" ARCH=x86_64 LLVM=1 clean defconfig repro.config vmlinux
  ...

  $ grep CONFIG_HEADERS_INSTALL .config
  CONFIG_HEADERS_INSTALL=y

  $ scripts/extract-ikconfig vmlinux | grep CONFIG_HEADERS_INSTALL
  CONFIG_HEADERS_INSTALL=y

  $ scripts/config -d HEADERS_INSTALL

  $ make -kj"$(nproc)" ARCH=x86_64 LLVM=1 vmlinux
  ...
    UPD     kernel/config_data
    GZIP    kernel/config_data.gz
    CC      kernel/configs.o
  ...
    LD      vmlinux
  ...

  $ grep CONFIG_HEADERS_INSTALL .config
  # CONFIG_HEADERS_INSTALL is not set

  $ scripts/extract-ikconfig vmlinux | grep CONFIG_HEADERS_INSTALL
  CONFIG_HEADERS_INSTALL=y

Without '--thinlto-cache-dir' or when using full LTO, this issue does
not occur.

Benchmarking incremental builds on a few different machines with and
without the cache shows a 20% increase in incremental build time without
the cache when measured by touching init/main.c and running 'make all'.

ARCH=arm64 defconfig + CONFIG_LTO_CLANG_THIN=y on an arm64 host:

  Benchmark 1: With ThinLTO cache
    Time (mean ± σ):     56.347 s ±  0.163 s    [User: 83.768 s, System: 24.661 s]
    Range (min … max):   56.109 s … 56.594 s    10 runs

  Benchmark 2: Without ThinLTO cache
    Time (mean ± σ):     67.740 s ±  0.479 s    [User: 718.458 s, System: 31.797 s]
    Range (min … max):   67.059 s … 68.556 s    10 runs

  Summary
    With ThinLTO cache ran
      1.20 ± 0.01 times faster than Without ThinLTO cache

ARCH=x86_64 defconfig + CONFIG_LTO_CLANG_THIN=y on an x86_64 host:

  Benchmark 1: With ThinLTO cache
    Time (mean ± σ):     85.772 s ±  0.252 s    [User: 91.505 s, System: 8.408 s]
    Range (min … max):   85.447 s … 86.244 s    10 runs

  Benchmark 2: Without ThinLTO cache
    Time (mean ± σ):     103.833 s ±  0.288 s    [User: 232.058 s, System: 8.569 s]
    Range (min … max):   103.286 s … 104.124 s    10 runs

  Summary
    With ThinLTO cache ran
      1.21 ± 0.00 times faster than Without ThinLTO cache

While it is unfortunate to take this performance improvement off the
table, correctness is more important. If/when this is fixed in LLVM, it
can potentially be brought back in a conditional manner. Alternatively,
a developer can just disable LTO if doing incremental compiles quickly
is important, as a full compile cycle can still take over a minute even
with the cache and it is unlikely that LTO will result in functional
differences for a kernel change.

Cc: stable@vger.kernel.org
Fixes: dc5723b02e52 ("kbuild: add support for Clang LTO")
Reported-by: Yifan Hong <elsk@google.com>
Closes: https://github.com/ClangBuiltLinux/linux/issues/2021
Reported-by: Masami Hiramatsu <mhiramat@kernel.org>
Closes: https://lore.kernel.org/r/20220327115526.cc4b0ff55fc53c97683c3e4d@kernel.org/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Bug: 312268956
Bug: 335301039
Change-Id: Iace492db67f28e172427669b1b7eb6a8c44dd3aa
(cherry picked from commit aba091547ef6159d52471f42a3ef531b7b660ed8
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
[elsk: Resolved minor conflict in Makefile]
Signed-off-by: Yifan Hong <elsk@google.com>
Signed-off-by: mrsrimar22 <mrsrimar22@gmail.com>
2024-12-17 20:30:18 +01:00
Nahuel Gómez
50e7a3b302 fs,kernel,mm: tune to Ktweak balance
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 20:30:06 +01:00
Nahuel Gómez
1811b5b3e5 sched/fair: apply init protection
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 20:28:06 +01:00
Park Ju Hyung
26944181d5 sysctl: promote several nodes out of CONFIG_SCHED_DEBUG
These are used in Android.
Promote these to disable CONFIG_SCHED_DEBUG.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
[0ctobot: Adapted for 4.19]
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Change-Id: I8053176882e155926769939de15da375e7d548a0
2024-12-17 20:27:04 +01:00
Nahuel Gómez
a0e697bdf0 configs: kill SCHEDSTATS and SCHED_DEBUG
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 20:24:33 +01:00
celtare21
bb13d89a87 lib/Kconfig.debug: Remove DEBUG_KERNEL depend on DEBUG_KMEMLEAK|SCHED_DEBUG|SCHEDSTATS
* Don't make DEBUG_KMEMLEAK depend on DEBUG_KERNEL
* Remove DEBUG_KERNEL dependency from SCHED_DEBUG and SCHEDSTATS

Signed-off-by: celtare21 <celtare21@gmail.com>
2024-12-17 20:24:26 +01:00
ThunderStorms21th
4c1b6e4beb media: v4l: Use interruptible waits
Allow these tasks to be preempted in order to reduce latency.

Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: John Vincent <git@tensevntysevn.cf>

Signed-off-by: ThunderStorms21th <pinakastorm@gmail.com>
2024-12-17 20:24:21 +01:00
ThunderStorms21th
9ba60fb174 mfc: Reduce QoS boosting from Samsung hacks
By default, everything is set to 240fps for optimal playback performance However, the situation is not always true, as it applies to cases when the video bitrate isn't necessarily high, causing high power consumption

Reduce and limit the boosting needed. For decoder, only apply for UHD
video resolution

Signed-off-by: Diep Quynh <remilia.1505@gmail.com>
[TenSeventy7: Negative unsigned integer fixes already present on 9610]
Signed-off-by: John Vincent <git@tensevntysevn.cf>

Signed-off-by: ThunderStorms21th <pinakastorm@gmail.com>
2024-12-17 20:24:17 +01:00
84fc4d7016 kernel_build: Update to clang-r536225 (19) 2024-12-17 20:23:47 +01:00
Nahuel Gómez
e52d6db0bf fvmap: set undervolt to -4%
This should be more stable for all users.

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 19:42:15 +01:00
Nahuel Gómez
830af8dcf9 configs: limit NR_CPUS to 8
We know this kernel won't run on a device with more than 8 CPUs.

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 19:39:07 +01:00
b0a36062ba Revert "ALSA: usb-audio: Fix Yamaha P-125 Quirk Entry"
This reverts commit 028781a0af.
2024-12-17 14:46:18 +01:00
5b3574ef41 kernel_build: Change to -Testing231 2024-12-17 13:48:25 +01:00