tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: task queues

   Date: Sat, 26 Jul 2014 20:13:08 +0200
   From: Martin Husemann <>

   Why not extend softints so that they (optionally) provide a sleepable

Softints are a relatively scarce resource compared to the four words
of memory that tasks occupy.  Setting softints up and tearing them
down is an expensive operation unlike task_init, task_destroy.  Can't
cancel a softint; can't wait for completion on a softint without
tearing it down; can't drain all softints.

Of course, softints are cheaper to schedule: softint_schedule requires
zero interprocessor synchronization, whereas task_schedule involves
atomic_cas and mutex_enter (though it tries to touch only CPU-local
memory, unless there's contention on the task itself).

Home | Main Index | Thread Index | Old Index