* BH implementation question
@ 2001-03-20 17:42 Anders Peter Fugmann
0 siblings, 0 replies; only message in thread
From: Anders Peter Fugmann @ 2001-03-20 17:42 UTC (permalink / raw)
To: linux-kernel
Hi I have a couple of questions to the kernel code.
I have been trying to fully inderstand (and doccument) the changes in
2.4 wrt. Tasklets and softirq's, BH's and task queues.
In my try to understand how it all works, I came across the code:
(linux/kernel/softirq.c: 246)
static void bh_action(unsigned long nr)
{
int cpu = smp_processor_id();
if (!spin_trylock(&global_bh_lock))
goto resched;
if (!hardirq_trylock(cpu))
goto resched_unlock;
if (bh_base[nr])
bh_base[nr]();
hardirq_endlock(cpu);
spin_unlock(&global_bh_lock);
return;
resched_unlock:
spin_unlock(&global_bh_lock);
resched:
mark_bh(nr);
}
Now all of this but the hardirq_trylock(cpu) and hardirq_endlock(cpu)
makes perfectly sence.
Anyone care to explain the what theese lines do.
Secondly.
Is there a reason why to implement a queue (TASKLET_HI) for the old
BH's, instead of just using a single tasklet for all BH administraton.
Would'ent this guarentee that no BH is executed at the same time, and at
the same time reduce code complexity, and remove the global_bh_lock?
TIA
Anders Fugmann
--
Hi. I'm a .signature virus.
Please copy me into your .signature file and help me spread.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-03-20 17:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-20 17:42 BH implementation question Anders Peter Fugmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.