[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B7164@saturn3.aculab.com>
Date: Fri, 22 Feb 2013 11:54:29 -0000
From: "David Laight" <David.Laight@...LAB.COM>
To: "Jon Maloy" <jon.maloy@...csson.com>,
"Neil Horman" <nhorman@...driver.com>
Cc: "Jon Maloy" <maloy@...jonn.com>,
"Paul Gortmaker" <paul.gortmaker@...driver.com>,
"David Miller" <davem@...emloft.net>, <netdev@...r.kernel.org>,
"Ying Xue" <ying.xue@...driver.com>
Subject: RE: [PATCH net-next 2/3] tipc: byte-based overload control on socket receive queue
> grab net lock (read mode)
> <do some packet sanity check>
> grab node lock
> --> grab port lock
> grab socket lock
> <check sk_rcvbuf>
> release socket lock
> --> release port lock
> <perform link level protocol check>
> release node lock
> release net lock
> grab port lock
> grab socket lock
> <check sk_rcvbuf>
> <deliver or reject>
> release socket lock
> release port lock
You probably don't need to grab the socket lock itself, you
only need to be able to read a 'receive buffer full' marker.
That could (probably) be done with some careful coding in the
socket create/delete paths.
Another option is to remember that the socket became full
the previous time, and only do the early check of the
receive buffer state when it had previously been full.
David
--
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