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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon,  1 Jul 2024 21:25:08 +0530
From: Mukesh Kumar Chaurasiya <mchauras@...ux.ibm.com>
To: zhangqiao22@...wei.com, mchauras@...mail.com
Cc: Markus.Elfring@....de, bristot@...hat.com, bsegall@...gle.com,
        dietmar.eggemann@....com, juri.lelli@...hat.com,
        linux-kernel@...r.kernel.org, mgorman@...e.de, mingo@...hat.com,
        peterz@...radead.org, rostedt@...dmis.org, vincent.guittot@...aro.org,
        vschneid@...hat.com, Mukesh Kumar Chaurasiya <mchauras@...ux.ibm.com>
Subject: Re: [PATCH v2] sched: Initialize the vruntime of a new task when it is first enqueued


On Thu, 27 Jun 2024 21:33:59 +0800, Zhang Qiao wrote:
> When creating a new task, we initialize vruntime of the newly task at
> sched_cgroup_fork(). However, the timing of executing this action is too
> early and may not be accurate.
> 
> Because it uses current CPU to init the vruntime, but the new task
> actually runs on the cpu which be assigned at wake_up_new_task().
> 
> [...]

I tried this on a 104 cpu ppc64le Power9 system

The experiment was to stress the cpus with 416 threads(4 * nproc)
and then run small commands like date, time, ls etc

With bpf i collected the time it took for the tasks from waking up
to switching on to the cpu.

I collected 3600 samples for each

The results are as follows:

With patch

@: count 3601, average 4609830, total 16599997845

@c: 3709
@latency: 
[4K, 8K)               1 |                                                    |
[8K, 16K)              4 |                                                    |
[16K, 32K)          2270 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
[32K, 64K)            45 |@                                                   |
[64K, 128K)            3 |                                                    |
[128K, 256K)         141 |@@@                                                 |
[256K, 512K)          24 |                                                    |
[512K, 1M)             7 |                                                    |
[1M, 2M)               8 |                                                    |
[2M, 4M)              38 |                                                    |
[4M, 8M)             226 |@@@@@                                               |
[8M, 16M)            321 |@@@@@@@                                             |
[16M, 32M)           501 |@@@@@@@@@@@                                         |
[32M, 64M)            12 |                                                    |

# Without Patch

@: count 3600, average 12786599, total 46031757085

@c: 3608
@latency: 
[4K, 8K)               1 |                                                    |
[8K, 16K)              6 |                                                    |
[16K, 32K)           297 |@@@@@@@@@@@                                         |
[32K, 64K)            25 |                                                    |
[64K, 128K)            4 |                                                    |
[128K, 256K)         149 |@@@@@                                               |
[256K, 512K)          21 |                                                    |
[512K, 1M)             5 |                                                    |
[1M, 2M)              14 |                                                    |
[2M, 4M)              45 |@                                                   |
[4M, 8M)             857 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                   |
[8M, 16M)            812 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                     |
[16M, 32M)          1325 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
[32M, 64M)            31 |@                                                   |

The patch leads to a significant decrease in latency of a newly woken task.

Tested-by: Mukesh Kumar Chaurasiya <mchauras@...ux.ibm.com>
Reviewed-by: Mukesh Kumar Chaurasiya <mchauras@...ux.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ