Skip to content

Patch kernel with the 4.61s load thing #2109

Closed
@Artoria2e5

Description

@Artoria2e5

The current load average sample rate of five seconds plus one tick is insufficient to avoid consecutively hitting scheduled tasks like heartbeat packets, and causes a Moire sawtooth pattern as it hits and misses. Android people seem to like it a lot. See https://github.com/Swapnil133609/Android-Kernel-Patches/blob/master/labodj/0166-sched-LOAD_FREQ-4-HZ-61-avoids-loadavg-Moire.patch for a patch and http://ripke.com/loadavg/moire for some graphs.

We cannot directly use this patch however, as whoever decided that 4*HZ+61 means 4.61 seconds definitely did not expect a configurable HZ. My suggestion is to change it to 4*HZ+3*HZ/5+HZ/65 60*HZ/13; the compiler is gonna make it a constant anyways.

(Why not HZ/100 for exactly 4.61? Well, 4.61 was an approximation of 60/13, and we can do better here for free.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussion-neededFurther discussion neededenhancementTopic/issue involves an AOSC OS enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions