aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorEliezer Tamir <eliezer.tamir@linux.intel.com>2013-06-24 03:28:03 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-25 19:35:52 -0400
commit2d48d67fa8cd129ea85ea02d91b4a793286866f8 (patch)
treebe47e2406605760d949b08d29d988d46c4a20799 /net/core
parente4f2379db6c6823c5d4a4c2c912df00c65de51d7 (diff)
net: poll/select low latency socket support
select/poll busy-poll support. Split sysctl value into two separate ones, one for read and one for poll. updated Documentation/sysctl/net.txt Add a new poll flag POLL_LL. When this flag is set, sock_poll will call sk_poll_ll if possible. sock_poll sets this flag in its return value to indicate to select/poll when a socket that can busy poll is found. When poll/select have nothing to report, call the low-level sock_poll again until we are out of time or we find something. Once the system call finds something, it stops setting POLL_LL, so it can return the result to the user ASAP. Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/sock.c2
-rw-r--r--net/core/sysctl_net_core.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 1e744b12fda3..b6c619f4d47b 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2307,7 +2307,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
2307 2307
2308#ifdef CONFIG_NET_LL_RX_POLL 2308#ifdef CONFIG_NET_LL_RX_POLL
2309 sk->sk_napi_id = 0; 2309 sk->sk_napi_id = 0;
2310 sk->sk_ll_usec = sysctl_net_ll_poll; 2310 sk->sk_ll_usec = sysctl_net_ll_read;
2311#endif 2311#endif
2312 2312
2313 /* 2313 /*
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index 62702c2053de..afc677eadd93 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -306,6 +306,14 @@ static struct ctl_table net_core_table[] = {
306 .mode = 0644, 306 .mode = 0644,
307 .proc_handler = proc_dointvec 307 .proc_handler = proc_dointvec
308 }, 308 },
309 {
310 .procname = "low_latency_read",
311 .data = &sysctl_net_ll_read,
312 .maxlen = sizeof(unsigned int),
313 .mode = 0644,
314 .proc_handler = proc_dointvec
315 },
316#
309#endif 317#endif
310#endif /* CONFIG_NET */ 318#endif /* CONFIG_NET */
311 { 319 {