diff options
| author | Adrian Calianu <adrian.calianu@enea.com> | 2021-05-11 09:42:24 +0200 |
|---|---|---|
| committer | Adrian Calianu <Adrian.Calianu@enea.com> | 2021-05-12 21:56:14 +0100 |
| commit | c6e89e8a31eeeb82c5711cba8235e7e55d9be6a8 (patch) | |
| tree | 93a3d96c027a437fc9b168d07ab2ad62248d77d1 /patches/boot_time_opt/0122-locking-rwsem-spin-faster.patch | |
| parent | 7a93e54032bb148a92e16b59736a1b76fedae319 (diff) | |
| download | enea-kernel-cache-c6e89e8a31eeeb82c5711cba8235e7e55d9be6a8.tar.gz | |
boot_time_opt: update patches to 5.10 kernel
Patches used in boot time optimization are coming from
clearlinux distribution. Update patches correspuding to 5.10
kernel: https://github.com/clearlinux-pkgs/linux/tree/5.10.32-1034
We selected a list of patches from ClearLinux. Those we have
considered risky, unknown impact on functionality have been
avoided.
Change-Id: If01459292a5a383b49944645bd8536d9a62d9de3
Signed-off-by: Adrian Calianu <adrian.calianu@enea.com>
Diffstat (limited to 'patches/boot_time_opt/0122-locking-rwsem-spin-faster.patch')
| -rw-r--r-- | patches/boot_time_opt/0122-locking-rwsem-spin-faster.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/patches/boot_time_opt/0122-locking-rwsem-spin-faster.patch b/patches/boot_time_opt/0122-locking-rwsem-spin-faster.patch new file mode 100644 index 0000000..b2d76ae --- /dev/null +++ b/patches/boot_time_opt/0122-locking-rwsem-spin-faster.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
| 3 | Date: Sun, 18 Feb 2018 23:35:41 +0000 | ||
| 4 | Subject: [PATCH] locking: rwsem: spin faster | ||
| 5 | |||
| 6 | tweak rwsem owner spinning a bit | ||
| 7 | --- | ||
| 8 | kernel/locking/rwsem.c | 4 +++- | ||
| 9 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c | ||
| 12 | index a163542d178e..a2a11ccebb58 100644 | ||
| 13 | --- a/kernel/locking/rwsem.c | ||
| 14 | +++ b/kernel/locking/rwsem.c | ||
| 15 | @@ -717,6 +717,7 @@ rwsem_spin_on_owner(struct rw_semaphore *sem, unsigned long nonspinnable) | ||
| 16 | struct task_struct *new, *owner; | ||
| 17 | unsigned long flags, new_flags; | ||
| 18 | enum owner_state state; | ||
| 19 | + int i = 0; | ||
| 20 | |||
| 21 | owner = rwsem_owner_flags(sem, &flags); | ||
| 22 | state = rwsem_owner_state(owner, flags, nonspinnable); | ||
| 23 | @@ -750,7 +751,8 @@ rwsem_spin_on_owner(struct rw_semaphore *sem, unsigned long nonspinnable) | ||
| 24 | break; | ||
| 25 | } | ||
| 26 | |||
| 27 | - cpu_relax(); | ||
| 28 | + if (i++ > 1000) | ||
| 29 | + cpu_relax(); | ||
| 30 | } | ||
| 31 | rcu_read_unlock(); | ||
| 32 | |||
| 33 | -- | ||
| 34 | https://clearlinux.org | ||
| 35 | |||
