Re: [PATCH 19/19] mm: sched: numa: Implement slow start for working set sampling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/06/2012 04:14 AM, Mel Gorman wrote:
From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>

Add a 1 second delay before starting to scan the working set of
a task and starting to balance it amongst nodes.

[ note that before the constant per task WSS sampling rate patch
   the initial scan would happen much later still, in effect that
   patch caused this regression. ]

The theory is that short-run tasks benefit very little from NUMA
placement: they come and go, and they better stick to the node
they were started on. As tasks mature and rebalance to other CPUs
and nodes, so does their NUMA placement have to change and so
does it start to matter more and more.

In practice this change fixes an observable kbuild regression:

    # [ a perf stat --null --repeat 10 test of ten bzImage builds to /dev/shm ]

    !NUMA:
    45.291088843 seconds time elapsed                                          ( +-  0.40% )
    45.154231752 seconds time elapsed                                          ( +-  0.36% )

    +NUMA, no slow start:
    46.172308123 seconds time elapsed                                          ( +-  0.30% )
    46.343168745 seconds time elapsed                                          ( +-  0.25% )

    +NUMA, 1 sec slow start:
    45.224189155 seconds time elapsed                                          ( +-  0.25% )
    45.160866532 seconds time elapsed                                          ( +-  0.17% )

and it also fixes an observable perf bench (hackbench) regression:

    # perf stat --null --repeat 10 perf bench sched messaging

    -NUMA:

    -NUMA:                  0.246225691 seconds time elapsed                   ( +-  1.31% )
    +NUMA no slow start:    0.252620063 seconds time elapsed                   ( +-  1.13% )

    +NUMA 1sec delay:       0.248076230 seconds time elapsed                   ( +-  1.35% )

The implementation is simple and straightforward, most of the patch
deals with adding the /proc/sys/kernel/balance_numa_scan_delay_ms tunable
knob.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx>
Cc: Rik van Riel <riel@xxxxxxxxxx>
[ Wrote the changelog, ran measurements, tuned the default. ]
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Signed-off-by: Mel Gorman <mgorman@xxxxxxx>

Reviewed-by: Rik van Riel <riel@xxxxxxxxxx>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]