netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, davidel@xmailserver.org,
	alban.crequy@collabora.co.uk
Subject: Re: [PATCH 2/2] af_unix: optimize unix_dgram_poll()
Date: Mon, 08 Nov 2010 13:44:44 -0800 (PST)	[thread overview]
Message-ID: <20101108.134444.242133347.davem@davemloft.net> (raw)
In-Reply-To: <1288539505.2660.41.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 31 Oct 2010 16:38:25 +0100

> unix_dgram_poll() is pretty expensive to check POLLOUT status, because
> it has to lock the socket to get its peer, take a reference on the peer
> to check its receive queue status, and queue another poll_wait on
> peer_wait. This all can be avoided if the process calling
> unix_dgram_poll() is not interested in POLLOUT status. It makes
> unix_dgram_recvmsg() faster by not queueing irrelevant pollers in
> peer_wait.
> 
> On a test program provided by Alan Crequy :
> 
> Before:
> 
> real    0m0.211s
> user    0m0.000s
> sys     0m0.208s
> 
> After:
> 
> real    0m0.044s
> user    0m0.000s
> sys     0m0.040s
> 
> Suggested-by: Davide Libenzi <davidel@xmailserver.org>
> Reported-by: Alban Crequy <alban.crequy@collabora.co.uk>
> Acked-by: Davide Libenzi <davidel@xmailserver.org>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

      reply	other threads:[~2010-11-08 21:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-31 15:38 [PATCH 2/2] af_unix: optimize unix_dgram_poll() Eric Dumazet
2010-11-08 21:44 ` David Miller [this message]

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=20101108.134444.242133347.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alban.crequy@collabora.co.uk \
    --cc=davidel@xmailserver.org \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).