Commit Graph

1189 Commits

Author SHA1 Message Date
xieliujie
4f0fccc35a ANDROID: vendor_hook: Add hooks to support reader optimistic spin in rwsem
Since upstream commit 617f3ef951 ("locking/rwsem: Remove
reader optimistic spinning"), vendors have seen increased
contention and blocking on rwsems.

There are attempts to actively fix this upstream:
  https://lore.kernel.org/lkml/20240406081126.8030-1-bongkyu7.kim@samsung.com/

But in the meantime, provide vendorhooks so that vendors can
implement their own optimistic spin routine. In doing so,
vendors see improvements in cold launch times on important apps.

Bug: 433638448
Bug: 331742151

Change-Id: I7466413de9ee1293e86f73880931235d7a9142ac
Signed-off-by: xieliujie <xieliujie@oppo.com>
[jstultz: Rewrote commit message]
Signed-off-by: John Stultz <jstultz@google.com>
(cherry picked from commit abe0af2abe51fae4fb072c8d7124aaa37f1da574)
2025-07-24 07:55:23 -07:00
zhujingpeng
2199f5c4b5 ANDROID: GKI: Add initialization for rwsem's oem_data and vendor_data.
Add initialization for rwsem's oem_data and vendor_data.
The __init_rwsem() already contains a hook, but this function
may be called before the rwsem_init hook is registered,
causing some rwsem's oem_data to be uninitialized and
causing unpredictable errors

Bug: 351133539
Change-Id: I7bbb83894d200102bc7d84e91678f164529097a0
Signed-off-by: zhujingpeng <zhujingpeng@vivo.com>
2025-07-21 14:16:19 -07:00
John Stultz
e740e8d9ea ANDROID: Sync proxy-exec logic to v19 (from v18)
Just aligning android16-6.12 tree to the changes
made in proxy-exec v19.

v18 series:
https://github.com/johnstultz-work/linux-dev/commits/proxy-exec-v18-6.12

v19 series:
https://github.com/johnstultz-work/linux-dev/commits/proxy-exec-v19-6.12

Changes since v18:
* Build fixup for PREEMPT_RT suggested by K Prateek Nayak
* Slight re-arrangement of functions to clean up later patches
* Slight tweak further simplifying update_curr_common() suggested by Peter
* Rename try_to_block_task() arguments and add additional comments
  suggested by Peter
* Push proxy_resched_idle() returning rq->idle to a later patch in the
  series, as suggested by Peter.
* Build fixup for !CONFIG_SMP and CONFIG_SCHED_PROXY_EXEC
* Fixed proxy_force_return() logic for !SMP cases

Bug: 431329485
Change-Id: I3dd8ddab236f9c1b68e2495a4023f5b474265aa6
Signed-off-by: John Stultz <jstultz@google.com>
2025-07-14 15:37:38 -07:00
Masami Hiramatsu (Google)
5d3d6f75d5 BACKPORT: hung_task: show the blocker task if the task is hung on mutex
Patch series "hung_task: Dump the blocking task stacktrace", v4.

The hung_task detector is very useful for detecting the lockup.  However,
since it only dumps the blocked (uninterruptible sleep) processes, it is
not enough to identify the root cause of that lockup.

For example, if a process holds a mutex and sleep an event in
interruptible state long time, the other processes will wait on the mutex
in uninterruptible state.  In this case, the waiter processes are dumped,
but the blocker process is not shown because it is sleep in interruptible
state.

This adds a feature to dump the blocker task which holds a mutex
when detecting a hung task. e.g.

 INFO: task cat:115 blocked for more than 122 seconds.
       Not tainted 6.14.0-rc3-00003-ga8946be3de00 #156
 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
 task:cat             state:D stack:13432 pid:115   tgid:115   ppid:106    task_flags:0x400100 flags:0x00000002
 Call Trace:
  <TASK>
  __schedule+0x731/0x960
  ? schedule_preempt_disabled+0x54/0xa0
  schedule+0xb7/0x140
  ? __mutex_lock+0x51b/0xa60
  ? __mutex_lock+0x51b/0xa60
  schedule_preempt_disabled+0x54/0xa0
  __mutex_lock+0x51b/0xa60
  read_dummy+0x23/0x70
  full_proxy_read+0x6a/0xc0
  vfs_read+0xc2/0x340
  ? __pfx_direct_file_splice_eof+0x10/0x10
  ? do_sendfile+0x1bd/0x2e0
  ksys_read+0x76/0xe0
  do_syscall_64+0xe3/0x1c0
  ? exc_page_fault+0xa9/0x1d0
  entry_SYSCALL_64_after_hwframe+0x77/0x7f
 RIP: 0033:0x4840cd
 RSP: 002b:00007ffe99071828 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004840cd
 RDX: 0000000000001000 RSI: 00007ffe99071870 RDI: 0000000000000003
 RBP: 00007ffe99071870 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000001000000 R11: 0000000000000246 R12: 0000000000001000
 R13: 00000000132fd3a0 R14: 0000000000000001 R15: ffffffffffffffff
  </TASK>
 INFO: task cat:115 is blocked on a mutex likely owned by task cat:114.
 task:cat             state:S stack:13432 pid:114   tgid:114   ppid:106    task_flags:0x400100 flags:0x00000002
 Call Trace:
  <TASK>
  __schedule+0x731/0x960
  ? schedule_timeout+0xa8/0x120
  schedule+0xb7/0x140
  schedule_timeout+0xa8/0x120
  ? __pfx_process_timeout+0x10/0x10
  msleep_interruptible+0x3e/0x60
  read_dummy+0x2d/0x70
  full_proxy_read+0x6a/0xc0
  vfs_read+0xc2/0x340
  ? __pfx_direct_file_splice_eof+0x10/0x10
  ? do_sendfile+0x1bd/0x2e0
  ksys_read+0x76/0xe0
  do_syscall_64+0xe3/0x1c0
  ? exc_page_fault+0xa9/0x1d0
  entry_SYSCALL_64_after_hwframe+0x77/0x7f
 RIP: 0033:0x4840cd
 RSP: 002b:00007ffe3e0147b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004840cd
 RDX: 0000000000001000 RSI: 00007ffe3e014800 RDI: 0000000000000003
 RBP: 00007ffe3e014800 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000001000000 R11: 0000000000000246 R12: 0000000000001000
 R13: 000000001a0a93a0 R14: 0000000000000001 R15: ffffffffffffffff
  </TASK>

TBD: We can extend this feature to cover other locks like rwsem and
rt_mutex, but rwsem requires to dump all the tasks which acquire and wait
that rwsem.  We can follow the waiter link but the output will be a bit
different compared with mutex case.

This patch (of 2):

The "hung_task" shows a long-time uninterruptible slept task, but most
often, it's blocked on a mutex acquired by another task.  Without dumping
such a task, investigating the root cause of the hung task problem is very
difficult.

This introduce task_struct::blocker_mutex to point the mutex lock which
this task is waiting for.  Since the mutex has "owner" information, we can
find the owner task and dump it with hung tasks.

Note: the owner can be changed while dumping the owner task, so
this is "likely" the owner of the mutex.

With this change, the hung task shows blocker task's info like below;

 INFO: task cat:115 blocked for more than 122 seconds.
       Not tainted 6.14.0-rc3-00003-ga8946be3de00 #156
 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
 task:cat             state:D stack:13432 pid:115   tgid:115   ppid:106    task_flags:0x400100 flags:0x00000002
 Call Trace:
  <TASK>
  __schedule+0x731/0x960
  ? schedule_preempt_disabled+0x54/0xa0
  schedule+0xb7/0x140
  ? __mutex_lock+0x51b/0xa60
  ? __mutex_lock+0x51b/0xa60
  schedule_preempt_disabled+0x54/0xa0
  __mutex_lock+0x51b/0xa60
  read_dummy+0x23/0x70
  full_proxy_read+0x6a/0xc0
  vfs_read+0xc2/0x340
  ? __pfx_direct_file_splice_eof+0x10/0x10
  ? do_sendfile+0x1bd/0x2e0
  ksys_read+0x76/0xe0
  do_syscall_64+0xe3/0x1c0
  ? exc_page_fault+0xa9/0x1d0
  entry_SYSCALL_64_after_hwframe+0x77/0x7f
 RIP: 0033:0x4840cd
 RSP: 002b:00007ffe99071828 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004840cd
 RDX: 0000000000001000 RSI: 00007ffe99071870 RDI: 0000000000000003
 RBP: 00007ffe99071870 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000001000000 R11: 0000000000000246 R12: 0000000000001000
 R13: 00000000132fd3a0 R14: 0000000000000001 R15: ffffffffffffffff
  </TASK>
 INFO: task cat:115 is blocked on a mutex likely owned by task cat:114.
 task:cat             state:S stack:13432 pid:114   tgid:114   ppid:106    task_flags:0x400100 flags:0x00000002
 Call Trace:
  <TASK>
  __schedule+0x731/0x960
  ? schedule_timeout+0xa8/0x120
  schedule+0xb7/0x140
  schedule_timeout+0xa8/0x120
  ? __pfx_process_timeout+0x10/0x10
  msleep_interruptible+0x3e/0x60
  read_dummy+0x2d/0x70
  full_proxy_read+0x6a/0xc0
  vfs_read+0xc2/0x340
  ? __pfx_direct_file_splice_eof+0x10/0x10
  ? do_sendfile+0x1bd/0x2e0
  ksys_read+0x76/0xe0
  do_syscall_64+0xe3/0x1c0
  ? exc_page_fault+0xa9/0x1d0
  entry_SYSCALL_64_after_hwframe+0x77/0x7f
 RIP: 0033:0x4840cd
 RSP: 002b:00007ffe3e0147b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004840cd
 RDX: 0000000000001000 RSI: 00007ffe3e014800 RDI: 0000000000000003
 RBP: 00007ffe3e014800 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000001000000 R11: 0000000000000246 R12: 0000000000001000
 R13: 000000001a0a93a0 R14: 0000000000000001 R15: ffffffffffffffff
  </TASK>

[akpm@linux-foundation.org: implement debug_show_blocker() in C rather than in CPP]
Link: https://lkml.kernel.org/r/174046694331.2194069.15472952050240807469.stgit@mhiramat.tok.corp.google.com
Link: https://lkml.kernel.org/r/174046695384.2194069.16796289525958195643.stgit@mhiramat.tok.corp.google.com
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Waiman Long <longman@redhat.com>
Reviewed-by: Lance Yang <ioworker0@gmail.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Anna Schumaker <anna.schumaker@oracle.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Joel Granados <joel.granados@kernel.org>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tomasz Figa <tfiga@chromium.org>
Cc: Will Deacon <will@kernel.org>
Cc: Yongliang Gao <leonylgao@tencent.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Bug: 429057987

Change-Id: Ibc35e9619568a8b2ec25f2e4394e624358daffc0
[jing.xia: Switched DETECT_HUNG_TASK_BLOCKER to default to N,resolved collisions with other changes in android16-6.12 branch]
Signed-off-by: Jing Xia <jing.xia@unisoc.com>
(cherry picked from commit 3cf67d61ff98672120f6ad07528afa165df12588)
2025-07-14 11:31:12 -07:00
John Stultz
4f9e4406e4 ANDROID: Update proxy-exec logic from v14 to v18
This updates the proxy-exec logic in android16-6.12
which was added at v14, to be synced with the v18
series of the patchset.

v14 series:
https://github.com/johnstultz-work/linux-dev/commits/proxy-exec-v14-6.12

v18 series:
https://github.com/johnstultz-work/linux-dev/commits/proxy-exec-v18-6.12

Changes since v14:
* Improved naming consistency and using the guard macro where
  appropriate
* Improved comments
* Build fixes for !CONFIG_SMP
* Fixes for when sched_proxy_exec() is disabled
* Renamed update_curr_se to update_se_times, as suggested by
  Steven Rostedt.
* Use put_prev_set_next_task as suggested by K Prateek Nayak
* Try to rework find_proxy_task() locking to use guard and
  proxy_deactivate_task() in the way Peter suggested.
* Simplified changes to enqueue_task_rt to match deadline's
  logic, as pointed out by Peter
* Get rid of preserve_need_resched flag and rework per Peter's
  suggestion
* Rework find_proxy_task() to use guard to cleanup the exit
  gotos as Peter suggested.
* Reworked the forced return-migration from find_proxy_task to
  use Peter’s dequeue+wakeup approach, which helps resolve the
  cpuhotplug issues I had also seen, caused by the manual return
  migration sending tasks to offline cpus.
* A number of improvements to the commit messages and comments
  suggested by Juri Lelli and Peter Zijlstra
* Added missing logic to put_prev_task_dl as pointed out by
  K Prateek Nayak
* Add lockdep_assert_held_once and drop the READ_ONCE in
  __get_task_blocked_on(), as suggested by Juri Lelli
* Moved update_curr_task logic into update_curr_se to simplify
  things
* Renamed update_se_times to update_se, as suggested by Peter
* Reworked logic to fix an issue Peter pointed out with thread
  group accounting being done on the donor, rather than the
  running execution context.
* Fixed typos caught by Metin Kaya
* Suleiman Souhlal noticed an inefficiency in that we evaluate
  if the lock owner’s task_cpu() is the current cpu, before we
  look to see if the lock owner is on_rq at all. With v17 this
  would result in us proxy-migrating a donor to a remote cpu,
  only to then realize the task wasn’t even on the runqueue,
  and doing the sleeping owner enqueuing. Suleiman suggested
  instead that we evaluate on_rq first, so we can immediately do
  sleeping owner enqueueing. Then only if the owner is on a
  runqueue do we proxy-migrate the donor (which requires the
  more costly lock juggling). While not a huge logical change,
  it did uncover other problems, which needed to be resolved.
* One issue found was there was a race where if
  do_activate_blocked_waiter() from the sleeping owner wakeup
  was delayed and the task had already been woken up elsewhere.
  It’s possible if that task was running and called into
  schedule() to be blocked, it would be dequeued from the
  runqueue, but before we switched to the new task,
  do_activate_blocked_waiter() might try to activate it on a
  different cpu. Clearly the do_activate_blocked_waiter() needed
  to check the task on_cpu value as well.
* I found that we still can hit wakeups that end up skipping the
  BO_WAKING -> BO_RUNNALBE transition (causing find_proxy_task()
  to end up spinning waiting for that transition), so I re-added
  the logic to handle doing return migrations from
  find_proxy_task() if we hit that case.
* Hupu suggested a tweak in ttwu_runnable() to evaluate
  proxy_needs_return() slightly earlier.
* Kuyo Chang reported and isolated a fix for a problem with
  __task_is_pushable() in the !sched_proxy_exec case, which was
  folded into the “sched: Fix rt/dl load balancing via chain
  level balance” patch
* Reworked some of the logic around releasing the rq->donor
  reference on migrations, using rq->idle directly.
* Sueliman also pointed out that some added task_struct elements
  were not being initialized in the init_task code path, so that
  was good to fix.

Bug: 427820735
Change-Id: I20ce778e474124a917dbf51378dc1301535ac858
Signed-off-by: John Stultz <jstultz@google.com>
2025-07-07 12:27:42 -07:00
Greg Kroah-Hartman
fbffc72bf0 Merge fba396b799 ("sparc/mm: avoid calling arch_enter/leave_lazy_mmu() in set_ptes") into android16-6.12-lts
Steps on the way to 6.12.24

Change-Id: I10efdb86ef7942f71b14841ff3628b4eaa3ae1e9
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-09 07:26:27 +00:00
Greg Kroah-Hartman
7def78746f Merge d11d0ce887 ("e1000e: change k1 configuration on MTP and later platforms") into android16-6.12
Steps on the way to 6.12.23

Change-Id: Ife484f178669c8567e64c0b86b15957d5e8f0227
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-04-29 08:54:45 -07:00
Boqun Feng
95f0958240 locking/lockdep: Decrease nr_unused_locks if lock unused in zap_class()
commit 495f53d5cca0f939eaed9dca90b67e7e6fb0e30c upstream.

Currently, when a lock class is allocated, nr_unused_locks will be
increased by 1, until it gets used: nr_unused_locks will be decreased by
1 in mark_lock(). However, one scenario is missed: a lock class may be
zapped without even being used once. This could result into a situation
that nr_unused_locks != 0 but no unused lock class is active in the
system, and when `cat /proc/lockdep_stats`, a WARN_ON() will
be triggered in a CONFIG_DEBUG_LOCKDEP=y kernel:

  [...] DEBUG_LOCKS_WARN_ON(debug_atomic_read(nr_unused_locks) != nr_unused)
  [...] WARNING: CPU: 41 PID: 1121 at kernel/locking/lockdep_proc.c:283 lockdep_stats_show+0xba9/0xbd0

And as a result, lockdep will be disabled after this.

Therefore, nr_unused_locks needs to be accounted correctly at
zap_class() time.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Waiman Long <longman@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250326180831.510348-1-boqun.feng@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-20 10:15:45 +02:00
zhujingpeng
032603c88f ANDROID: vendor_hooks: add hooks in rwsem read trylock
When the lock is owned by readers and there is no RWSEM_FLAG_HANDOFF set,
we allow some specific new readers to acquire the lock immediately
in this hook, event if there are some writer tasks in the wait_list.
This features can optimize the priority inversion problem caused by
rwsem and improve system responsiveness and
performance.

Bug: 336506800

Change-Id: I7e8fded73579933d1f61faa9fb6e5f300ffd71bf
Signed-off-by: zhujingpeng <zhujingpeng@vivo.com>
[jstultz: rebased, resolved collision]
Signed-off-by: John Stultz <jstultz@google.com>
(cherry picked from commit ace91cdf950654038d449745d8218b2b3eb91017)
2025-04-18 12:00:06 -07:00
zhujingpeng
44079bd164 ANDROID: vendor_hooks: add hooks in rwsem
these hooks are required by the following features:
1.For rwsem readers, currently only the latest reader will be
recorded in sem->owner. We add hooks to record all readers which
have acquired the lock, once there are UX threads blocked in the
rwsem waiting list, these read_owners will be given high
priority in scheduling.
2.For rwsem writer, when a writer acquires the lock, we check
whether there are UX threads blocked in the rwsem wait list. If
so, we give this writer a high priority in scheduling so that it
can release the lock as soon as possible.

Both of these features can optimize the priority inversion
problem caused by rwsem and improve system responsiveness and
performance.

Bug: 335408185
Change-Id: I82a6fbb6acd2ce05d049e686b61e34e4d3b39a5e
Signed-off-by: zhujingpeng <zhujingpeng@vivo.com>
[jstultz: Rebased and resolved minor conflict]
Signed-off-by: John Stultz <jstultz@google.com>
(cherry picked from commit 188c41744ddcccef6daf6dcd4d6a444dabdc2f94)
2025-04-18 11:58:46 -07:00
zhujingpeng
be7f2eb0e8 ANDROID: GKI: add percpu_rwsem vendor hooks
When a writer has set sem->block and is waiting for active readers
to complete, we still allow some specific new readers to entry
the critical section, which can help prevent priority inversion
from impacting system responsiveness and performance.

Bug: 334851707

Change-Id: I9e2a7df1efb326763487423d64bcf74d8dec23f8
Signed-off-by: zhujingpeng <zhujingpeng@vivo.com>
(cherry picked from commit 458cdb59f7719f81504d392daa95a8c99c30c276)
2025-04-18 11:58:46 -07:00
zhujingpeng
7e57c2b115 ANDROID: vendor_hooks: add hook in __mutex_unlock_slowpath()
This hook is used to modify the variables in mutex oemdata when the task releases mutex lock.
This code cannot be done in existing hook trace_android_vh_mutex_unlock_slowpath(), because it is executed after wake_up_q, and there is a risk that the mutex object has been freed.

Bug: 362700382
Bug: 363173652

Change-Id: I7787c0ea51959642a010891606b2bc39fe056dd2
Signed-off-by: zhujingpeng <zhujingpeng@vivo.com>
Signed-off-by: renchenghan <renchenghan@vivo.corp-partner.google.com>
(cherry picked from commit 9f6bd03727ea509b05d49f4203d8de3585469a6c)
2025-04-17 18:49:30 -07:00
Waiman Long
ddf40162ac locking/semaphore: Use wake_q to wake up processes outside lock critical section
[ Upstream commit 85b2b9c16d053364e2004883140538e73b333cdb ]

A circular lock dependency splat has been seen involving down_trylock():

  ======================================================
  WARNING: possible circular locking dependency detected
  6.12.0-41.el10.s390x+debug
  ------------------------------------------------------
  dd/32479 is trying to acquire lock:
  0015a20accd0d4f8 ((console_sem).lock){-.-.}-{2:2}, at: down_trylock+0x26/0x90

  but task is already holding lock:
  000000017e461698 (&zone->lock){-.-.}-{2:2}, at: rmqueue_bulk+0xac/0x8f0

  the existing dependency chain (in reverse order) is:
  -> #4 (&zone->lock){-.-.}-{2:2}:
  -> #3 (hrtimer_bases.lock){-.-.}-{2:2}:
  -> #2 (&rq->__lock){-.-.}-{2:2}:
  -> #1 (&p->pi_lock){-.-.}-{2:2}:
  -> #0 ((console_sem).lock){-.-.}-{2:2}:

The console_sem -> pi_lock dependency is due to calling try_to_wake_up()
while holding the console_sem raw_spinlock. This dependency can be broken
by using wake_q to do the wakeup instead of calling try_to_wake_up()
under the console_sem lock. This will also make the semaphore's
raw_spinlock become a terminal lock without taking any further locks
underneath it.

The hrtimer_bases.lock is a raw_spinlock while zone->lock is a
spinlock. The hrtimer_bases.lock -> zone->lock dependency happens via
the debug_objects_fill_pool() helper function in the debugobjects code.

  -> #4 (&zone->lock){-.-.}-{2:2}:
         __lock_acquire+0xe86/0x1cc0
         lock_acquire.part.0+0x258/0x630
         lock_acquire+0xb8/0xe0
         _raw_spin_lock_irqsave+0xb4/0x120
         rmqueue_bulk+0xac/0x8f0
         __rmqueue_pcplist+0x580/0x830
         rmqueue_pcplist+0xfc/0x470
         rmqueue.isra.0+0xdec/0x11b0
         get_page_from_freelist+0x2ee/0xeb0
         __alloc_pages_noprof+0x2c2/0x520
         alloc_pages_mpol_noprof+0x1fc/0x4d0
         alloc_pages_noprof+0x8c/0xe0
         allocate_slab+0x320/0x460
         ___slab_alloc+0xa58/0x12b0
         __slab_alloc.isra.0+0x42/0x60
         kmem_cache_alloc_noprof+0x304/0x350
         fill_pool+0xf6/0x450
         debug_object_activate+0xfe/0x360
         enqueue_hrtimer+0x34/0x190
         __run_hrtimer+0x3c8/0x4c0
         __hrtimer_run_queues+0x1b2/0x260
         hrtimer_interrupt+0x316/0x760
         do_IRQ+0x9a/0xe0
         do_irq_async+0xf6/0x160

Normally a raw_spinlock to spinlock dependency is not legitimate
and will be warned if CONFIG_PROVE_RAW_LOCK_NESTING is enabled,
but debug_objects_fill_pool() is an exception as it explicitly
allows this dependency for non-PREEMPT_RT kernel without causing
PROVE_RAW_LOCK_NESTING lockdep splat. As a result, this dependency is
legitimate and not a bug.

Anyway, semaphore is the only locking primitive left that is still
using try_to_wake_up() to do wakeup inside critical section, all the
other locking primitives had been migrated to use wake_q to do wakeup
outside of the critical section. It is also possible that there are
other circular locking dependencies involving printk/console_sem or
other existing/new semaphores lurking somewhere which may show up in
the future. Let just do the migration now to wake_q to avoid headache
like this.

Reported-by: yzbot+ed801a886dfdbfe7136d@syzkaller.appspotmail.com
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250307232717.1759087-3-boqun.feng@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-04-10 14:39:31 +02:00
xieliujie
5723a22d27 ANDROID: vendor_hooks: Add hooks for oem percpu-rwsem optimaton
Recently we have discovered many lag issues caused by percpu_rwsem
lock-holding tasks not being scheduled for a long time. we need to
identify them and provide appropriate scheduling protection in our
oem scheduler.
To support this, we add one hook below:
	trace_android_vh_percpu_rwsem_wq_add

Bug: 301066838
Change-Id: Id770c1a7978842abfc62d3fa9aeb5ac7a1904972
Signed-off-by: xieliujie <xieliujie@oppo.com>
2025-02-24 18:31:29 -08:00
xieliujie
5af73be864 ANDROID: vendor_hooks: change the argument to 'lock struct' for some hooks
To count some information about locks, we need to replace the argument
'current' by 'lock struct' for these four hooks.
- android_vh_record_mutex_lock_starttime
- android_vh_record_rtmutex_lock_starttime
- android_vh_record_rwsem_lock_starttime
- android_vh_record_pcpu_rwsem_starttime

Bug: 336412598
Change-Id: I52d610079023df0feb1173ec99a6c72d12483f80
Signed-off-by: xieliujie <xieliujie@oppo.com>
2025-02-24 18:31:29 -08:00
xieliujie
3d98011e2a ANDROID: vendor_hook: add hooks to protect locking-tsk in cpu scheduler
Providing vendor hooks to record the start time of holding the lock, which
protects rwsem/mutex locking-process from being preemptedfor a short time
in some cases.

- android_vh_record_mutex_lock_starttime
- android_vh_record_rtmutex_lock_starttime
- android_vh_record_rwsem_lock_starttime
- android_vh_record_pcpu_rwsem_starttime

This commit is a combination of the following three commits.
https://android-review.googlesource.com/c/kernel/common/+/2579595
https://android-review.googlesource.com/c/kernel/common/+/2617070
https://android-review.googlesource.com/c/kernel/common/+/2694147

Bug: 241191475

Change-Id: If91859f558bf20c3297353bea8aadaa3ab4765e9
Signed-off-by: xieliujie <xieliujie@oppo.com>
2025-02-24 18:31:29 -08:00
Greg Kroah-Hartman
3d75a8d3e8 Merge 6.12.14 into android16-6.12
GKI (arm64) relevant 75 out of 419 changes, affecting 91 files +700/-304
  38a1aa02b9 exec: fix up /proc/pid/comm in the execveat(AT_EMPTY_PATH) case [2 files, +29/-4]
  e5ff8d825d sched: Don't try to catch up excess steal time. [1 file, +4/-2]
  404e5fd918 printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX [1 file, +1/-1]
  b006aadf72 drm/connector: add mutex to protect ELD from concurrent access [3 files, +11/-1]
  22a1a75818 ring-buffer: Make reading page consistent with the code logic [1 file, +3/-1]
  5c2b1d9386 tun: fix group permission check [1 file, +9/-5]
  f4b8bac3cf mmc: core: Respect quirk_max_rate for non-UHS SDIO card [1 file, +2/-0]
  e557b15ea2 HID: multitouch: Add quirk for Hantick 5288 touchpad [1 file, +5/-0]
  adcb8ce68d HID: Wacom: Add PCI Wacom device support [1 file, +5/-0]
  ebb90f23f0 Bluetooth: MGMT: Fix slab-use-after-free Read in mgmt_remove_adv_monitor_sync [1 file, +11/-1]
  c257c15845 tipc: re-order conditions in tipc_crypto_key_rcv() [1 file, +2/-2]
  90778f31ef ASoC: soc-pcm: don't use soc_pcm_ret() on .prepare callback [1 file, +28/-4]
  33a4a9f54a Input: allocate keycode for phone linking [1 file, +1/-0]
  57e07d10b3 sched/fair: Fix inaccurate h_nr_runnable accounting with delayed dequeue [1 file, +19/-0]
  bc85817e6b nvme: handle connectivity loss in nvme_set_queue_count [1 file, +7/-1]
  5eba53a9ea nvme: make nvme_tls_attrs_group static [1 file, +1/-1]
  83ebf741aa udp: gso: do not drop small packets when PMTU reduces [3 files, +30/-4]
  3139a7024e ethtool: rss: fix hiding unsupported fields in dumps [1 file, +2/-1]
  e40cb34b7f pfifo_tail_enqueue: Drop new packet when sch->limit == 0 [1 file, +3/-0]
  6312555249 netem: Update sch->q.qlen before qdisc_tree_reduce_backlog() [1 file, +1/-1]
  e36364d5d4 tun: revert fix group permission check [1 file, +5/-9]
  181b23ca2e net: sched: Fix truncation of offloaded action statistics [1 file, +1/-1]
  ac7b5f3e4d drm/client: Handle tiled displays better [1 file, +9/-0]
  f735c9d4dc fs/proc: do_task_stat: Fix ESP not readable during coredump [1 file, +1/-1]
  5a6520493c arm64/kvm: Configure HYP TCR.PS/DS based on host stage1 [1 file, +4/-4]
  c66e5205fd arm64/sme: Move storage of reg_smidr to __cpuinfo_store_cpu() [2 files, +10/-13]
  e5251ae5d3 arm64/mm: Reduce PA space to 48 bits when LPA2 is not enabled [3 files, +11/-7]
  de3ffeb212 KVM: arm64: timer: Always evaluate the need for a soft timer [1 file, +1/-3]
  f2f805ada6 KVM: Explicitly verify target vCPU is online in kvm_get_vcpu() [1 file, +9/-0]
  691218a50c Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc [1 file, +2/-1]
  ddfc234761 Bluetooth: L2CAP: accept zero as a special value for MTU auto-selection [1 file, +2/-2]
  5a262628f4 seccomp: passthrough uretprobe systemcall without filtering [1 file, +12/-0]
  2ce09aabe0 blk-cgroup: Fix class @block_class's subsystem refcount leakage [1 file, +1/-0]
  ae959ab075 scsi: ufs: core: Fix the HIGH/LOW_TEMP Bit Definitions [1 file, +2/-2]
  45ad3c7d62 of: Correct child specifier used as input of the 2nd nexus node [1 file, +1/-1]
  e62c630810 of: address: Fix empty resource handling in __of_address_resource_bounds() [1 file, +5/-7]
  4e4b3d4926 of: Fix of_find_node_opts_by_path() handling of alias+path+options [1 file, +3/-3]
  5b91440ebe of: reserved-memory: Fix using wrong number of cells to get property 'alignment' [1 file, +2/-2]
  ed0ad04c68 ring-buffer: Do not allow events in NMI with generic atomic64 cmpxchg() [1 file, +7/-2]
  d0b81ea5a5 dm-crypt: don't update io->sector after kcryptd_crypt_write_io_submit() [1 file, +3/-11]
  68a25ceb11 dm-crypt: track tag_offset in convert_context [1 file, +7/-6]
  68f16d3034 block: don't revert iter for -EIOCBQUEUED [1 file, +3/-2]
  0a14a2b841 Revert "media: uvcvideo: Require entities to have a non-zero unique ID" [1 file, +27/-43]
  3d17a4bbf2 PCI: endpoint: Finish virtual EP removal in pci_epf_remove_vepf() [1 file, +1/-0]
  36786d1a45 PCI: dwc: ep: Write BAR_MASK before iATU registers in pci_epc_set_bar() [1 file, +15/-13]
  b5cacfd067 PCI: dwc: ep: Prevent changing BAR size/flags in pci_epc_set_bar() [1 file, +21/-1]
  9fbac83100 nvme-pci: Add TUXEDO InfinityFlex to Samsung sleep quirk [1 file, +2/-1]
  2c4cda456e nvme-pci: Add TUXEDO IBP Gen9 to Samsung sleep quirk [1 file, +1/-0]
  0c77c0d754 scsi: ufs: core: Fix use-after free in init error and remove paths [4 files, +30/-32]
  8db25d4c4a scsi: core: Do not retry I/Os during depopulation [1 file, +7/-2]
  c287f18f64 rv: Reset per-task monitors also for idle tasks [1 file, +4/-0]
  e456a88bdd hrtimers: Force migrate away hrtimers queued after CPUHP_AP_HRTIMERS_DYING [2 files, +83/-21]
  2a54e8f118 kfence: skip __GFP_THISNODE allocations on NUMA systems [1 file, +2/-0]
  b64b773087 soc: qcom: smem_state: fix missing of_node_put in error path [1 file, +2/-1]
  5100391aca media: mc: fix endpoint iteration [1 file, +1/-1]
  d2eac8b14a media: uvcvideo: Fix crash during unbind if gpio unit is in use [2 files, +22/-7]
  4f534dd576 media: uvcvideo: Fix event flags in uvc_ctrl_send_events [1 file, +2/-2]
  ac7737ed9a media: uvcvideo: Support partial control reads [1 file, +21/-0]
  34fb9eb31d media: uvcvideo: Only save async fh if success [1 file, +11/-7]
  e8a650dbc7 media: uvcvideo: Remove redundant NULL assignment [1 file, +1/-3]
  438bda062b media: uvcvideo: Remove dangling pointers [3 files, +67/-3]
  a403eca86c mm: gup: fix infinite loop within __get_longterm_locked [1 file, +4/-10]
  4b69308314 mm/vmscan: accumulate nr_demoted for accurate demotion statistics [1 file, +4/-3]
  4491159774 mm/compaction: fix UBSAN shift-out-of-bounds warning [1 file, +2/-1]
  2c3109dcda nvmem: core: improve range check for nvmem_cell_write() [1 file, +2/-0]
  35ae7910c3 io_uring: fix multishots with selected buffers [1 file, +2/-0]
  be985aea92 io_uring/net: don't retry connect operation on EPOLLERR [2 files, +7/-0]
  e398619920 i3c: master: Fix missing 'ret' assignment in set_speed() [1 file, +1/-1]
  8b4120b3e0 misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors [1 file, +30/-9]
  19fc795e9d maple_tree: simplify split calculation [1 file, +6/-17]
  8441aea464 ptp: Ensure info->enable callback is always set [1 file, +8/-0]
  c6dd70e5b4 timers/migration: Fix off-by-one root mis-connection [1 file, +9/-1]
  45439a8b11 fs: prepend statmount.mnt_opts string with security_sb_mnt_opts() [1 file, +4/-0]
  7db0365ee6 fs: fix adding security options to statmount.mnt_opt [1 file, +14/-15]
  d49c64c1d7 statmount: let unset strings be empty [1 file, +12/-4]

Changes in 6.12.14
	irqchip/lan966x-oic: Make CONFIG_LAN966X_OIC depend on CONFIG_MCHP_LAN966X_PCI
	btrfs: fix assertion failure when splitting ordered extent after transaction abort
	btrfs: do not output error message if a qgroup has been already cleaned up
	btrfs: fix use-after-free when attempting to join an aborted transaction
	arm64/mm: Ensure adequate HUGE_MAX_HSTATE
	exec: fix up /proc/pid/comm in the execveat(AT_EMPTY_PATH) case
	s390/stackleak: Use exrl instead of ex in __stackleak_poison()
	btrfs: fix data race when accessing the inode's disk_i_size at btrfs_drop_extents()
	btrfs: convert BUG_ON in btrfs_reloc_cow_block() to proper error handling
	sched: Don't try to catch up excess steal time.
	x86: Convert unreachable() to BUG()
	locking/ww_mutex/test: Use swap() macro
	lockdep: Fix upper limit for LOCKDEP_*_BITS configs
	x86/amd_nb: Restrict init function to AMD-based systems
	drm/virtio: New fence for every plane update
	drm: Add panel backlight quirks
	drm: panel-backlight-quirks: Add Framework 13 matte panel
	drm: panel-backlight-quirks: Add Framework 13 glossy and 2.8k panels
	nvkm/gsp: correctly advance the read pointer of GSP message queue
	nvkm: correctly calculate the available space of the GSP cmdq buffer
	drm/tests: hdmi: handle empty modes in find_preferred_mode()
	drm/tests: hdmi: return meaningful value from set_connector_edid()
	drm/amd/display: Populate chroma prefetch parameters, DET buffer fix
	drm/amd/display: Overwriting dualDPP UBF values before usage
	printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX
	drm/connector: add mutex to protect ELD from concurrent access
	drm/bridge: anx7625: use eld_mutex to protect access to connector->eld
	drm/bridge: ite-it66121: use eld_mutex to protect access to connector->eld
	drm/amd/display: use eld_mutex to protect access to connector->eld
	drm/exynos: hdmi: use eld_mutex to protect access to connector->eld
	drm/radeon: use eld_mutex to protect access to connector->eld
	drm/sti: hdmi: use eld_mutex to protect access to connector->eld
	drm/vc4: hdmi: use eld_mutex to protect access to connector->eld
	drm/amd/display: Fix Mode Cutoff in DSC Passthrough to DP2.1 Monitor
	drm/amdgpu: Don't enable sdma 4.4.5 CTXEMPTY interrupt
	drm/amdkfd: Queue interrupt work to different CPU
	drm/bridge: it6505: Change definition MAX_HDCP_DOWN_STREAM_COUNT
	drm/bridge: it6505: fix HDCP Bstatus check
	drm/bridge: it6505: fix HDCP encryption when R0 ready
	drm/bridge: it6505: fix HDCP CTS compare V matching
	drm/bridge: it6505: fix HDCP CTS KSV list wait timer
	safesetid: check size of policy writes
	drm/amd/display: Increase sanitizer frame larger than limit when compile testing with clang
	drm/amd/display: Limit Scaling Ratio on DCN3.01
	ring-buffer: Make reading page consistent with the code logic
	wifi: rtw89: add crystal_cap check to avoid setting as overflow value
	tun: fix group permission check
	mmc: core: Respect quirk_max_rate for non-UHS SDIO card
	mmc: sdhci-esdhc-imx: enable 'SDHCI_QUIRK_NO_LED' quirk for S32G
	wifi: brcmsmac: add gain range check to wlc_phy_iqcal_gainparams_nphy()
	tomoyo: don't emit warning in tomoyo_write_control()
	mfd: lpc_ich: Add another Gemini Lake ISA bridge PCI device-id
	wifi: rtw88: add __packed attribute to efuse layout struct
	clk: qcom: Make GCC_8150 depend on QCOM_GDSC
	HID: multitouch: Add quirk for Hantick 5288 touchpad
	HID: Wacom: Add PCI Wacom device support
	net/mlx5: use do_aux_work for PHC overflow checks
	wifi: brcmfmac: Check the return value of of_property_read_string_index()
	wifi: iwlwifi: pcie: Add support for new device ids
	wifi: iwlwifi: avoid memory leak
	i2c: Force ELAN06FA touchpad I2C bus freq to 100KHz
	APEI: GHES: Have GHES honor the panic= setting
	Bluetooth: btusb: Add new VID/PID 13d3/3610 for MT7922
	Bluetooth: btusb: Add new VID/PID 13d3/3628 for MT7925
	Bluetooth: MGMT: Fix slab-use-after-free Read in mgmt_remove_adv_monitor_sync
	net: wwan: iosm: Fix hibernation by re-binding the driver around it
	HID: hid-asus: Disable OOBE mode on the ProArt P16
	mmc: sdhci-msm: Correctly set the load for the regulator
	octeon_ep: update tx/rx stats locally for persistence
	octeon_ep_vf: update tx/rx stats locally for persistence
	tipc: re-order conditions in tipc_crypto_key_rcv()
	selftests/net/ipsec: Fix Null pointer dereference in rtattr_pack()
	net: ethernet: ti: am65-cpsw: ensure proper channel cleanup in error path
	ASoC: SOF: Intel: hda-dai: Ensure DAI widget is valid during params
	x86/kexec: Allocate PGD for x86_64 transition page tables separately
	ASoC: Intel: sof_sdw: Correct quirk for Lenovo Yoga Slim 7
	iommu/arm-smmu-qcom: add sdm670 adreno iommu compatible
	iommu/arm-smmu-v3: Clean up more on probe failure
	platform/x86: int3472: Check for adev == NULL
	platform/x86: acer-wmi: Add support for Acer PH14-51
	ASoC: soc-pcm: don't use soc_pcm_ret() on .prepare callback
	platform/x86: acer-wmi: Add support for Acer Predator PH16-72
	ASoC: amd: Add ACPI dependency to fix build error
	Input: allocate keycode for phone linking
	platform/x86: acer-wmi: add support for Acer Nitro AN515-58
	platform/x86: acer-wmi: Ignore AC events
	KVM: PPC: e500: Mark "struct page" dirty in kvmppc_e500_shadow_map()
	KVM: PPC: e500: Mark "struct page" pfn accessed before dropping mmu_lock
	KVM: PPC: e500: Use __kvm_faultin_pfn() to handle page faults
	KVM: e500: always restore irqs
	drm/amdgpu: Fix Circular Locking Dependency in AMDGPU GFX Isolation
	xfs: report realtime block quota limits on realtime directories
	xfs: don't over-report free space or inodes in statvfs
	tty: xilinx_uartps: split sysrq handling
	tty: Permit some TIOCL_SETSEL modes without CAP_SYS_ADMIN
	platform/x86: serdev_helpers: Check for serial_ctrl_uid == NULL
	sched/fair: Fix inaccurate h_nr_runnable accounting with delayed dequeue
	nvme: handle connectivity loss in nvme_set_queue_count
	firmware: iscsi_ibft: fix ISCSI_IBFT Kconfig entry
	gpu: drm_dp_cec: fix broken CEC adapter properties check
	ice: put Rx buffers after being done with current frame
	ice: gather page_count()'s of each frag right before XDP prog call
	ice: stop storing XDP verdict within ice_rx_buf
	nvme: make nvme_tls_attrs_group static
	nvme-fc: use ctrl state getter
	net: bcmgenet: Correct overlaying of PHY and MAC Wake-on-LAN
	ice: Add check for devm_kzalloc()
	vmxnet3: Fix tx queue race condition with XDP
	tg3: Disable tg3 PCIe AER on system reboot
	udp: gso: do not drop small packets when PMTU reduces
	drm/i915/dp: fix the Adaptive sync Operation mode for SDP
	ethtool: rss: fix hiding unsupported fields in dumps
	rxrpc: Fix the rxrpc_connection attend queue handling
	gpio: pca953x: Improve interrupt support
	net: atlantic: fix warning during hot unplug
	net: rose: lock the socket in rose_bind()
	gpio: sim: lock hog configfs items if present
	x86/xen: fix xen_hypercall_hvm() to not clobber %rbx
	x86/xen: add FRAME_END to xen_hypercall_hvm()
	ACPI: property: Fix return value for nval == 0 in acpi_data_prop_read()
	pfifo_tail_enqueue: Drop new packet when sch->limit == 0
	netem: Update sch->q.qlen before qdisc_tree_reduce_backlog()
	tun: revert fix group permission check
	net: sched: Fix truncation of offloaded action statistics
	rxrpc: Fix call state set to not include the SERVER_SECURING state
	cpufreq: fix using cpufreq-dt as module
	cpufreq: s3c64xx: Fix compilation warning
	leds: lp8860: Write full EEPROM, not only half of it
	ALSA: hda/realtek: Enable Mute LED on HP Laptop 14s-fq1xxx
	cifs: Remove intermediate object of failed create SFU call
	drm/modeset: Handle tiled displays in pan_display_atomic.
	drm/client: Handle tiled displays better
	smb: client: fix order of arguments of tracepoints
	smb: client: change lease epoch type from unsigned int to __u16
	md: reintroduce md-linear
	s390/futex: Fix FUTEX_OP_ANDN implementation
	arm64: Filter out SVE hwcaps when FEAT_SVE isn't implemented
	m68k: vga: Fix I/O defines
	fs/proc: do_task_stat: Fix ESP not readable during coredump
	binfmt_flat: Fix integer overflow bug on 32 bit systems
	accel/ivpu: Fix Qemu crash when running in passthrough
	arm64/kvm: Configure HYP TCR.PS/DS based on host stage1
	arm64/mm: Override PARange for !LPA2 and use it consistently
	arm64/sme: Move storage of reg_smidr to __cpuinfo_store_cpu()
	arm64/mm: Reduce PA space to 48 bits when LPA2 is not enabled
	KVM: arm64: timer: Always evaluate the need for a soft timer
	drm/rockchip: cdn-dp: Use drm_connector_helper_hpd_irq_event()
	arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma
	remoteproc: omap: Handle ARM dma_iommu_mapping
	KVM: Explicitly verify target vCPU is online in kvm_get_vcpu()
	kvm: defer huge page recovery vhost task to later
	KVM: s390: vsie: fix some corner-cases when grabbing vsie pages
	ksmbd: fix integer overflows on 32 bit systems
	drm/amd/display: Optimize cursor position updates
	drm/amd/pm: Mark MM activity as unsupported
	drm/amd/amdgpu: change the config of cgcg on gfx12
	drm/amdkfd: only flush the validate MES contex
	drm/amdkfd: Block per-queue reset when halt_if_hws_hang=1
	Revert "drm/amd/display: Use HW lock mgr for PSR1"
	drm/i915/guc: Debug print LRC state entries only if the context is pinned
	drm/i915: Fix page cleanup on DMA remap failure
	drm/komeda: Add check for komeda_get_layer_fourcc_list()
	drm/xe/devcoredump: Move exec queue snapshot to Contexts section
	drm/i915/dp: Iterate DSC BPP from high to low on all platforms
	drm/i915: Drop 64bpp YUV formats from ICL+ SDR planes
	drm/amdgpu: add a BO metadata flag to disable write compression for Vulkan
	drm/amd/display: Fix seamless boot sequence
	Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc
	Bluetooth: L2CAP: accept zero as a special value for MTU auto-selection
	KEYS: trusted: dcp: fix improper sg use with CONFIG_VMAP_STACK=y
	clk: sunxi-ng: a100: enable MMC clock reparenting
	clk: mmp2: call pm_genpd_init() only after genpd.name is set
	media: i2c: ds90ub960: Fix UB9702 refclk register access
	clk: clk-loongson2: Fix the number count of clk provider
	clk: qcom: clk-alpha-pll: fix alpha mode configuration
	clk: qcom: gcc-sm8550: Do not turn off PCIe GDSCs during gdsc_disable()
	clk: qcom: gcc-sm8650: Do not turn off PCIe GDSCs during gdsc_disable()
	clk: qcom: gcc-sm6350: Add missing parent_map for two clocks
	clk: qcom: dispcc-sm6350: Add missing parent_map for a clock
	clk: qcom: gcc-mdm9607: Fix cmd_rcgr offset for blsp1_uart6 rcg
	clk: qcom: clk-rpmh: prevent integer overflow in recalc_rate
	clk: mediatek: mt2701-vdec: fix conversion to mtk_clk_simple_probe
	clk: mediatek: mt2701-aud: fix conversion to mtk_clk_simple_probe
	clk: mediatek: mt2701-bdp: add missing dummy clk
	clk: mediatek: mt2701-img: add missing dummy clk
	clk: mediatek: mt2701-mm: add missing dummy clk
	seccomp: passthrough uretprobe systemcall without filtering
	blk-cgroup: Fix class @block_class's subsystem refcount leakage
	efi: libstub: Use '-std=gnu11' to fix build with GCC 15
	perf bench: Fix undefined behavior in cmpworker()
	scsi: ufs: core: Fix the HIGH/LOW_TEMP Bit Definitions
	of: Correct child specifier used as input of the 2nd nexus node
	of: address: Fix empty resource handling in __of_address_resource_bounds()
	of: Fix of_find_node_opts_by_path() handling of alias+path+options
	of: reserved-memory: Fix using wrong number of cells to get property 'alignment'
	Input: bbnsm_pwrkey - add remove hook
	HID: hid-sensor-hub: don't use stale platform-data on remove
	ring-buffer: Do not allow events in NMI with generic atomic64 cmpxchg()
	atomic64: Use arch_spin_locks instead of raw_spin_locks
	wifi: rtlwifi: rtl8821ae: Fix media status report
	wifi: brcmfmac: fix NULL pointer dereference in brcmf_txfinalize()
	wifi: mt76: mt7921u: Add VID/PID for TP-Link TXE50UH
	wifi: rtw88: sdio: Fix disconnection after beacon loss
	wifi: mt76: mt7915: add module param to select 5 GHz or 6 GHz on MT7916
	wifi: rtw88: 8703b: Fix RX/TX issues
	usb: gadget: f_tcm: Translate error to sense
	usb: gadget: f_tcm: Decrement command ref count on cleanup
	usb: gadget: f_tcm: ep_autoconfig with fullspeed endpoint
	usb: gadget: f_tcm: Don't prepare BOT write request twice
	usbnet: ipheth: fix possible overflow in DPE length check
	usbnet: ipheth: use static NDP16 location in URB
	usbnet: ipheth: check that DPE points past NCM header
	usbnet: ipheth: refactor NCM datagram loop
	usbnet: ipheth: break up NCM header size computation
	usbnet: ipheth: fix DPE OoB read
	usbnet: ipheth: document scope of NCM implementation
	arm64: dts: qcom: x1e80100-asus-vivobook-s15: Fix USB QMP PHY supplies
	arm64: dts: qcom: x1e80100-qcp: Fix USB QMP PHY supplies
	arm64: dts: qcom: x1e78100-lenovo-thinkpad-t14s: Fix USB QMP PHY supplies
	arm64: dts: qcom: x1e80100-crd: Fix USB QMP PHY supplies
	arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Fix USB QMP PHY supplies
	arm64: dts: qcom: x1e80100-microsoft-romulus: Fix USB QMP PHY supplies
	arm64: dts: qcom: x1e80100: Fix usb_2 controller interrupts
	ASoC: acp: Support microphone from Lenovo Go S
	soc: qcom: socinfo: Avoid out of bounds read of serial number
	serial: sh-sci: Drop __initdata macro for port_cfg
	serial: sh-sci: Do not probe the serial port if its slot in sci_ports[] is in use
	MIPS: Loongson64: remove ROM Size unit in boardinfo
	LoongArch: Extend the maximum number of watchpoints
	powerpc/pseries/eeh: Fix get PE state translation
	dm-crypt: don't update io->sector after kcryptd_crypt_write_io_submit()
	dm-crypt: track tag_offset in convert_context
	mips/math-emu: fix emulation of the prefx instruction
	MIPS: pci-legacy: Override pci_address_to_pio
	Revert "MIPS: csrc-r4k: Select HAVE_UNSTABLE_SCHED_CLOCK if SMP && 64BIT"
	block: don't revert iter for -EIOCBQUEUED
	Revert "media: uvcvideo: Require entities to have a non-zero unique ID"
	firmware: qcom: scm: Fix missing read barrier in qcom_scm_is_available()
	firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool()
	ALSA: hda/realtek: Enable headset mic on Positivo C6400
	ALSA: hda/realtek: Fix quirk matching for Legion Pro 7
	ALSA: hda: Fix headset detection failure due to unstable sort
	arm64: tegra: Fix Tegra234 PCIe interrupt-map
	s390/pci: Fix SR-IOV for PFs initially in standby
	PCI: Avoid putting some root ports into D3 on TUXEDO Sirius Gen1
	PCI: endpoint: Finish virtual EP removal in pci_epf_remove_vepf()
	PCI: dwc: ep: Write BAR_MASK before iATU registers in pci_epc_set_bar()
	PCI: dwc: ep: Prevent changing BAR size/flags in pci_epc_set_bar()
	nvme-pci: Add TUXEDO InfinityFlex to Samsung sleep quirk
	nvme-pci: Add TUXEDO IBP Gen9 to Samsung sleep quirk
	KVM: x86/mmu: Ensure NX huge page recovery thread is alive before waking
	scsi: st: Don't set pos_unknown just after device recognition
	scsi: qla2xxx: Move FCE Trace buffer allocation to user control
	scsi: ufs: qcom: Fix crypto key eviction
	scsi: ufs: core: Fix use-after free in init error and remove paths
	scsi: storvsc: Set correct data length for sending SCSI command without payload
	scsi: core: Do not retry I/Os during depopulation
	kbuild: Move -Wenum-enum-conversion to W=2
	rust: init: use explicit ABI to clean warning in future compilers
	x86: rust: set rustc-abi=x86-softfloat on rustc>=1.86.0
	x86/acpi: Fix LAPIC/x2APIC parsing order
	x86/boot: Use '-std=gnu11' to fix build with GCC 15
	ubi: Add a check for ubi_num
	ARM: dts: dra7: Add bus_dma_limit for l4 cfg bus
	ARM: dts: ti/omap: gta04: fix pm issues caused by spi module
	arm64: dts: mediatek: mt8183: Disable DPI display output by default
	arm64: dts: qcom: sdx75: Fix MPSS memory length
	arm64: dts: qcom: x1e80100: Fix ADSP memory base and length
	arm64: dts: qcom: x1e80100: Fix CDSP memory length
	arm64: dts: qcom: sm6115: Fix MPSS memory length
	arm64: dts: qcom: sm6115: Fix CDSP memory length
	arm64: dts: qcom: sm6115: Fix ADSP memory base and length
	arm64: dts: qcom: sm6350: Fix ADSP memory length
	arm64: dts: qcom: sm6350: Fix MPSS memory length
	arm64: dts: qcom: sm6350: Fix uart1 interconnect path
	arm64: dts: qcom: sm6375: Fix ADSP memory length
	arm64: dts: qcom: sm6375: Fix CDSP memory base and length
	arm64: dts: qcom: sm6375: Fix MPSS memory base and length
	arm64: dts: qcom: sm8350: Fix ADSP memory base and length
	arm64: dts: qcom: sm8350: Fix CDSP memory base and length
	arm64: dts: qcom: sm8350: Fix MPSS memory length
	arm64: dts: qcom: sm8450: Fix ADSP memory base and length
	arm64: dts: qcom: sm8450: Fix CDSP memory length
	arm64: dts: qcom: sm8450: Fix MPSS memory length
	arm64: dts: qcom: sm8550: Fix ADSP memory base and length
	arm64: dts: qcom: sm8550: Fix CDSP memory length
	arm64: dts: qcom: sm8550: Fix MPSS memory length
	arm64: dts: qcom: sm8650: Fix ADSP memory base and length
	arm64: dts: qcom: sm8650: Fix CDSP memory length
	arm64: dts: qcom: sm8650: Fix MPSS memory length
	arm64: dts: qcom: sm8550: correct MDSS interconnects
	arm64: dts: qcom: sm8650: correct MDSS interconnects
	crypto: qce - fix priority to be less than ARMv8 CE
	arm64: tegra: Fix typo in Tegra234 dce-fabric compatible
	arm64: tegra: Disable Tegra234 sce-fabric node
	parisc: Temporarily disable jump label support
	pwm: microchip-core: fix incorrect comparison with max period
	xfs: don't call remap_verify_area with sb write protection held
	xfs: Propagate errors from xfs_reflink_cancel_cow_range in xfs_dax_write_iomap_end
	xfs: Add error handling for xfs_reflink_cancel_cow_range
	accel/ivpu: Clear runtime_error after pm_runtime_resume_and_get() fails
	ACPI: PRM: Remove unnecessary strict handler address checks
	tpm: Change to kvalloc() in eventlog/acpi.c
	rv: Reset per-task monitors also for idle tasks
	hrtimers: Force migrate away hrtimers queued after CPUHP_AP_HRTIMERS_DYING
	iommufd: Fix struct iommu_hwpt_pgfault init and padding
	kfence: skip __GFP_THISNODE allocations on NUMA systems
	media: ccs: Clean up parsed CCS static data on parse failure
	mm/hugetlb: fix avoid_reserve to allow taking folio from subpool
	iio: light: as73211: fix channel handling in only-color triggered buffer
	iommu/tegra241-cmdqv: Read SMMU IDR1.CMDQS instead of hardcoding
	iommufd/fault: Destroy response and mutex in iommufd_fault_destroy()
	iommufd/fault: Use a separate spinlock to protect fault->deliver list
	soc: samsung: exynos-pmu: Fix uninitialized ret in tensor_set_bits_atomic()
	soc: mediatek: mtk-devapc: Fix leaking IO map on error paths
	soc: mediatek: mtk-devapc: Fix leaking IO map on driver remove
	soc: qcom: llcc: Enable LLCC_WRCACHE at boot on X1
	soc: qcom: smem_state: fix missing of_node_put in error path
	media: mmp: Bring back registration of the device
	media: mc: fix endpoint iteration
	media: nuvoton: Fix an error check in npcm_video_ece_init()
	media: imx296: Add standby delay during probe
	media: intel/ipu6: remove cpu latency qos request on error
	media: ov5640: fix get_light_freq on auto
	media: stm32: dcmipp: correct dma_set_mask_and_coherent mask value
	media: ccs: Fix CCS static data parsing for large block sizes
	media: ccs: Fix cleanup order in ccs_probe()
	media: i2c: ds90ub9x3: Fix extra fwnode_handle_put()
	media: i2c: ds90ub960: Fix use of non-existing registers on UB9702
	media: i2c: ds90ub960: Fix UB9702 VC map
	media: i2c: ds90ub960: Fix logging SP & EQ status only for UB9702
	media: uvcvideo: Fix crash during unbind if gpio unit is in use
	media: uvcvideo: Fix event flags in uvc_ctrl_send_events
	media: uvcvideo: Support partial control reads
	media: uvcvideo: Only save async fh if success
	media: uvcvideo: Remove redundant NULL assignment
	media: uvcvideo: Remove dangling pointers
	mm: kmemleak: fix upper boundary check for physical address objects
	mm: gup: fix infinite loop within __get_longterm_locked
	mm/vmscan: accumulate nr_demoted for accurate demotion statistics
	mm/hugetlb: fix hugepage allocation for interleaved memory nodes
	mm/compaction: fix UBSAN shift-out-of-bounds warning
	ata: libata-sff: Ensure that we cannot write outside the allocated buffer
	irqchip/irq-mvebu-icu: Fix access to msi_data from irq_domain::host_data
	crypto: qce - fix goto jump in error path
	crypto: qce - unregister previously registered algos in error path
	ceph: fix memory leak in ceph_mds_auth_match()
	nvmem: qcom-spmi-sdam: Set size in struct nvmem_config
	nvmem: core: improve range check for nvmem_cell_write()
	nvmem: imx-ocotp-ele: simplify read beyond device check
	nvmem: imx-ocotp-ele: fix MAC address byte order
	nvmem: imx-ocotp-ele: fix reading from non zero offset
	nvmem: imx-ocotp-ele: set word length to 1
	io_uring: fix multishots with selected buffers
	io_uring/net: don't retry connect operation on EPOLLERR
	vfio/platform: check the bounds of read/write syscalls
	selftests: mptcp: connect: -f: no reconnect
	pnfs/flexfiles: retry getting layout segment for reads
	ocfs2: fix incorrect CPU endianness conversion causing mount failure
	ocfs2: handle a symlink read error correctly
	nilfs2: fix possible int overflows in nilfs_fiemap()
	nfs: Make NFS_FSCACHE select NETFS_SUPPORT instead of depending on it
	NFSD: Encode COMPOUND operation status on page boundaries
	mailbox: tegra-hsp: Clear mailbox before using message
	mailbox: zynqmp: Remove invalid __percpu annotation in zynqmp_ipi_probe()
	NFC: nci: Add bounds checking in nci_hci_create_pipe()
	fgraph: Fix set_graph_notrace with setting TRACE_GRAPH_NOTRACE_BIT
	i3c: master: Fix missing 'ret' assignment in set_speed()
	irqchip/apple-aic: Only handle PMC interrupt as FIQ when configured so
	mtd: onenand: Fix uninitialized retlen in do_otp_read()
	misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors
	misc: fastrpc: Deregister device nodes properly in error scenarios
	misc: fastrpc: Fix registered buffer page address
	misc: fastrpc: Fix copy buffer page size
	net/ncsi: wait for the last response to Deselect Package before configuring channel
	net: phy: c45-tjaxx: add delay between MDIO write and read in soft_reset
	maple_tree: simplify split calculation
	scripts/gdb: fix aarch64 userspace detection in get_current_task
	tracing/osnoise: Fix resetting of tracepoints
	rtla/osnoise: Distinguish missing workload option
	rtla/timerlat_hist: Set OSNOISE_WORKLOAD for kernel threads
	rtla/timerlat_top: Set OSNOISE_WORKLOAD for kernel threads
	rtla: Add trace_instance_stop
	rtla/timerlat_hist: Stop timerlat tracer on signal
	rtla/timerlat_top: Stop timerlat tracer on signal
	pinctrl: samsung: fix fwnode refcount cleanup if platform_get_irq_optional() fails
	pinctrl: renesas: rzg2l: Fix PFC_MASK for RZ/V2H and RZ/G3E
	ptp: Ensure info->enable callback is always set
	RDMA/mlx5: Fix a race for an ODP MR which leads to CQE with error
	rtc: zynqmp: Fix optional clock name property
	timers/migration: Fix off-by-one root mis-connection
	s390/fpu: Add fpc exception handler / remove fixup section again
	MIPS: ftrace: Declare ftrace_get_parent_ra_addr() as static
	xfs: avoid nested calls to __xfs_trans_commit
	xfs: don't lose solo superblock counter update transactions
	xfs: separate dquot buffer reads from xfs_dqflush
	xfs: clean up log item accesses in xfs_qm_dqflush{,_done}
	xfs: attach dquot buffer to dquot log item buffer
	xfs: convert quotacheck to attach dquot buffers
	xfs: release the dquot buf outside of qli_lock
	xfs: lock dquot buffer before detaching dquot from b_li_list
	xfs: fix mount hang during primary superblock recovery failure
	spi: atmel-quadspi: Create `atmel_qspi_ops` to support newer SoC families
	spi: atmel-qspi: Memory barriers after memory-mapped I/O
	Revert "btrfs: avoid monopolizing a core when activating a swap file"
	btrfs: avoid monopolizing a core when activating a swap file
	mptcp: prevent excessive coalescing on receive
	x86/mm: Convert unreachable() to BUG()
	md/md-linear: Fix a NULL vs IS_ERR() bug in linear_add()
	md: Fix linear_set_limits()
	Revert "selftests/sched_ext: fix build after renames in sched_ext API"
	Revert "drm/amd/display: Fix green screen issue after suspend"
	drm/xe: Fix and re-enable xe_print_blob_ascii85()
	fs: prepend statmount.mnt_opts string with security_sb_mnt_opts()
	fs: fix adding security options to statmount.mnt_opt
	statmount: let unset strings be empty
	arm64: dts: rockchip: add reset-names for combphy on rk3568
	ocfs2: check dir i_size in ocfs2_find_entry
	Linux 6.12.14

Change-Id: Id4141bfc8ee9a6320b056561aa528228e7a3f1df
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-02-24 00:02:42 -08:00
Qais Yousef
b02669867b ANDROID: sched/pi: Reweight fair_policy() tasks when inheriting prio
For fair tasks inheriting the priority (nice) without reweighting is
a NOP as the task's share won't change.

This is visible when running with PTHREAD_PRIO_INHERIT where fair tasks
with low priority values are susceptible to starvation leading to PI
like impact on lock contention.

The logic in rt_mutex will reset these low priority fair tasks into nice
0, but without the additional reweight operation to actually update the
weights, it doesn't have the desired impact of boosting them to allow
them to run sooner/longer to release the lock.

Apply the reweight for fair_policy() tasks to achieve the desired boost
for those low nice values tasks. Note that boost here means resetting
their nice to 0; as this is what the current logic does for fair tasks.

We need to re-instate ordering fair tasks by their priority order on the
waiter tree to ensure we inherit the top_waiter properly.

Handling of idle_policy() requires more code refactoring and is not
handled yet. idle_policy() are treated specially and only run when the
CPU is idle and get a hardcoded low weight value. Changing weights won't
be enough without a promotion first to SCHED_OTHER.

Tested with a test program that creates three threads.

	1. main thread that spawns high prio and low prio task and busy
	   loops

	2. low priority thread that holds a pthread_mutex() with
	   PTHREAD_PRIO_INHERIT protocol. Runs at nice +10. Busy loops
	   after holding the lock.

	3. high priority thread that holds a pthread_mutex() with
	   PTHREADPTHREAD_PRIO_INHERIT, but made to start after the low
	   priority thread. Runs at nice 0. Should remain blocked by the
	   low priority thread.

All tasks are pinned to CPU0.

Without the patch I can see the low priority thread running only for
~10% of the time which is what expected without it being boosted.

With the patch the low priority thread runs for ~50% which is what
expected if it gets boosted to nice 0.

I modified the test program logic afterwards to ensure that after
releasing the lock the low priority thread goes back to running for 10%
of the time, and it does.

This is a temporary workaround until Proxy Execution is available and
connected to futex_pi. The inheritance logic won't work with SCHED_IDLE
nor with cgroup cpu.shares as inheriting these is complex and requires
Proxy Execution. But users of PTHREAD_PRIO_INHERIT will see that fair
tasks inherit nice value and will address a common class of existing
problems until Proxy Execution has fully landed.

Bug: 263876335
Link: https://lore.kernel.org/lkml/20240514160711.hpdg64grdwc43ux7@airbuntu/
Reported-by: Yabin Cui <yabinc@google.com>
Signed-off-by: Qais Yousef <qyousef@layalina.io>
[Fix trivial conflict with vendor hook]
Signed-off-by: Qais Yousef <qyousef@google.com>
Change-Id: Ia954ee528495b5cf5c3a2157c68b4a757cef1f83
(cherry picked from commit 23ac35ed8fc6220e4e498a21d22a9dbe67e7da9b)
[Fix conflict in __waiter_prio() where a vendor hook no longer present
use p->sched_class->reweight_task() as reweight_task() def has changed]
Signed-off-by: Qais Yousef <qyousef@google.com>
2025-02-19 20:55:28 -08:00
Thorsten Blum
fbcd9eedce locking/ww_mutex/test: Use swap() macro
[ Upstream commit 0d3547df6934b8f9600630322799a2a76b4567d8 ]

Fixes the following Coccinelle/coccicheck warning reported by
swap.cocci:

  WARNING opportunity for swap()

Compile-tested only.

[Boqun: Add the report tags from Jiapeng and Abaci Robot [1].]

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Reported-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11531
Link: https://lore.kernel.org/r/20241025081455.55089-1-jiapeng.chong@linux.alibaba.com [1]
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/20240731135850.81018-2-thorsten.blum@toblux.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-17 10:04:44 +01:00
xieliujie
501e135ecf ANDROID: vendor_hooks: Add hooks for mutex and rwsem optimistic spin
These hooks help us do the following things:
a) Record the number of mutex and rwsem optimistic spin.
b) Monitor the time of mutex and rwsem optimistic spin.
c) Make it possible if oems don't want mutex and rwsem to optimistic spin
for a long time.

Bug: 267565260
Change-Id: I2bee30fb17946be85e026213b481aeaeaee2459f
Signed-off-by: xieliujie <xieliujie@oppo.com>
2025-02-12 11:19:03 -08:00
Dezhi Huang
de121bf8fb ANDROID: mutex: Add vendor hook to init mutex oem data.
Add hooks to init oem data of mutex.

Bug: 231527236
Signed-off-by: Dezhi Huang <huangdezhi@hihonor.com>
Change-Id: Id0aeac168e81bd3d88051657c32ba709c329dbdd
(cherry picked from commit 81fcfdb0e0654f6eea1531953c419d4dc90c7409)
2025-02-11 12:28:20 -08:00
John Stultz
278752841b BACKPORT: locking/rtmutex: Make sure we wake anything on the wake_q when we release the lock->wait_lock
Bert reported seeing occasional boot hangs when running with
PREEPT_RT and bisected it down to commit 894d1b3db41c
("locking/mutex: Remove wakeups from under mutex::wait_lock").

It looks like I missed a few spots where we drop the wait_lock and
potentially call into schedule without waking up the tasks on the
wake_q structure. Since the tasks being woken are ww_mutex tasks
they need to be able to run to release the mutex and unblock the
task that currently is planning to wake them. Thus we can deadlock.

So make sure we wake the wake_q tasks when we unlock the wait_lock.

Closes: https://lore.kernel.org/lkml/20241211182502.2915-1-spasswolf@web.de
Fixes: 894d1b3db41c ("locking/mutex: Remove wakeups from under mutex::wait_lock")
Reported-by: Bert Karwatzki <spasswolf@web.de>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20241212222138.2400498-1-jstultz@google.com
(cherry picked from commit 4a077914578183ec397ad09f7156a357e00e5d72)
[jstultz: Resolved trivial conflict in kernel/locking/rtmutex.c]
Signed-off-by: John Stultz <jstultz@google.com>
Change-Id: I3229b4298299ea1f7239b65a4fbb709b479ee8ab
2025-01-06 09:34:35 -08:00
John Stultz
cfca8bec39 FROMLIST: test-ww_mutex: Allow test to be run (and re-run) from userland
In cases where the ww_mutex test was occasionally tripping on
hard to find issues, leaving qemu in a reboot loop was my best
way to reproduce problems. These reboots however wasted time
when I just wanted to run the test-ww_mutex logic.

So tweak the test-ww_mutex test so that it can be re-triggered
via a sysfs file, so the test can be run repeatedly without
doing module loads or restarting.

To use, run as root:
  echo 1 > /sys/kernel/test_ww_mutex/run_tests

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Will Deacon <will@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: "Paul E . McKenney" <paulmck@kernel.org>
Cc: Joel Fernandes <joelaf@google.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: kernel-team@android.com
Change-Id: Icf3bec7f61bfe104dc62b8d29f84dd4e754d4cb1
Signed-off-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/lkml/20241115235919.1029490-1-jstultz@google.com/
Bug: 306081722
2024-12-13 10:01:53 -08:00
Peter Zijlstra
465f85fe91 ANDROID: sched: Add blocked_donor link to task for smarter mutex handoffs
Add link to the task this task is proxying for, and use it so
the mutex owner can do an intelligent hand-off of the mutex to
the task that the owner is running on behalf.

Cc: Joel Fernandes <joelaf@google.com>
Cc: Qais Yousef <qyousef@layalina.io>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ben Segall <bsegall@google.com>
Cc: Zimuzo Ezeozue <zezeozue@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Will Deacon <will@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Metin Kaya <Metin.Kaya@arm.com>
Cc: Xuewen Yan <xuewen.yan94@gmail.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: kernel-team@android.com
Change-Id: Iad6f775f928b9e90e22d1d831aff26f60f37e773
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Connor O'Brien <connoro@google.com>
[jstultz: This patch was split out from larger proxy patch]
Signed-off-by: John Stultz <jstultz@google.com>
Bug: 306081722
---
v5:
* Split out from larger proxy patch
v6:
* Moved proxied value from earlier patch to this one where it
  is actually used
* Rework logic to check sched_proxy_exec() instead of using ifdefs
* Moved comment change to this patch where it makes sense
v7:
* Use more descriptive term then "us" in comments, as suggested
  by Metin Kaya.
* Minor typo fixup from Metin Kaya
* Reworked proxied variable to prev_not_proxied to simplify usage
v8:
* Use helper for donor blocked_on_state transition
v9:
* Re-add mutex lock handoff in the unlock path, but only when we
  have a blocked donor
* Slight reword of commit message suggested by Metin
2024-12-13 10:01:53 -08:00
Peter Zijlstra
d2f9f2613a FROMLIST: sched: Start blocked_on chain processing in find_proxy_task()
Start to flesh out the real find_proxy_task() implementation,
but avoid the migration cases for now, in those cases just
deactivate the donor task and pick again.

To ensure the donor task or other blocked tasks in the chain
aren't migrated away while we're running the proxy, also tweak
the CFS logic to avoid migrating donor or mutex blocked tasks.

Cc: Joel Fernandes <joelaf@google.com>
Cc: Qais Yousef <qyousef@layalina.io>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ben Segall <bsegall@google.com>
Cc: Zimuzo Ezeozue <zezeozue@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Will Deacon <will@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Metin Kaya <Metin.Kaya@arm.com>
Cc: Xuewen Yan <xuewen.yan94@gmail.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: kernel-team@android.com
Change-Id: I4d2b764c0115881133046265fbc48c4e5dbe6129
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Connor O'Brien <connoro@google.com>
[jstultz: This change was split out from the larger proxy patch]
Signed-off-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/lkml/20241125195204.2374458-8-jstultz@google.com/
Bug: 306081722
---
v5:
* Split this out from larger proxy patch
v7:
* Minor refactoring of core find_proxy_task() function
* Minor spelling and corrections suggested by Metin Kaya
* Dropped an added BUG_ON that was frequently tripped
v8:
* Fix issue if proxy_deactivate fails, we don't leave task
  BO_BLOCKED
* Switch to WARN_ON from BUG_ON checks
v9:
* Improve comments suggested by Metin
* Minor cleanups
v11:
* Previously we checked next==rq->idle && prev==rq->idle, but I
  think we only really care if next==rq->idle from find_proxy_task,
  as we will still want to resched regardless of what prev was.
v12:
* Commit message rework for selected -> donor rewording
v13:
* Address new delayed dequeue condition (deactivate donor for now)
* Next to donor renaming in find_proxy_task
* Improved comments for find_proxy_task
* Rework for proxy_deactivate cleanup
v14:
* Fix build error from __mutex_owner() with CONFIG_PREEMPT_RT
2024-12-13 10:01:53 -08:00
Peter Zijlstra
484044f3c6 FROMLIST: locking/mutex: Rework task_struct::blocked_on
Track the blocked-on relation for mutexes, to allow following this
relation at schedule time.

   task
     | blocked-on
     v
   mutex
     | owner
     v
   task

Also add a blocked_on_state value so we can distinguish when a
task is blocked_on a mutex, but is either blocked, waking up, or
runnable (such that it can try to acquire the lock its blocked
on).

This avoids some of the subtle & racy games where the blocked_on
state gets cleared, only to have it re-added by the
mutex_lock_slowpath call when it tries to acquire the lock on
wakeup

Also add blocked_lock to the task_struct so we can safely
serialize the blocked-on state.

Finally add wrappers that are useful to provide correctness
checks. Folded in from a patch by:
  Valentin Schneider <valentin.schneider@arm.com>

This all will be used for tracking blocked-task/mutex chains
with the prox-execution patch in a similar fashion to how
priority inheritance is done with rt_mutexes.

Cc: Joel Fernandes <joelaf@google.com>
Cc: Qais Yousef <qyousef@layalina.io>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ben Segall <bsegall@google.com>
Cc: Zimuzo Ezeozue <zezeozue@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Will Deacon <will@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Metin Kaya <Metin.Kaya@arm.com>
Cc: Xuewen Yan <xuewen.yan94@gmail.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: kernel-team@android.com
Change-Id: I3c88f64c5defe46b7f5ac468048d88dbbd2deb5e
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
[minor changes while rebasing]
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Connor O'Brien <connoro@google.com>
[jstultz: Fix blocked_on tracking in __mutex_lock_common in error paths]
Signed-off-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/lkml/20241125195204.2374458-3-jstultz@google.com/
Bug: 306081722
---
v2:
* Fixed blocked_on tracking in error paths that was causing crashes
v4:
* Ensure we clear blocked_on when waking ww_mutexes to die or wound.
  This is critical so we don't get circular blocked_on relationships
  that can't be resolved.
v5:
* Fix potential bug where the skip_wait path might clear blocked_on
  when that path never set it
* Slight tweaks to where we set blocked_on to make it consistent,
  along with extra WARN_ON correctness checking
* Minor comment changes
v7:
* Minor commit message change suggested by Metin Kaya
* Fix WARN_ON conditionals in unlock path (as blocked_on might already
  be cleared), found while looking at issue Metin Kaya raised.
* Minor tweaks to be consistent in what we do under the
  blocked_on lock, also tweaked variable name to avoid confusion
  with label, and comment typos, as suggested by Metin Kaya
* Minor tweak for CONFIG_SCHED_PROXY_EXEC name change
* Moved unused block of code to later in the series, as suggested
  by Metin Kaya
* Switch to a tri-state to be able to distinguish from waking and
  runnable so we can later safely do return migration from ttwu
* Folded together with related blocked_on changes
v8:
* Fix issue leaving task BO_BLOCKED when calling into optimistic
  spinning path.
* Include helper to better handle BO_BLOCKED->BO_WAKING transitions
v9:
* Typo fixup pointed out by Metin
* Cleanup BO_WAKING->BO_RUNNABLE transitions for the !proxy case
* Many cleanups and simplifications suggested by Metin
v11:
* Whitespace fixup pointed out by Metin
v13:
* Refactor set_blocked_on helpers clean things up a bit
v14:
* Small build fixup with PREEMPT_RT
2024-12-13 10:01:53 -08:00
John Stultz
ab70626ac8 FROMLIST: locking: rtmutex: Fix wake_q logic in task_blocks_on_rt_mutex
Anders had bisected a crash using PREEMPT_RT with linux-next and
isolated it down to commit 894d1b3db41c ("locking/mutex: Remove
wakeups from under mutex::wait_lock"), where it seemed the
wake_q structure was somehow getting corrupted causing a null
pointer traversal.

I was able to easily repoduce this with PREEMPT_RT and managed
to isolate down that through various call stacks we were
actually calling wake_up_q() twice on the same wake_q.

I found that in the problematic commit, I had added the
wake_up_q() call in task_blocks_on_rt_mutex() around
__ww_mutex_add_waiter(), following a similar pattern in
__mutex_lock_common().

However, its just wrong. We haven't dropped the lock->wait_lock,
so its contrary to the point of the original patch. And it
didn't match the __mutex_lock_common() logic of re-initializing
the wake_q after calling it midway in the stack.

Looking at it now, the wake_up_q() call is incorrect and should
just be removed. So drop the erronious logic I had added.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Joel Fernandes <joelaf@google.com>
Cc: Qais Yousef <qyousef@layalina.io>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Benjamin Segall <bsegall@google.com>
Cc: Zimuzo Ezeozue <zezeozue@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Will Deacon <will@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Metin Kaya <Metin.Kaya@arm.com>
Cc: Xuewen Yan <xuewen.yan94@gmail.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: kernel-team@android.com
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: regressions@lists.linux.dev
Cc: Thorsten Leemhuis <linux@leemhuis.info>
Cc: Anders Roxell <anders.roxell@linaro.org>
Fixes: 894d1b3db41c ("locking/mutex: Remove wakeups from under mutex::wait_lock")
Reported-by: Anders Roxell <anders.roxell@linaro.org>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/lkml/6afb936f-17c7-43fa-90e0-b9e780866097@app.fastmail.com/
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Reviewed-by: Juri Lelli <juri.lelli@redhat.com>
Change-Id: Ie420b80f4309e3d64c3fee56b3526e8314c0bc4c
Signed-off-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/lkml/20241120184625.3835422-1-jstultz@google.com/
2024-12-13 10:01:53 -08:00
xieliujie
7e4bce0e13 ANDROID: vendor_hooks: Add hooks for rwsem and mutex
Add hooks to apply oem's optimization of rwsem and mutex

Bug: 182237112
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I6332623732e2d6826b8b61087ca74e55393e0c3d
(cherry picked from commit 0902cc73b793f8b8cc2a80943d85d4ca9b98278b)
2024-11-08 14:23:37 +08:00
Liujie Xie
0fb2278c2a ANDROID: vendor_hooks: Add hooks for rwsem and mutex
Add hooks to apply oem's optimization of rwsem and mutex

Bug: 182237112
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit 80b4341d0520dce2ef1e33aef06c6a2bc8ada518)

Change-Id: I36895c432e5b6d6bff8781b4a7872badb693284c
Signed-off-by: Carlos Llamas <cmllamas@google.com>
[cmllamas: completes the cherry-pick of original commit 80b4341d0520
since commit 0902cc73b793 was only partial]
Signed-off-by: Jing Xia <jing.xia@unisoc.com>
2024-11-08 14:23:12 +08:00
Jing Xia
c75073626f ANDROID: vendor_hooks: Add android_vh_rwsem_downgrade_wake_finish to rwsem_downgrade_wake
The commit d4528a28cb5b ("ANDROID: vendor_hooks: Add hooks for
rwsem and mutex") adds the android_vh_rwsem_wake_finish hook to
rwsem_wake().It can get the point when a [write/read]_owner
releases the rwsem and wakes up other waiters of the rwsem.
However, it cannot cover a scenario that a task acquires the
write-lock first, then downgrades to the read-lock and wakes up
other waiters in list.

In order to avoid breaking other partner handlers that don't
expect to be called from rwsem_downgrade_wake,this patch adds
a new vendor hook named android_vh_rwsem_downgrade_wake_finish
to rwsem_downgrade_wake() as Todd Kjos suggested.

Bug: 319178409
Change-Id: I73f677d2aa813777f21f13fafc17b1f912f6ef7e
Signed-off-by: Jing Xia <jing.xia@unisoc.com>
(cherry picked from commit 6ac0a2682b5f958c7204506e58b67ffebb06ad85)
2024-11-08 14:22:43 +08:00
JianMin Liu
78cf7a145c ANDROID: rwsem: Add vendor hook to the rw-semaphore
Add the hook to apply vendor's performance tune for owner
of rwsem.

Add the hook for the waiter list of rwsem to allow
vendor perform waiting queue enhancement

ANDROID_VENDOR_DATA added to rw_semaphore

Bug: 319399115

Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
Signed-off-by: Guanwun Chen <guan-wun.chen@mediatek.com>
Change-Id: I007a5e26f3db2adaeaf4e5ccea414ce7abfa83b8
2024-11-08 14:22:15 +08:00
Sangmoon Kim
fb27e5d8ba ANDROID: Re-apply vendor hooks for information of blocked tasks
This reverts commit 66330b896c (Revert "ANDROID: vendor_hooks:
add waiting information for blocked tasks")

The original patch has been reverted to resolve merge issues
with 5.18-rc1. This patch adds again the vendor hooks for the
original purpose.

Bug: 271799327

Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: I86b9b7dd553b7b6a5930ace6280ecd66dc5dc4df
2024-11-08 14:21:50 +08:00
Juri Lelli
5931af987a FROMGIT: locking/mutex: Expose __mutex_owner()
Implementing proxy execution requires that scheduler code be able to
identify the current owner of a mutex. Expose __mutex_owner() for
this purpose (alone!). Includes a null mutex check, so that users
of the function can be simplified.

[Removed the EXPORT_SYMBOL]
[jstultz: Reworked per Peter's suggestions]
Change-Id: I466df3a09e80ff1c200442a750dbead0af75bd8c
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Connor O'Brien <connoro@google.com>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Metin Kaya <metin.kaya@arm.com>
Reviewed-by: Valentin Schneider <vschneid@redhat.com>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Tested-by: Metin Kaya <metin.kaya@arm.com>
Link: https://lore.kernel.org/r/20241009235352.1614323-4-jstultz@google.com
(cherry picked from commit 3a9320ecb06c6c5ca5a8a595717e5186b5f20141
 git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core)
Signed-off-by: John Stultz <jstultz@google.com>
2024-11-01 21:23:36 +00:00
Juri Lelli
0113285055 FROMGIT: locking/mutex: Make mutex::wait_lock irq safe
With the proxy-execution series, we traverse the task->mutex->task
blocked_on/owner chain in the scheduler core. We do this while holding
the rq::lock to keep the structures in place while taking and
releasing the alternating lock types.

Since the mutex::wait_lock is one of the locks we will take in this
way under the rq::lock in the scheduler core, we need to make sure
that its usage elsewhere is irq safe.

[rebase & fix {un,}lock_wait_lock helpers in ww_mutex.h]
Change-Id: Ie1b24bf547d91799cc036045ca6c8bea8617bf12
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Connor O'Brien <connoro@google.com>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Metin Kaya <metin.kaya@arm.com>
Reviewed-by: Valentin Schneider <vschneid@redhat.com>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Tested-by: Metin Kaya <metin.kaya@arm.com>
Link: https://lore.kernel.org/r/20241009235352.1614323-3-jstultz@google.com
(cherry picked from commit 5ec58525a1f1bd6ca8ea778e9df55cd82bc02e11
 git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core)
Signed-off-by: John Stultz <jstultz@google.com>
2024-11-01 21:23:36 +00:00
Peter Zijlstra
7e976b57de FROMGIT: locking/mutex: Remove wakeups from under mutex::wait_lock
In preparation to nest mutex::wait_lock under rq::lock we need
to remove wakeups from under it.

Do this by utilizing wake_qs to defer the wakeup until after the
lock is dropped.

[Heavily changed after 55f036ca7e ("locking: WW mutex cleanup") and
08295b3b5b ("locking: Implement an algorithm choice for Wound-Wait
mutexes")]
[jstultz: rebased to mainline, added extra wake_up_q & init
 to avoid hangs, similar to Connor's rework of this patch]

Change-Id: I049a6282d1a1304f9f37de12034c88ed8c0a6cde
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Metin Kaya <metin.kaya@arm.com>
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Tested-by: Metin Kaya <metin.kaya@arm.com>
Link: https://lore.kernel.org/r/20241009235352.1614323-2-jstultz@google.com
(cherry picked from commit 894d1b3db41cf7e6ae0304429a1747b3c3f390bc
 git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core)
Signed-off-by: John Stultz <jstultz@google.com>
2024-11-01 21:23:36 +00:00
Linus Torvalds
ec03de73b1 Merge tag 'locking-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking updates from Ingo Molnar:
 "lockdep:
    - Fix potential deadlock between lockdep and RCU (Zhiguo Niu)
    - Use str_plural() to address Coccinelle warning (Thorsten Blum)
    - Add debuggability enhancement (Luis Claudio R. Goncalves)

  static keys & calls:
    - Fix static_key_slow_dec() yet again (Peter Zijlstra)
    - Handle module init failure correctly in static_call_del_module()
      (Thomas Gleixner)
    - Replace pointless WARN_ON() in static_call_module_notify() (Thomas
      Gleixner)

  <linux/cleanup.h>:
    - Add usage and style documentation (Dan Williams)

  rwsems:
    - Move is_rwsem_reader_owned() and rwsem_owner() under
      CONFIG_DEBUG_RWSEMS (Waiman Long)

  atomic ops, x86:
    - Redeclare x86_32 arch_atomic64_{add,sub}() as void (Uros Bizjak)
    - Introduce the read64_nonatomic macro to x86_32 with cx8 (Uros
      Bizjak)"

Signed-off-by: Ingo Molnar <mingo@kernel.org>

* tag 'locking-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/rwsem: Move is_rwsem_reader_owned() and rwsem_owner() under CONFIG_DEBUG_RWSEMS
  jump_label: Fix static_key_slow_dec() yet again
  static_call: Replace pointless WARN_ON() in static_call_module_notify()
  static_call: Handle module init failure correctly in static_call_del_module()
  locking/lockdep: Simplify character output in seq_line()
  lockdep: fix deadlock issue between lockdep and rcu
  lockdep: Use str_plural() to fix Coccinelle warning
  cleanup: Add usage and style documentation
  lockdep: suggest the fix for "lockdep bfs error:-1" on print_bfs_bug
  locking/atomic/x86: Redeclare x86_32 arch_atomic64_{add,sub}() as void
  locking/atomic/x86: Introduce the read64_nonatomic macro to x86_32 with cx8
2024-09-29 08:51:30 -07:00
Ingo Molnar
ae39e0bd15 Merge branch 'locking/core' into locking/urgent, to pick up pending commits
Merge all pending locking commits into a single branch.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2024-09-29 08:57:18 +02:00
Linus Torvalds
7856a56541 Merge tag 'mm-nonmm-stable-2024-09-21-07-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull non-MM updates from Andrew Morton:
 "Many singleton patches - please see the various changelogs for
  details.

  Quite a lot of nilfs2 work this time around.

  Notable patch series in this pull request are:

   - "mul_u64_u64_div_u64: new implementation" by Nicolas Pitre, with
     assistance from Uwe Kleine-König. Reimplement mul_u64_u64_div_u64()
     to provide (much) more accurate results. The current implementation
     was causing Uwe some issues in the PWM drivers.

   - "xz: Updates to license, filters, and compression options" from
     Lasse Collin. Miscellaneous maintenance and kinor feature work to
     the xz decompressor.

   - "Fix some GDB command error and add some GDB commands" from
     Kuan-Ying Lee. Fixes and enhancements to the gdb scripts.

   - "treewide: add missing MODULE_DESCRIPTION() macros" from Jeff
     Johnson. Adds lots of MODULE_DESCRIPTIONs, thus fixing lots of
     warnings about this.

   - "nilfs2: add support for some common ioctls" from Ryusuke Konishi.
     Adds various commonly-available ioctls to nilfs2.

   - "This series fixes a number of formatting issues in kernel doc
     comments" from Ryusuke Konishi does that.

   - "nilfs2: prevent unexpected ENOENT propagation" from Ryusuke
     Konishi. Fix issues where -ENOENT was being unintentionally and
     inappropriately returned to userspace.

   - "nilfs2: assorted cleanups" from Huang Xiaojia.

   - "nilfs2: fix potential issues with empty b-tree nodes" from Ryusuke
     Konishi fixes some issues which can occur on corrupted nilfs2
     filesystems.

   - "scripts/decode_stacktrace.sh: improve error reporting and
     usability" from Luca Ceresoli does those things"

* tag 'mm-nonmm-stable-2024-09-21-07-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (103 commits)
  list: test: increase coverage of list_test_list_replace*()
  list: test: fix tests for list_cut_position()
  proc: use __auto_type more
  treewide: correct the typo 'retun'
  ocfs2: cleanup return value and mlog in ocfs2_global_read_info()
  nilfs2: remove duplicate 'unlikely()' usage
  nilfs2: fix potential oob read in nilfs_btree_check_delete()
  nilfs2: determine empty node blocks as corrupted
  nilfs2: fix potential null-ptr-deref in nilfs_btree_insert()
  user_namespace: use kmemdup_array() instead of kmemdup() for multiple allocation
  tools/mm: rm thp_swap_allocator_test when make clean
  squashfs: fix percpu address space issues in decompressor_multi_percpu.c
  lib: glob.c: added null check for character class
  nilfs2: refactor nilfs_segctor_thread()
  nilfs2: use kthread_create and kthread_stop for the log writer thread
  nilfs2: remove sc_timer_task
  nilfs2: do not repair reserved inode bitmap in nilfs_new_inode()
  nilfs2: eliminate the shared counter and spinlock for i_generation
  nilfs2: separate inode type information from i_state field
  nilfs2: use the BITS_PER_LONG macro
  ...
2024-09-21 08:20:50 -07:00
Linus Torvalds
2004cef11e Merge tag 'sched-core-2024-09-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler updates from Ingo Molnar:

 - Implement the SCHED_DEADLINE server infrastructure - Daniel Bristot
   de Oliveira's last major contribution to the kernel:

     "SCHED_DEADLINE servers can help fixing starvation issues of low
      priority tasks (e.g., SCHED_OTHER) when higher priority tasks
      monopolize CPU cycles. Today we have RT Throttling; DEADLINE
      servers should be able to replace and improve that."

   (Daniel Bristot de Oliveira, Peter Zijlstra, Joel Fernandes, Youssef
   Esmat, Huang Shijie)

 - Preparatory changes for sched_ext integration:
     - Use set_next_task(.first) where required
     - Fix up set_next_task() implementations
     - Clean up DL server vs. core sched
     - Split up put_prev_task_balance()
     - Rework pick_next_task()
     - Combine the last put_prev_task() and the first set_next_task()
     - Rework dl_server
     - Add put_prev_task(.next)

   (Peter Zijlstra, with a fix by Tejun Heo)

 - Complete the EEVDF transition and refine EEVDF scheduling:
     - Implement delayed dequeue
     - Allow shorter slices to wakeup-preempt
     - Use sched_attr::sched_runtime to set request/slice suggestion
     - Document the new feature flags
     - Remove unused and duplicate-functionality fields
     - Simplify & unify pick_next_task_fair()
     - Misc debuggability enhancements

   (Peter Zijlstra, with fixes/cleanups by Dietmar Eggemann, Valentin
   Schneider and Chuyi Zhou)

 - Initialize the vruntime of a new task when it is first enqueued,
   resulting in significant decrease in latency of newly woken tasks
   (Zhang Qiao)

 - Introduce SM_IDLE and an idle re-entry fast-path in __schedule()
   (K Prateek Nayak, Peter Zijlstra)

 - Clean up and clarify the usage of Clean up usage of rt_task()
   (Qais Yousef)

 - Preempt SCHED_IDLE entities in strict cgroup hierarchies
   (Tianchen Ding)

 - Clarify the documentation of time units for deadline scheduler
   parameters (Christian Loehle)

 - Remove the HZ_BW chicken-bit feature flag introduced a year ago,
   the original change seems to be working fine (Phil Auld)

 - Misc fixes and cleanups (Chen Yu, Dan Carpenter, Huang Shijie,
   Peilin He, Qais Yousefm and Vincent Guittot)

* tag 'sched-core-2024-09-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (64 commits)
  sched/cpufreq: Use NSEC_PER_MSEC for deadline task
  cpufreq/cppc: Use NSEC_PER_MSEC for deadline task
  sched/deadline: Clarify nanoseconds in uapi
  sched/deadline: Convert schedtool example to chrt
  sched/debug: Fix the runnable tasks output
  sched: Fix sched_delayed vs sched_core
  kernel/sched: Fix util_est accounting for DELAY_DEQUEUE
  kthread: Fix task state in kthread worker if being frozen
  sched/pelt: Use rq_clock_task() for hw_pressure
  sched/fair: Move effective_cpu_util() and effective_cpu_util() in fair.c
  sched/core: Introduce SM_IDLE and an idle re-entry fast-path in __schedule()
  sched: Add put_prev_task(.next)
  sched: Rework dl_server
  sched: Combine the last put_prev_task() and the first set_next_task()
  sched: Rework pick_next_task()
  sched: Split up put_prev_task_balance()
  sched: Clean up DL server vs core sched
  sched: Fixup set_next_task() implementations
  sched: Use set_next_task(.first) where required
  sched/fair: Properly deactivate sched_delayed task upon class change
  ...
2024-09-19 15:55:58 +02:00
Linus Torvalds
c903327d32 Merge tag 'printk-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk updates from Petr Mladek:
 "This is the "last" part of the support for the new nbcon consoles.
  Where "nbcon" stays for "No Big console lock CONsoles" aka not under
  the console_lock.

  New callbacks are added to struct console:

   - write_thread() for flushing nbcon consoles in task context.

   - write_atomic() for flushing nbcon consoles in atomic context,
     including NMI.

   - con->device_lock() and device_unlock() for taking the driver
     specific lock, for example, port->lock.

  New printk-specific kthreads are created:

   - per-console kthreads which get responsible for flushing normal
     priority messages on nbcon consoles.

   - thread which gets responsible for flushing normal priority messages
     on all consoles when CONFIG_RT enabled.

  The new callbacks are called under a special per-console lock which
  has already been added back in v6.7. It allows to distinguish three
  severities: normal, emergency, and panic. A context with a higher
  priority could take over the ownership when it is safe even in the
  middle of handling a record. The panic context could do it even when
  it is not safe. But it is allowed only for the final desperate flush
  before entering the infinite loop.

  The new lock helps to flush the messages directly in emergency and
  panic contexts. But it is not enough in all situations:

   - console_lock() is still need for synchronization against boot
     consoles.

   - con->device_lock() is need for synchronization against other
     operations on the same HW, e.g. serial port speed setting,
     non-printk related read/write.

  The dependency on con->device_lock() is mutual. Any code taking the
  driver specific lock has to acquire the related nbcon console context
  as well. For example, see the new uart_port_lock() API. It provides
  the necessary synchronization against emergency and panic contexts
  where the messages are flushed only under the new per-console lock.

  Maybe surprisingly, a quite tricky part is the decision how to flush
  the consoles in various situations. It has to take into account:

   - message priority:    normal, emergency, panic

   - scheduling context:  task, atomic, deferred_legacy

   - registered consoles: boot, legacy, nbcon

   - threads are running: early boot, suspend, shutdown, panic

   - caller:              printk(), pr_flush(), printk_flush_in_panic(),
                          console_unlock(), console_start(), ...

  The primary decision is made in printk_get_console_flush_type(). It
  creates a hint what the caller should do:

   - flush nbcon consoles directly or via the kthread

   - call the legacy loop (console_unlock()) directly or via irq_work

  The existing behavior is preserved for the legacy consoles. The only
  exception is that they are not longer flushed directly from printk()
  in panic() before CPUs are stopped. But this blocking happens only
  when at least one nbcon console is registered. The motivation is to
  increase a chance to produce the crash dump. They legacy consoles
  might create a deadlock in compare with nbcon consoles. The nbcon
  console should allow to see the messages even when the crash dump
  fails.

  There are three possible ways how nbcon consoles are flushed:

   - The per-nbcon-console kthread is responsible for flushing messages
     added with the normal priority. This is the default mode.

   - The legacy loop, aka console_unlock(), is used when there is still
     a boot console registered. There is no easy way how to match an
     early console driver with a nbcon console driver. And the
     console_lock() provides the only reliable serialization at the
     moment.

     The legacy loop uses either con->write_atomic() or
     con->write_thread() callbacks depending on whether it is allowed to
     schedule. The atomic variant has to be used from printk().

   - In other situations, the messages are flushed directly using
     write_atomic() which can be called in any context, including NMI.
     It is primary needed during early boot or shutdown, in emergency
     situations, and panic.

  The emergency priority is used by a code called within
  nbcon_cpu_emergency_enter()/exit(). At the moment, it is used in four
  situations: WARN(), Oops, lockdep, and RCU stall reports.

  Finally, there is no nbcon console at the moment. It means that the
  changes should _not_ modify the existing behavior. The only exception
  is CONFIG_RT which would force offloading the legacy loop, for normal
  priority context, into the dedicated kthread"

* tag 'printk-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: (54 commits)
  printk: Avoid false positive lockdep report for legacy printing
  printk: nbcon: Assign nice -20 for printing threads
  printk: Implement legacy printer kthread for PREEMPT_RT
  tty: sysfs: Add nbcon support for 'active'
  proc: Add nbcon support for /proc/consoles
  proc: consoles: Add notation to c_start/c_stop
  printk: nbcon: Show replay message on takeover
  printk: Provide helper for message prepending
  printk: nbcon: Rely on kthreads for normal operation
  printk: nbcon: Use thread callback if in task context for legacy
  printk: nbcon: Relocate nbcon_atomic_emit_one()
  printk: nbcon: Introduce printer kthreads
  printk: nbcon: Init @nbcon_seq to highest possible
  printk: nbcon: Add context to usable() and emit()
  printk: Flush console on unregister_console()
  printk: Fail pr_flush() if before SYSTEM_SCHEDULING
  printk: nbcon: Add function for printers to reacquire ownership
  printk: nbcon: Use raw_cpu_ptr() instead of open coding
  printk: Use the BITS_PER_LONG macro
  lockdep: Mark emergency sections in lockdep splats
  ...
2024-09-17 08:52:28 +02:00
Waiman Long
d00b83d416 locking/rwsem: Move is_rwsem_reader_owned() and rwsem_owner() under CONFIG_DEBUG_RWSEMS
Both is_rwsem_reader_owned() and rwsem_owner() are currently only used when
CONFIG_DEBUG_RWSEMS is defined. This causes a compilation error with clang
when `make W=1` and CONFIG_WERROR=y:

kernel/locking/rwsem.c:187:20: error: unused function 'is_rwsem_reader_owned' [-Werror,-Wunused-function]
  187 | static inline bool is_rwsem_reader_owned(struct rw_semaphore *sem)
      |                    ^~~~~~~~~~~~~~~~~~~~~
kernel/locking/rwsem.c:271:35: error: unused function 'rwsem_owner' [-Werror,-Wunused-function]
  271 | static inline struct task_struct *rwsem_owner(struct rw_semaphore *sem)
      |                                   ^~~~~~~~~~~

Fix this by moving these two functions under the CONFIG_DEBUG_RWSEMS define.

Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240909182905.161156-1-longman@redhat.com
2024-09-10 12:02:33 +02:00
Jeff Johnson
588661fd87 locking/ww_mutex/test: add MODULE_DESCRIPTION()
Fix the 'make W=1' warning:
WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/locking/test-ww_mutex.o

Link: https://lkml.kernel.org/r/20240730-module_description_orphans-v1-5-7094088076c8@quicinc.com
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: Waiman Long <longman@redhat.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Alistar Popple <alistair@popple.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Eddie James <eajames@linux.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jeremy Kerr <jk@ozlabs.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Karol Herbst <karolherbst@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Naveen N Rao <naveen@kernel.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Nouveau <nouveau@lists.freedesktop.org>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-09-01 20:43:31 -07:00
John Ogness
59cd94ef80 lockdep: Mark emergency sections in lockdep splats
Mark emergency sections wherever multiple lines of
lock debugging output are generated. In an emergency
section, every printk() call will attempt to directly
flush to the consoles using the EMERGENCY priority.

Note that debug_show_all_locks() and
lockdep_print_held_locks() rely on their callers to
enter the emergency section. This is because these
functions can also be called in non-emergency
situations (such as sysrq).

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240820063001.36405-36-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
2024-08-21 15:03:04 +02:00
Roland Xu
d33d26036a rtmutex: Drop rt_mutex::wait_lock before scheduling
rt_mutex_handle_deadlock() is called with rt_mutex::wait_lock held.  In the
good case it returns with the lock held and in the deadlock case it emits a
warning and goes into an endless scheduling loop with the lock held, which
triggers the 'scheduling in atomic' warning.

Unlock rt_mutex::wait_lock in the dead lock case before issuing the warning
and dropping into the schedule for ever loop.

[ tglx: Moved unlock before the WARN(), removed the pointless comment,
  	massaged changelog, added Fixes tag ]

Fixes: 3d5c9340d1 ("rtmutex: Handle deadlock detection smarter")
Signed-off-by: Roland Xu <mu001999@outlook.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/ME0P300MB063599BEF0743B8FA339C2CECC802@ME0P300MB0635.AUSP300.PROD.OUTLOOK.COM
2024-08-15 15:38:53 +02:00
Linus Torvalds
b3f5620f76 Merge tag 'bcachefs-2024-08-08' of git://evilpiepirate.org/bcachefs
Pull bcachefs fixes from Kent Overstreet:
 "Assorted little stuff:

   - lockdep fixup for lockdep_set_notrack_class()

   - we can now remove a device when using erasure coding without
     deadlocking, though we still hit other issues

   - the 'allocator stuck' timeout is now configurable, and messages are
     ratelimited. The default timeout has been increased from 10 seconds
     to 30"

* tag 'bcachefs-2024-08-08' of git://evilpiepirate.org/bcachefs:
  bcachefs: Use bch2_wait_on_allocator() in btree node alloc path
  bcachefs: Make allocator stuck timeout configurable, ratelimit messages
  bcachefs: Add missing path_traverse() to btree_iter_next_node()
  bcachefs: ec should not allocate from ro devs
  bcachefs: Improved allocator debugging for ec
  bcachefs: Add missing bch2_trans_begin() call
  bcachefs: Add a comment for bucket helper types
  bcachefs: Don't rely on implicit unsigned -> signed integer conversion
  lockdep: Fix lockdep_set_notrack_class() for CONFIG_LOCK_STAT
  bcachefs: Fix double free of ca->buckets_nouse
2024-08-08 13:27:31 -07:00
Qais Yousef
ae04f69de0 sched/rt: Rename realtime_{prio, task}() to rt_or_dl_{prio, task}()
Some find the name realtime overloaded. Use rt_or_dl() as an
alternative, hopefully better, name.

Suggested-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Signed-off-by: Qais Yousef <qyousef@layalina.io>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240610192018.1567075-4-qyousef@layalina.io
2024-08-07 18:32:38 +02:00
Qais Yousef
130fd056dd sched/rt: Clean up usage of rt_task()
rt_task() checks if a task has RT priority. But depends on your
dictionary, this could mean it belongs to RT class, or is a 'realtime'
task, which includes RT and DL classes.

Since this has caused some confusion already on discussion [1], it
seemed a clean up is due.

I define the usage of rt_task() to be tasks that belong to RT class.
Make sure that it returns true only for RT class and audit the users and
replace the ones required the old behavior with the new realtime_task()
which returns true for RT and DL classes. Introduce similar
realtime_prio() to create similar distinction to rt_prio() and update
the users that required the old behavior to use the new function.

Move MAX_DL_PRIO to prio.h so it can be used in the new definitions.

Document the functions to make it more obvious what is the difference
between them. PI-boosted tasks is a factor that must be taken into
account when choosing which function to use.

Rename task_is_realtime() to realtime_task_policy() as the old name is
confusing against the new realtime_task().

No functional changes were intended.

[1] https://lore.kernel.org/lkml/20240506100509.GL40213@noisy.programming.kicks-ass.net/

Signed-off-by: Qais Yousef <qyousef@layalina.io>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Phil Auld <pauld@redhat.com>
Reviewed-by: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20240610192018.1567075-2-qyousef@layalina.io
2024-08-07 18:32:37 +02:00
Kent Overstreet
ff9bf4b341 lockdep: Fix lockdep_set_notrack_class() for CONFIG_LOCK_STAT
We won't find a contended lock if it's not being tracked.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-08-07 08:31:10 -04:00
Markus Elfring
39dea484e2 locking/lockdep: Simplify character output in seq_line()
Single characters should be put into a sequence.
Thus use the corresponding function “seq_putc” for one selected call.

This issue was transformed by using the Coccinelle software.

Suggested-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/e346d688-7b01-462f-867c-ba52b7790d19@web.de
2024-08-06 10:46:43 -07:00
Zhiguo Niu
a6f88ac32c lockdep: fix deadlock issue between lockdep and rcu
There is a deadlock scenario between lockdep and rcu when
rcu nocb feature is enabled, just as following call stack:

     rcuop/x
-000|queued_spin_lock_slowpath(lock = 0xFFFFFF817F2A8A80, val = ?)
-001|queued_spin_lock(inline) // try to hold nocb_gp_lock
-001|do_raw_spin_lock(lock = 0xFFFFFF817F2A8A80)
-002|__raw_spin_lock_irqsave(inline)
-002|_raw_spin_lock_irqsave(lock = 0xFFFFFF817F2A8A80)
-003|wake_nocb_gp_defer(inline)
-003|__call_rcu_nocb_wake(rdp = 0xFFFFFF817F30B680)
-004|__call_rcu_common(inline)
-004|call_rcu(head = 0xFFFFFFC082EECC28, func = ?)
-005|call_rcu_zapped(inline)
-005|free_zapped_rcu(ch = ?)// hold graph lock
-006|rcu_do_batch(rdp = 0xFFFFFF817F245680)
-007|nocb_cb_wait(inline)
-007|rcu_nocb_cb_kthread(arg = 0xFFFFFF817F245680)
-008|kthread(_create = 0xFFFFFF80803122C0)
-009|ret_from_fork(asm)

     rcuop/y
-000|queued_spin_lock_slowpath(lock = 0xFFFFFFC08291BBC8, val = 0)
-001|queued_spin_lock()
-001|lockdep_lock()
-001|graph_lock() // try to hold graph lock
-002|lookup_chain_cache_add()
-002|validate_chain()
-003|lock_acquire
-004|_raw_spin_lock_irqsave(lock = 0xFFFFFF817F211D80)
-005|lock_timer_base(inline)
-006|mod_timer(inline)
-006|wake_nocb_gp_defer(inline)// hold nocb_gp_lock
-006|__call_rcu_nocb_wake(rdp = 0xFFFFFF817F2A8680)
-007|__call_rcu_common(inline)
-007|call_rcu(head = 0xFFFFFFC0822E0B58, func = ?)
-008|call_rcu_hurry(inline)
-008|rcu_sync_call(inline)
-008|rcu_sync_func(rhp = 0xFFFFFFC0822E0B58)
-009|rcu_do_batch(rdp = 0xFFFFFF817F266680)
-010|nocb_cb_wait(inline)
-010|rcu_nocb_cb_kthread(arg = 0xFFFFFF817F266680)
-011|kthread(_create = 0xFFFFFF8080363740)
-012|ret_from_fork(asm)

rcuop/x and rcuop/y are rcu nocb threads with the same nocb gp thread.
This patch release the graph lock before lockdep call_rcu.

Fixes: a0b0fd53e1 ("locking/lockdep: Free lock classes that are no longer in use")
Cc: stable@vger.kernel.org
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Waiman Long <longman@redhat.com>
Cc: Carlos Llamas <cmllamas@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Reviewed-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/20240620225436.3127927-1-cmllamas@google.com
2024-08-06 10:46:42 -07:00