lkml.org 
[lkml]   [2017]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC/RFT] sched/fair: Improve the behavior of sync flag
From
Date
On Sat, 2017-08-26 at 18:02 -0700, Joel Fernandes wrote:
> Binder (Android's IPC mechanism) which uses sync wake ups during synchronous
> transactions to the scheduler to indicate that the waker is about to sleep
> soon. The current wake up path can improved when the sync flag is passed
> resulting in higher binder performance. In this patch we more strongly wake up
> the wakee on the waker's CPU if sync is passed based on a few other conditions
> such as wake_cap, cpus allowed. wake_wide is checked only after the sync flag
> check so that it doesn't mess up sync. Binder throughput tests see good
> improvement improvement when waking up wakee (calling thread) on the waker's
> CPU (called thread) with this flag. Some tests results are below:

Sync is not a contract, it's a hint.  If you really want sync behavior,
you need to create a contract signed in blood to signal that you really
really are passing the baton.

Sync wakeups make tons of sense when the waker really really has one
and only one wakee, AND really really is going to sleep immediately,
with zero overlap that can be converted to throughput by waking to an
idle core.  With no L2 misses to slow them down, pass the baton
microbenchmarks that do no real work can generate impressive ping-pong
numbers... but the real world tends to do more than just bat a byte
around endlessly.  The existing hint is not strong enough for your
needs, it's current users may overlap with their wakee(s), change their
minds about sleeping (be handed more work to do) etc etc.

-Mike

\
 
 \ /
  Last update: 2017-08-27 07:46    [W:0.098 / U:1.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site