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]
Date:   Sat, 26 Aug 2017 23:39:44 -0700
From:   Joel Fernandes <joelaf@...gle.com>
To:     Mike Galbraith <efault@....de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Josef Bacik <jbacik@...com>, Juri Lelli <Juri.Lelli@....com>,
        Brendan Jackman <brendan.jackman@....com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Matt Fleming <matt@...eblueprint.co.uk>,
        Rik van Riel <riel@...hat.com>,
        Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH RFC/RFT] sched/fair: Improve the behavior of sync flag

Hi Mike,

On Sat, Aug 26, 2017 at 11:08 PM, Mike Galbraith <efault@....de> wrote:
> On Sun, 2017-08-27 at 07:44 +0200, Mike Galbraith wrote:
>> 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.
>
> P.S. to get the most bang for your synchronous buck, you want a
> preemptive wakeup.. but that butts heads with the fair engine.
>

By preemptive wake up I guess you mean the waker would give up its
time slice and let the wakee use it? That's a cool idea but I agree it
would be against the fair task behavior.

Also about real world benchmarks, in Android we have usecases that
show that the graphics performance and we have risk of frame drops if
we don't use the sync flag so this is a real world need. Binder is the
backbone of Android and for the benefit of these usecases, Android
kernels make sync a contract (written in blood as you put it).

thanks,

-Joel


>         -Mike

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ