[haiku-development] Disabling CPU disabling

  • From: Pawel Dziepak <pdziepak@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 25 Oct 2013 01:11:49 +0200

Hello,

Since the scheduler code has grown quite big I am trying to remove as
much unnecessary logic as possible. The thing that caught my attention
is the possibility to disable a logical processor.

As far as I understand there are two undocumented (i.e. BeBook doesn't
mention them but some old apps, e.g. Pulse, use them) syscalls
set_cpu_enabled and cpu_enabled that allow disabling/enabling a CPU
and check whether CPU is enabled. I don't really see why anyone would
like to use that. Definitely not for performance reasons. If because
of the energy consumption then the new scheduler has power saving mode
with small task packing which tries to keep as little CPUs running as
possible.

So, unless there is any situation it may be useful to manually disable
CPU that I am missing, I am going to remove that feature (the menu in
Deskbar for disabling CPUs could be replaced by menu for choosing the
scheduler operating mode once public API for that is done).
_kern_set_cpu_enable and _kern_cpu_enable have to stay tough (unless
my assumption that they are part of the original BeOS ABI is wrong)
but can be implemented totally in libroot returning respectively B_OK
and true without even calling the kernel.

Anyone going to miss that feature?

Paweł

Other related posts: