All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eliezer Tamir <eliezer.tamir@linux.intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Don Skidmore <donald.c.skidmore@intel.com>,
	e1000-devel@lists.sourceforge.net,
	Willem de Bruijn <willemb@google.com>,
	Ben Hutchings <bhutchings@solarflare.com>,
	Andi Kleen <andi@firstfloor.org>, HPA <hpa@zytor.com>,
	Eilon Greenstien <eilong@broadcom.com>,
	Or Gerlitz <or.gerlitz@gmail.com>,
	Amir Vadai <amirv@mellanox.com>,
	Eliezer Tamir <eliezer@tamir.org.il>
Subject: Re: [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll
Date: Wed, 05 Jun 2013 16:41:48 +0300	[thread overview]
Message-ID: <51AF401C.2030506@linux.intel.com> (raw)
In-Reply-To: <1370439054.24311.248.camel@edumazet-glaptop>

On 05/06/2013 16:30, Eric Dumazet wrote:
> On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote:
>> A very naive select/poll busy-poll support.
>> Add busy-polling to sock_poll().
>> When poll/select have nothing to report, call the low-level
>> sock_poll() again until we are out of time or we find something.
>> Right now we poll every socket once, this is suboptimal
>> but improves latency when the number of sockets polled is not large.
>>
>> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
>> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
>> Tested-by: Willem de Bruijn <willemb@google.com>
>> Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com>
>> ---
>
> I am a bit uneasy with this one, because an applicatio polling() on one
> thousand file descriptors using select()/poll(), will call sk_poll_ll()
> one thousand times.

But we call sk_poll_ll() with nonblock set, so it will only test once
for each socket and not loop.

I think this is not as bad as it sounds.
We still honor the time limit on how long to poll.

When we busy-wait on a single socket we call sk_poll_ll() repeatedly
until we timeout or we have something to report.

Here on the other hand, we sk_poll_ll() once for each file, so we loop 
on the files. We moved the loop from inside sk_poll_ll to select/poll.

I also plan on improving this this in the next stage.

The plan is to give control on whether sk_poll_ll is called to
select/poll/epoll, so the caller has even more control.

-Eliezer



WARNING: multiple messages have this Message-ID (diff)
From: Eliezer Tamir <eliezer.tamir@linux.intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Willem de Bruijn <willemb@google.com>,
	Or Gerlitz <or.gerlitz@gmail.com>,
	e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
	HPA <hpa@zytor.com>, Amir Vadai <amirv@mellanox.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Eliezer Tamir <eliezer@tamir.org.il>,
	linux-kernel@vger.kernel.org, Andi Kleen <andi@firstfloor.org>,
	Ben Hutchings <bhutchings@solarflare.com>,
	Eilon Greenstien <eilong@broadcom.com>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll
Date: Wed, 05 Jun 2013 16:41:48 +0300	[thread overview]
Message-ID: <51AF401C.2030506@linux.intel.com> (raw)
In-Reply-To: <1370439054.24311.248.camel@edumazet-glaptop>

On 05/06/2013 16:30, Eric Dumazet wrote:
> On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote:
>> A very naive select/poll busy-poll support.
>> Add busy-polling to sock_poll().
>> When poll/select have nothing to report, call the low-level
>> sock_poll() again until we are out of time or we find something.
>> Right now we poll every socket once, this is suboptimal
>> but improves latency when the number of sockets polled is not large.
>>
>> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
>> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
>> Tested-by: Willem de Bruijn <willemb@google.com>
>> Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com>
>> ---
>
> I am a bit uneasy with this one, because an applicatio polling() on one
> thousand file descriptors using select()/poll(), will call sk_poll_ll()
> one thousand times.

But we call sk_poll_ll() with nonblock set, so it will only test once
for each socket and not loop.

I think this is not as bad as it sounds.
We still honor the time limit on how long to poll.

When we busy-wait on a single socket we call sk_poll_ll() repeatedly
until we timeout or we have something to report.

Here on the other hand, we sk_poll_ll() once for each file, so we loop 
on the files. We moved the loop from inside sk_poll_ll to select/poll.

I also plan on improving this this in the next stage.

The plan is to give control on whether sk_poll_ll is called to
select/poll/epoll, so the caller has even more control.

-Eliezer



------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

  reply	other threads:[~2013-06-05 13:41 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 10:34 [PATCH v9 net-next 0/7] net: low latency Ethernet device polling Eliezer Tamir
2013-06-05 10:34 ` [PATCH v9 net-next 1/7] net: add napi_id and hash Eliezer Tamir
2013-06-05 10:34   ` Eliezer Tamir
2013-06-05 13:18   ` Eric Dumazet
2013-06-05 10:34 ` [PATCH v9 net-next 2/7] net: add low latency socket poll Eliezer Tamir
2013-06-05 10:34   ` Eliezer Tamir
2013-06-05 13:23   ` Eric Dumazet
2013-06-05 13:23     ` Eric Dumazet
2013-06-05 15:28     ` Willem de Bruijn
2013-06-05 15:31       ` Eliezer Tamir
2013-06-05 15:21   ` Eric Dumazet
2013-06-05 15:30     ` Eliezer Tamir
2013-06-05 15:39       ` Eric Dumazet
2013-06-05 15:39         ` Eric Dumazet
2013-06-05 15:46         ` Eliezer Tamir
2013-06-05 15:46           ` Eliezer Tamir
2013-06-05 15:59           ` Eric Dumazet
2013-06-05 15:59             ` Eric Dumazet
2013-06-06 12:50             ` Eliezer Tamir
2013-06-05 10:34 ` [PATCH v9 net-next 3/7] udp: add low latency socket poll support Eliezer Tamir
2013-06-05 10:34   ` Eliezer Tamir
2013-06-05 13:25   ` Eric Dumazet
2013-06-05 13:25     ` Eric Dumazet
2013-06-05 10:34 ` [PATCH v9 net-next 4/7] tcp: " Eliezer Tamir
2013-06-05 10:34   ` Eliezer Tamir
2013-06-05 13:25   ` Eric Dumazet
2013-06-05 13:25     ` Eric Dumazet
2013-06-05 10:34 ` [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll Eliezer Tamir
2013-06-05 10:34   ` Eliezer Tamir
2013-06-05 13:30   ` Eric Dumazet
2013-06-05 13:30     ` Eric Dumazet
2013-06-05 13:41     ` Eliezer Tamir [this message]
2013-06-05 13:41       ` Eliezer Tamir
2013-06-05 13:56       ` Eric Dumazet
2013-06-05 13:56         ` Eric Dumazet
2013-06-05 14:17         ` Eric Dumazet
2013-06-05 14:17           ` Eric Dumazet
2013-06-05 14:56           ` Eliezer Tamir
2013-06-05 15:20       ` Eric Dumazet
2013-06-05 15:20         ` Eric Dumazet
2013-06-05 15:47         ` Eliezer Tamir
2013-06-05 13:49     ` David Laight
2013-06-05 13:49       ` David Laight
2013-06-05 14:00       ` Eric Dumazet
2013-06-05 14:00         ` Eric Dumazet
2013-06-05 10:35 ` [PATCH v9 net-next 6/7] ixgbe: add support for ndo_ll_poll Eliezer Tamir
2013-06-05 10:35   ` Eliezer Tamir
2013-06-05 10:35 ` [PATCH v9 net-next 7/7] ixgbe: add extra stats " Eliezer Tamir
2013-06-05 10:35   ` Eliezer Tamir
2013-06-07 21:48 ` [PATCH v9 net-next 0/7] net: low latency Ethernet device polling David Miller
2013-06-08 18:06   ` Eliezer Tamir

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=51AF401C.2030506@linux.intel.com \
    --to=eliezer.tamir@linux.intel.com \
    --cc=amirv@mellanox.com \
    --cc=andi@firstfloor.org \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=donald.c.skidmore@intel.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=eilong@broadcom.com \
    --cc=eliezer@tamir.org.il \
    --cc=eric.dumazet@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=or.gerlitz@gmail.com \
    --cc=willemb@google.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.