IAIK/sweb

yieldIfIFSet() slow?

dgruss opened this issue · 5 comments

when commenting all code in yieldIFSet -- does your sweb get faster?

can't reproduce it on my system right now....

Where it is very noticable is when you have loads of userspace binaries in the tests folder (like 100+).

On my system, the time it takes to mount the /usr/ partition goes to about 10 secs. And if you disable the halt in the IdleThread, the time goes down to pretty much instant. So im pretty sure we could gain some performance boost out of some yields() in the ATA driver.

On 02.09.2016 09:35, Daniel Kales wrote:

Where it is very noticable is when you have loads of userspace binaries
in the tests folder (like 100+).

On my system, the time it takes to mount the /usr/ partition goes to
about 10 secs. And if you disable the halt in the IdleThread, the time
goes down to pretty much instant. So im pretty sure we could gain some
performance boost out of some yields() in the ATA driver.

i tried removing the yields (while having hundreds of binaries) but
could not see any difference...

commenting the yieldIFSet() didnt really improve the performance for me either, but commenting the normal yield()
in ATADriver.cpp:269 did. (I haven't thought about any implications of that though)

if (currentThread)
  {
    if(interrupt_context)
    {
      currentThread->state_=Sleeping;
      ArchInterrupts::enableInterrupts();
      //Scheduler::instance()->yield();
    }
    else
      currentThread->state_=Sleeping;
  }

On 02.09.2016 09:55, Daniel Kales wrote:

the yieldIFSet() didnt really improve the performance for me either, but
commenting the normal yield()
in ATADriver.cpp:269 did. (I haven't thought about any implications of
that though)

well it should not make a difference as the subsequent code execution
doesn't rely on this yield it seems... even worse: the MutexLock is
still locked during this yield --> no one else can do anything with the
block device...

fixed in 54add4a