[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGZFCEFDM109559QWXMSoy7Cru5-2MQt-4FX_tk6uK1-u7M-7Q@mail.gmail.com>
Date: Tue, 1 Apr 2014 09:49:53 +0530
From: ratheesh kannoth <ratheesh.ksz@...il.com>
To: netdev <netdev@...r.kernel.org>,
Netfilter mailing list <netfilter@...r.kernel.org>
Subject: cache coherency problem, why not happening ?
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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists