Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Shrikanth Hegde and committed by
Madhavan Srinivasan
eda86a41 00199ed6

+1 -1
+1 -1
arch/powerpc/lib/vmx-helper.c
··· 45 45 * set and we are preemptible. The hack here is to schedule a 46 46 * decrementer to fire here and reschedule for us if necessary. 47 47 */ 48 - if (IS_ENABLED(CONFIG_PREEMPT) && need_resched()) 48 + if (IS_ENABLED(CONFIG_PREEMPTION) && need_resched()) 49 49 set_dec(1); 50 50 return 0; 51 51 }