[PATCH v2 1/1] psi: stop relying on timer_pending for poll_work rescheduling
Suren Baghdasaryan
surenb at google.com
Thu Jul 1 09:09:25 PDT 2021
On Thu, Jul 1, 2021 at 1:59 AM Peter Zijlstra <peterz at infradead.org> wrote:
>
> On Wed, Jun 30, 2021 at 01:51:51PM -0700, Suren Baghdasaryan wrote:
> > + /* cmpxchg should be called even when !force to set poll_scheduled */
> > + if (atomic_cmpxchg(&group->poll_scheduled, 0, 1) && !force)
> > return;
>
> Why is that a cmpxchg() ?
We want to set poll_scheduled and proceed with rescheduling the timer
unless it's already scheduled, so cmpxchg helps us to make that
decision atomically. Or did I misunderstand your question?
>
> --
> To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe at android.com.
>
More information about the Linux-mediatek
mailing list