Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 6 years ago

Closed 4 years ago

#552 closed defect (fixed)

Optimize fibril creation

Reported by: Martin Decky Owned by: Martin Decky
Priority: critical Milestone: 0.7.0
Component: helenos/kernel/generic Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description (last modified by Martin Decky)

The creation of new fibrils and allocating stacks for them for every single IPC notification (e.g. interrupt notification) puts a lot of stress on the system. It is observed to even cause PS/2 protocol desynchronization on very slow machines (e.g. QEMU).

There are several ways how this issue can be mitigated. This ticket provides an overview of them:

  • Optimizing the new bitmap frame allocator (especially the bitmap search itself, which is currently very suboptimal).
  • Optimizing the page mapping manipulation by caching the intermediate levels of the page table.
  • Implementing a fibril pool that would avoid the need to create and discard all the precious resources for each single notification.
  • Allocate the fibril stacks from a different sequence of pages than the heap to avoid unnecessary heap fragmentation.

Change History (4)

comment:1 Changed 6 years ago by Martin Decky

Owner: changed from Jakub Jermář to Martin Decky
Status: newassigned

comment:2 Changed 5 years ago by Jakub Jermář

Milestone: 0.5.10.5.2

comment:3 Changed 5 years ago by Martin Decky

Description: modified (diff)

comment:4 Changed 4 years ago by Jakub Jermář

Resolution: fixed
Status: assignedclosed

Fix merged in mainline,2514 by handling the IRQ notifications in the receiving manager fibril. Note that additional improvements are possible by e.g. retaining more of the manager fibrils that block (and get killed afterwards) and creating a manager fibril pool out of them.

Note: See TracTickets for help on using tickets.