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.

-Eliezer

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to