rescheduling tasks using swi_add()

rookie asmrookie at gmail.com
Wed Jan 11 04:44:39 PST 2006


2006/1/11, kamal kc <kamal_ckk at yahoo.com>:
>
> dear everybody,
>
> i had previous thread going on about the cpu load
> average. and had some discussion regarding it. i have
> a newer thing to discuss on so i started this thread.
>
> as i mentioned earlier i had put some code in the
> bridge.c
> that performed compression which took a long time and
> hence
> i got a high number of interface interrupts (irq22: xl
> interrupts).
>
> so i thought of rescheduling the compression tasks
> without
> blocking the bridge function. i found this function
> swi_add()

[snip]

swi_* are used to rule interrupt threads but as you're speaking it
doesn't seem you're in this case. In order to force a preemption you
might use mi_switch(9) which causes a machine-independent context
switch for curthread.

cheers,
Attilio

--
Peace can only be achieved by understanding - A. Einstein


More information about the freebsd-hackers mailing list