From: Amir Vadai <amirv@mellanox.com>
To: Eliezer Tamir <eliezer.tamir@linux.intel.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>,
Eric Dumazet <erdnetdev@gmail.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 v7 net-next 2/5] net: implement support for low latency socket polling
Date: Thu, 30 May 2013 18:07:27 +0300 [thread overview]
Message-ID: <51A76B2F.8010904@mellanox.com> (raw)
In-Reply-To: <20130530114111.12653.25023.stgit@ladj378.jer.intel.com>
On 30/05/2013 14:41, Eliezer Tamir wrote:
> diff --git a/fs/select.c b/fs/select.c
> index 8c1c96c..f116bf0 100644
> --- a/fs/select.c
> +++ b/fs/select.c
> @@ -27,6 +27,7 @@
> #include <linux/rcupdate.h>
> #include <linux/hrtimer.h>
> #include <linux/sched/rt.h>
> +#include <net/ll_poll.h>
>
> #include <asm/uaccess.h>
>
> @@ -400,6 +401,7 @@ int do_select(int n, fd_set_bits *fds, struct timespec *end_time)
> poll_table *wait;
> int retval, i, timed_out = 0;
> unsigned long slack = 0;
> + cycles_t ll_time = ll_end_time();
>
> rcu_read_lock();
> retval = max_select_fd(n, fds);
> @@ -486,6 +488,8 @@ int do_select(int n, fd_set_bits *fds, struct timespec *end_time)
> break;
> }
>
> + if (can_poll_ll(ll_time))
> + continue;
I don't see here discrimination between sockets that you want to poll
and other sockets.
So it means that select will busy poll every type of file descriptor
instead of going to sleep.
Should have a condition with something like sk_valid_ll()
> /*
> * If this is the first loop and we have a timeout
> * given, then we convert to ktime_t and set the to
...
> +static inline void sk_mark_ll(struct sock *sk, struct sk_buff *skb)
> +{
> +}
> +
> +static inline bool can_poll_ll(unsigned long end_time)
should use here cycles_t too.
> +{
> + return false;
> +}
> +
> +#endif /* CONFIG_NET_LL_RX_POLL */
> +#endif /* _LINUX_NET_LL_POLL_H */
Also, something general about this patch. I think you should split out
to separate patches all the users of the feature, like you did for TCP.
I would suggest small patches for UDP, select and poll.
Thanks,
Amir
next prev parent reply other threads:[~2013-05-30 15:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 11:40 [PATCH v7 net-next 0/5] net: low latency Ethernet device polling Eliezer Tamir
2013-05-30 11:40 ` [PATCH v7 net-next 1/5] net: add napi_id and hash Eliezer Tamir
2013-05-30 11:41 ` [PATCH v7 net-next 2/5] net: implement support for low latency socket polling Eliezer Tamir
2013-05-30 15:07 ` Amir Vadai [this message]
2013-05-30 20:01 ` Eliezer Tamir
2013-05-30 11:41 ` [PATCH v7 net-next 3/5] tcp: add TCP support for low latency receive poll Eliezer Tamir
2013-05-30 11:41 ` [PATCH v7 net-next 4/5] ixgbe: Add support for ndo_ll_poll Eliezer Tamir
2013-05-31 3:32 ` Cong Wang
2013-05-30 11:41 ` [PATCH v7 net-next 5/5] ixgbe: add extra stats " Eliezer Tamir
2013-06-02 14:02 ` [PATCH v7 net-next 0/5] net: low latency Ethernet device polling Eliezer Tamir
2013-06-02 20:11 ` 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=51A76B2F.8010904@mellanox.com \
--to=amirv@mellanox.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@linux.intel.com \
--cc=eliezer@tamir.org.il \
--cc=erdnetdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox