aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorShrikanth Hegde <sshegde@linux.ibm.com>2024-11-17 00:53:06 +0530
committerMadhavan Srinivasan <maddy@linux.ibm.com>2024-12-19 14:21:08 +0530
commiteda86a41a1c7700757c9217f74b9d57431c3e5f4 (patch)
treea2d6fdc748008274abfc6b7eab2eea7b445d27aa
parentpowerpc: Add preempt lazy support (diff)
downloadwireguard-linux-eda86a41a1c7700757c9217f74b9d57431c3e5f4.tar.xz
wireguard-linux-eda86a41a1c7700757c9217f74b9d57431c3e5f4.zip
powerpc: Large user copy aware of full:rt:lazy preemption
Large user copy_to/from (more than 16 bytes) uses vmx instructions to speed things up. Once the copy is done, it makes sense to try schedule as soon as possible for preemptible kernels. So do this for preempt=full/lazy and rt kernel. Not checking for lazy bit here, since it could lead to unnecessary context switches. Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241116192306.88217-3-sshegde@linux.ibm.com
-rw-r--r--arch/powerpc/lib/vmx-helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/lib/vmx-helper.c b/arch/powerpc/lib/vmx-helper.c
index d491da8d1838..58ed6bd613a6 100644
--- a/arch/powerpc/lib/vmx-helper.c
+++ b/arch/powerpc/lib/vmx-helper.c
@@ -45,7 +45,7 @@ int exit_vmx_usercopy(void)
* set and we are preemptible. The hack here is to schedule a
* decrementer to fire here and reschedule for us if necessary.
*/
- if (IS_ENABLED(CONFIG_PREEMPT) && need_resched())
+ if (IS_ENABLED(CONFIG_PREEMPTION) && need_resched())
set_dec(1);
return 0;
}