Skip to contentSkip to conversation

READ_LOCK?

DISCUSSION Harald Welte 1 participant 1 message Jan 7, 2004 1 message not in the archive netfilter

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 5 lines · zhaoyao

Harald Welte,??????

Yes,as you know in 2.4 or 2.6, bh is similar to softirq, WRITE_LOCK is write_lock_bh(&a)
if u write_lock_bh(&a), obviously other cpu can't enter this critical region,

I don't really get your point. bh is not really that similar to softirq. As stated before, their properties wrt. serialization are quite different. the term 'bh' in spin_lock_bh is only a legacy name. In 2.6.x it mainly deals with disabling preemption.

Quoted 2 lines

but already in softirq, why lock bh again. softirq can't reenter. so lock bh is not useful.

As indicated in my last email, I think you are misunderstanding the kernel contexts. the network rx softirq _will_ run simultaneously on multiple cpu's.

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie