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>,
Alex Rosenbaum <alexr@mellanox.com>,
Eliezer Tamir <eliezer@tamir.org.il>
Subject: Re: [PATCH v8 net-next 5/7] net: simple poll/select low latency socket poll
Date: Tue, 04 Jun 2013 11:52:45 +0300 [thread overview]
Message-ID: <51ADAADD.4030209@linux.intel.com> (raw)
In-Reply-To: <51ACA15C.4060101@linux.intel.com>
On 03/06/2013 16:59, Eliezer Tamir wrote:
> On 03/06/2013 16:15, Eric Dumazet wrote:
>> On Mon, 2013-06-03 at 11:02 +0300, Eliezer Tamir wrote:
>>> sock = file->private_data;
>>> - return sock->ops->poll(file, sock, wait);
>>> +
>>> + poll_result = sock->ops->poll(file, sock, wait);
>>> +
>>> + if (!(poll_result & (POLLRDNORM | POLLERR | POLLRDHUP |
>>> POLLHUP)) &&
>>> + sk_valid_ll(sock->sk) && sk_poll_ll(sock->sk, 1))
>>> + poll_result = sock->ops->poll(file, sock, NULL);
>>> +
>>> + return poll_result;
>>> }
>>>
>>> static int sock_mmap(struct file *file, struct vm_area_struct *vma)
>>>
>>
>>
>> In fact, for TCP, POLLOUT event being ready can also be triggered by
>> incoming messages, as the ACK might allow the user application to push
>> more data in the write queue.
>>
>> And you might check wait->_key to avoid testing flags that user is not
>> interested into.
>
> yes, comparing to _key is more correct.
> In any case this needs to be completely rewritten for support for
> working well with a large number of sockets.
>
Is it possible for wait to be NULL? (do we need to check for that?)
I see that poll_does_not_wait() checks for that, but I could not find
anywhere this is actually done.
-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>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Alex Rosenbaum <alexr@mellanox.com>,
linux-kernel@vger.kernel.org,
Eliezer Tamir <eliezer@tamir.org.il>,
Andi Kleen <andi@firstfloor.org>,
Ben Hutchings <bhutchings@solarflare.com>,
Eilon Greenstien <eilong@broadcom.com>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH v8 net-next 5/7] net: simple poll/select low latency socket poll
Date: Tue, 04 Jun 2013 11:52:45 +0300 [thread overview]
Message-ID: <51ADAADD.4030209@linux.intel.com> (raw)
In-Reply-To: <51ACA15C.4060101@linux.intel.com>
On 03/06/2013 16:59, Eliezer Tamir wrote:
> On 03/06/2013 16:15, Eric Dumazet wrote:
>> On Mon, 2013-06-03 at 11:02 +0300, Eliezer Tamir wrote:
>>> sock = file->private_data;
>>> - return sock->ops->poll(file, sock, wait);
>>> +
>>> + poll_result = sock->ops->poll(file, sock, wait);
>>> +
>>> + if (!(poll_result & (POLLRDNORM | POLLERR | POLLRDHUP |
>>> POLLHUP)) &&
>>> + sk_valid_ll(sock->sk) && sk_poll_ll(sock->sk, 1))
>>> + poll_result = sock->ops->poll(file, sock, NULL);
>>> +
>>> + return poll_result;
>>> }
>>>
>>> static int sock_mmap(struct file *file, struct vm_area_struct *vma)
>>>
>>
>>
>> In fact, for TCP, POLLOUT event being ready can also be triggered by
>> incoming messages, as the ACK might allow the user application to push
>> more data in the write queue.
>>
>> And you might check wait->_key to avoid testing flags that user is not
>> interested into.
>
> yes, comparing to _key is more correct.
> In any case this needs to be completely rewritten for support for
> working well with a large number of sockets.
>
Is it possible for wait to be NULL? (do we need to check for that?)
I see that poll_does_not_wait() checks for that, but I could not find
anywhere this is actually done.
-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® Ethernet, visit http://communities.intel.com/community/wired
next prev parent reply other threads:[~2013-06-04 8:53 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 8:01 [PATCH v8 net-next 0/7] net: low latency Ethernet device polling Eliezer Tamir
2013-06-03 8:01 ` [PATCH v8 net-next 1/7] net: add napi_id and hash Eliezer Tamir
2013-06-03 12:58 ` Eric Dumazet
2013-06-03 8:01 ` [PATCH v8 net-next 2/7] net: add low latency socket poll Eliezer Tamir
2013-06-03 8:01 ` Eliezer Tamir
2013-06-03 12:22 ` Amir Vadai
2013-06-03 12:22 ` Amir Vadai
2013-06-03 13:05 ` Eric Dumazet
2013-06-03 13:05 ` Eric Dumazet
2013-06-03 13:53 ` Eliezer Tamir
2013-06-03 8:01 ` [PATCH v8 net-next 3/7] udp: add low latency socket poll support Eliezer Tamir
2013-06-03 8:01 ` Eliezer Tamir
2013-06-03 13:08 ` Eric Dumazet
2013-06-03 8:01 ` [PATCH v8 net-next 4/7] tcp: " Eliezer Tamir
2013-06-03 8:01 ` Eliezer Tamir
2013-06-03 13:09 ` Eric Dumazet
2013-06-03 13:09 ` Eric Dumazet
2013-06-03 8:02 ` [PATCH v8 net-next 5/7] net: simple poll/select low latency socket poll Eliezer Tamir
2013-06-03 8:02 ` Eliezer Tamir
2013-06-03 13:15 ` Eric Dumazet
2013-06-03 13:15 ` Eric Dumazet
2013-06-03 13:59 ` Eliezer Tamir
2013-06-03 13:59 ` Eliezer Tamir
2013-06-04 8:52 ` Eliezer Tamir [this message]
2013-06-04 8:52 ` Eliezer Tamir
2013-06-03 8:02 ` [PATCH v8 net-next 6/7] ixgbe: add support for ndo_ll_poll Eliezer Tamir
2013-06-03 8:02 ` Eliezer Tamir
2013-06-05 8:50 ` Cong Wang
2013-06-03 8:02 ` [PATCH v8 net-next 7/7] ixgbe: add extra stats " Eliezer Tamir
2013-06-03 8:02 ` Eliezer Tamir
2013-06-03 11:23 ` [PATCH v8 net-next 0/7] net: low latency Ethernet device polling Amir Vadai
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=51ADAADD.4030209@linux.intel.com \
--to=eliezer.tamir@linux.intel.com \
--cc=alexr@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.