Re: support for asymmetric CPUs

From: Daniel Ebdrup Jensen <debdrup_at_FreeBSD.org>
Date: Wed, 02 Mar 2022 07:36:38 UTC
On Tue, Mar 01, 2022 at 10:05:28PM +0100, Stefan Esser wrote:
>Am 01.03.22 um 20:04 schrieb Mike Karels:
>> If anyone has thought about this or has done any work on it, I'd be
>> interested to hear about it.
>
>Not identical to big/little scheduling, but IMHO related:
>
>Regards, STefan

Hi folks,

      I should preface this by saying that I'm no expert in schedulers,
      but that even I've spotted at least a few issues with Heterogeneous
      Multi Processing - which so far as I know is the generic name for
      ARM bigLITTLE, Intel P+E cores, and whatever else AMD, RISC-V, and
      IBM come up with if the technology matures.

      The existence of cores which are meant for energy-efficient use
      implies that the scheduler can keep track of when something is
      energy-efficient, which in turn means that in an ideal world the
      programmer would give the compiler some kind of hints, there's some
      information that lets the scheduler know if something will use less
      energy if it's run on a faster processor vs taking longer on a
      slower one, and/or that there's some other magic trick that'll make
      this sort of thing work without adding potentially thousands of
      lines of heuristics to our scheduler [1] which won't necessarily
      make it faster than another scheduler [2] which has almost an order
      of magnitude more lines but isn't any faster and can be slower in
      certain use-cases [3].

      And all of that doesn't take into account however many person-hours
      will go into actually programming all of it.

      All of this, of course, assumes that HMP isn't just a bad idea
      that's been allowed to fester a bit too long - something that I'm
      not personally convinced it isn't, and I've seen no good arguments
      supporting it other than something that amounts to "these folks are
      saying it will have been a good idea in X number of years".

      I'd love to hear what scheduler experts have to say on it, though.

Yours,
Daniel Ebdrup Jensen

1: https://cgit.freebsd.org/src/tree/sys/kern/sched_ule.c
2: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/sched/fair.c
3: https://www.usenix.org/conference/atc18/presentation/bouron