[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241120080312.uHw4eJcQ@linutronix.de>
Date: Wed, 20 Nov 2024 09:03:12 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Ankur Arora <ankur.a.arora@...cle.com>
Cc: Shrikanth Hegde <sshegde@...ux.ibm.com>, mpe@...erman.id.au,
linuxppc-dev@...ts.ozlabs.org, npiggin@...il.com,
christophe.leroy@...roup.eu, maddy@...ux.ibm.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] powerpc: Large user copy aware of full:rt:lazy
preemption
On 2024-11-19 13:08:31 [-0800], Ankur Arora wrote:
>
> 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.
Isn't his behaviour here exactly what preempt_enable() would do?
If the LAZY bit is set, it is delayed until return to userland or an
explicit schedule() because it is done. If this LAZY bit turned into an
actual scheduling request then it is acted upon.
Sebastian
Powered by blists - more mailing lists