xieliujie
403d5d1318
ANDROID: vendor_hook: Avoid clearing protect-flag before waking waiters
...
With hooks below, we can mark a lock-owned thread with an identifiable flag, which can protect it from being preempted by some other unimportant threads, and then waiter will be wakeup more quickly.
https://android-review.googlesource.com/c/kernel/common/+/2183353
but now we find an issue like this one:
static inline void __up_write(struct rw_semaphore *sem)
{
...
// Step 1. we clear flag.
trace_android_vh_record_rwsem_lock_starttime(current, 0);
// Step 2. owner may be preempted by unimportant threads.
rwsem_clear_owner(sem);
...
// Step 3. wake up waiter, but it's too later.
if (unlikely(tmp & RWSEM_FLAG_WAITERS))
rwsem_wake(sem);
}
This patch will clear protect-flag after waking up waiters.
Bug: 286024926
Change-Id: I71f8b6a7d8a01336fd36b8267c2cb5edab65bd11
Signed-off-by: xieliujie <xieliujie@oppo.com >
2023-06-07 06:36:55 +00:00
..
2022-12-19 12:27:32 +01:00
2022-12-02 17:40:03 +01:00
2023-01-14 10:15:58 +01:00
2022-12-08 16:39:44 +00:00
2023-02-06 12:30:05 +00:00
2022-11-25 17:45:41 +01:00
2023-02-17 12:18:56 +00:00
2023-01-14 10:15:11 +01:00
2023-01-14 10:16:44 +01:00
2023-04-24 21:01:02 +00:00
2023-03-29 20:05:47 +00:00
2023-03-22 11:21:35 +00:00
2022-12-02 08:40:37 +00:00
2022-12-14 13:11:31 +01:00
2023-02-17 12:18:56 +00:00
2023-01-20 00:46:19 +00:00
2023-01-14 10:15:19 +01:00
2023-02-15 15:00:47 +00:00
2022-11-16 14:48:59 +00:00
2023-01-14 10:16:50 +01:00
2023-02-07 13:38:13 +00:00
2023-02-07 13:38:09 +00:00
2023-03-31 19:23:38 +00:00
2023-02-07 13:38:08 +00:00
2023-02-07 13:38:09 +00:00
2023-03-24 16:03:04 +00:00
2022-11-29 23:38:14 +00:00
2023-03-24 16:45:49 +00:00
2023-02-06 12:30:05 +00:00
2023-02-25 15:32:12 +00:00
2023-01-14 10:16:13 +01:00
2023-03-11 16:40:00 +01:00
2023-02-06 12:30:05 +00:00
2023-02-07 13:38:16 +00:00
2023-03-24 14:42:30 +00:00
2023-03-17 08:45:07 +01:00
2023-03-24 16:00:51 +00:00
2023-01-20 00:46:19 +00:00
2023-01-20 00:46:19 +00:00
2023-01-20 00:46:19 +00:00
2023-03-11 16:39:19 +01:00
2023-03-22 11:21:35 +00:00
2023-03-11 16:39:59 +01:00
2023-01-14 10:16:44 +01:00
2022-12-14 11:31:59 +01:00
2023-01-06 13:07:18 -08:00
2022-11-16 14:48:59 +00:00
2023-02-07 13:38:08 +00:00
2023-02-07 13:38:16 +00:00
2023-03-24 16:03:04 +00:00
2023-03-11 16:39:38 +01:00
2023-02-25 11:55:03 +01:00
2023-04-05 11:23:36 +02:00
2023-01-14 10:16:25 +01:00
2023-03-03 12:54:35 +00:00
2023-04-17 12:29:53 +00:00
2023-03-23 13:28:36 -07:00
2023-03-24 14:42:30 +00:00
2023-03-23 14:44:08 +00:00
2023-06-07 06:36:55 +00:00
2023-01-20 00:46:19 +00:00
2023-01-14 10:15:28 +01:00
2023-03-22 11:01:45 +00:00
2023-03-24 10:32:49 +00:00
2023-03-17 16:30:15 +00:00
2022-11-25 17:45:49 +01:00
2023-05-11 12:39:32 +00:00
2023-02-07 13:38:16 +00:00
2022-11-16 09:56:13 +00:00
2022-12-01 10:33:35 +00:00
2023-03-22 13:30:02 +01:00
2023-02-06 12:30:05 +00:00
2023-01-20 00:46:19 +00:00
2023-02-07 13:38:09 +00:00
2022-11-25 17:45:54 +01:00
2023-02-22 12:55:53 +01:00
2023-02-07 13:38:15 +00:00
2023-02-01 08:23:18 +01:00
2023-02-07 13:38:15 +00:00
2022-11-16 11:12:23 +00:00
2023-01-14 10:15:16 +01:00
2023-01-18 11:44:52 +01:00
2023-02-07 13:38:13 +00:00
2023-03-24 16:03:04 +00:00
2023-03-11 16:39:51 +01:00
2023-02-07 13:38:07 +00:00
2023-02-01 08:23:23 +01:00
2023-02-16 16:43:59 +00:00
2023-02-15 17:22:10 +01:00
2023-02-09 18:53:48 +00:00
2022-12-21 19:06:10 +00:00