cache coherency problem, why not happening ?

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

 



I  could see     spin lock   (&sk->sk_receive_queue.lock)   is
acquired  before queing  sk_buff . This is done in interrupt context (
called from bottom half,
http://lxr.linux.no/#linux+v3.13.5/net/packet/af_packet.c#L1818 ).
userspace can receive the packet using  system call and system call
will acquire the same lock
( http://lxr.linux.no/#linux+v3.13.5/net/core/datagram.c#L191 ).


Suppose in smp machine,  if  bottom half is executed by  cpu #1  and
the  userspace process is pinned to cpu #2.  How can the  spin lock
acuquired info ( lock value ) will be reflected   to cpu #2 ( if cpu
#2 has already acquired and released the lock value and the lock value
is  stored in a cpu #2 data cache. so if cpu #1 acquire it , cpu#2
will read the cache value which says it is free). I could see that
spin_lock_t is not a volatile value also.


Thanks,
Ratheesh
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux