lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <874j43hqy8.fsf@oracle.com>
Date: Tue, 19 Nov 2024 13:08:31 -0800
From: Ankur Arora <ankur.a.arora@...cle.com>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>
Cc: mpe@...erman.id.au, linuxppc-dev@...ts.ozlabs.org, npiggin@...il.com,
        christophe.leroy@...roup.eu, maddy@...ux.ibm.com,
        bigeasy@...utronix.de, ankur.a.arora@...cle.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] powerpc: Large user copy aware of full:rt:lazy
 preemption


Shrikanth Hegde <sshegde@...ux.ibm.com> writes:

> 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.

Note that this check will also fire for PREEMPT_DYNAMIC && preempt=none.
So when power supports PREEMPT_DYNAMIC this will need to change
to preempt_model_*() based checks.

> Not checking for lazy bit here, since it could lead to unnecessary
> context switches.

Maybe:
Not checking for lazy bit here, since we only want to schedule when
a context switch is imminently required.

> Suggested-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Signed-off-by: Shrikanth Hegde <sshegde@...ux.ibm.com>
> ---
>  arch/powerpc/lib/vmx-helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
>  }


--
ankur

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ