[haiku-commits] Re: haiku: hrev54888 - src/apps/processcontroller

  • From: "Alexander von Gluck IV" <kallisti5@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 14 Jan 2021 01:33:54 +0000

January 13, 2021 6:08 AM, "Adrien Destugues" <pulkomandy@xxxxxxxxx> wrote:

hrev54888 adds 1 changeset to branch 'master'
old head: 0e061f0903ef57f6877aa4695a651425bf9c2e33
new head: c2e78713f8d722f64d5a62717f40209719de7c22
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=c2e78713f8d7+^0e061f0903ef

----------------------------------------------------------------------------

c2e78713f8d7: ProcessController: reintroduce the static scaling mode.

There is a very good reason to have this: for low number of cores, the
default computation makes stupidly large bars.

I had tested my changes with various number of cores (1, 2, 3, 4, 8, 16)
in QEMU to make sure it looked correct in all cases. I don't understand
why kallisti5 reintroduced broken code.

This reverts commit b18298348af33f990b51d66cf21652b0a4520317.
This reverts commit b1b6769b6f040f077544d7884ca5a7c4fbb7af27.

[ Adrien Destugues <adrien.destugues@xxxxxxxxxxxxxxxxxxxxx> ]

:-(  Your testing is flawed somehow here.

The code below doesn't even make sense. The static table is never called.


+ int width = 4;
+ if (info.cpu_count > 4)
+ width = info.cpu_count;
+ if (info.cpu_count <= 16)
+ width *= 2;
+
+ // For the memory bar
+ width += 8;

width... dynamic.

1 core  width = 1
           *2 = 2
           +8   10

 width == 10


2 core  width = 2
           *2 = 4
           +8   14

 width == 14


+ if (gCPUcount <= 4 && bounds.Width() == 15) {

if gCPUcount <= 4 && width == 15
   // lol never true.

Other related posts: