All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Laight" <David.Laight@ACULAB.COM>
To: "Jon Maloy" <jon.maloy@ericsson.com>,
	"Neil Horman" <nhorman@tuxdriver.com>
Cc: "Jon Maloy" <maloy@donjonn.com>,
	"Paul Gortmaker" <paul.gortmaker@windriver.com>,
	"David Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>,
	"Ying Xue" <ying.xue@windriver.com>
Subject: RE: [PATCH net-next 2/3] tipc: byte-based overload control on socket receive queue
Date: Fri, 22 Feb 2013 11:54:29 -0000	[thread overview]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B7164@saturn3.aculab.com> (raw)
In-Reply-To: <5127541C.9070306@ericsson.com>

> 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

  reply	other threads:[~2013-02-22 11:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15 22:57 [PATCH net-next 0/3] tipc: two cleanups, plus overload respin Paul Gortmaker
2013-02-15 22:57 ` [PATCH net-next 1/3] tipc: eliminate duplicated discard_rx_queue routine Paul Gortmaker
2013-02-15 22:57 ` [PATCH net-next 2/3] tipc: byte-based overload control on socket receive queue Paul Gortmaker
2013-02-18 14:47   ` Neil Horman
2013-02-19  8:07     ` Jon Maloy
2013-02-19 14:26       ` Neil Horman
2013-02-19 17:54         ` Jon Maloy
2013-02-19 19:18           ` Neil Horman
2013-02-19 20:16             ` Jon Maloy
2013-02-19 21:44               ` Neil Horman
2013-02-21 10:24                 ` Jon Maloy
2013-02-21 15:07                   ` Neil Horman
2013-02-21 16:54                     ` Jon Maloy
2013-02-21 18:16                       ` Neil Horman
2013-02-21 21:05                         ` Jon Maloy
2013-02-21 21:35                           ` Neil Horman
2013-02-22 11:18                             ` Jon Maloy
2013-02-22 11:54                               ` David Laight [this message]
2013-02-22 12:08                               ` Neil Horman
2013-02-15 22:57 ` [PATCH net-next 3/3] tipc: remove redundant checking for the number of iovecs in a send request Paul Gortmaker
2013-02-18 17:22 ` [PATCH net-next 0/3] tipc: two cleanups, plus overload respin David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AE90C24D6B3A694183C094C60CF0A2F6026B7164@saturn3.aculab.com \
    --to=david.laight@aculab.com \
    --cc=davem@davemloft.net \
    --cc=jon.maloy@ericsson.com \
    --cc=maloy@donjonn.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=ying.xue@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.