* [PATCH]: rfs: record flow in TCP receiving and sending pathes
@ 2010-07-09 7:28 Changli Gao
2010-07-09 17:51 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Changli Gao @ 2010-07-09 7:28 UTC (permalink / raw)
To: David S. Miller; +Cc: Tom Herbert, netdev, Changli Gao
rfs: record flow in TCP receiving and sending pathes
call sock_rps_record_flow() in function tcp_splice_read(), tcp_sendpage() and
tcp_sendmsg().
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
net/ipv4/tcp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 4e6ddfb..47537d8 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -608,6 +608,7 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos,
ssize_t spliced;
int ret;
+ sock_rps_record_flow(sk);
/*
* We can't seek on a socket input
*/
@@ -862,6 +863,7 @@ ssize_t tcp_sendpage(struct socket *sock, struct page *page, int offset,
ssize_t res;
struct sock *sk = sock->sk;
+ sock_rps_record_flow(sk);
if (!(sk->sk_route_caps & NETIF_F_SG) ||
!(sk->sk_route_caps & NETIF_F_ALL_CSUM))
return sock_no_sendpage(sock, page, offset, size, flags);
@@ -909,6 +911,7 @@ int tcp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
int sg, err, copied;
long timeo;
+ sock_rps_record_flow(sk);
lock_sock(sk);
TCP_CHECK_TIMER(sk);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH]: rfs: record flow in TCP receiving and sending pathes
2010-07-09 7:28 [PATCH]: rfs: record flow in TCP receiving and sending pathes Changli Gao
@ 2010-07-09 17:51 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-07-09 17:51 UTC (permalink / raw)
To: xiaosuo; +Cc: therbert, netdev
From: Changli Gao <xiaosuo@gmail.com>
Date: Fri, 9 Jul 2010 15:28:18 +0800
> rfs: record flow in TCP receiving and sending pathes
>
> call sock_rps_record_flow() in function tcp_splice_read(), tcp_sendpage() and
> tcp_sendmsg().
>
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
I don't think it's wise to pepper these calls all over the place if it
is not necessary.
The only reason we vector straight to the TCP implementations of these
I/O routines is to avoid the port autobinding made by the inet_*()
functions.
But now that avoids also the RPS calls.
So it makes sense to just add a boolean state bit flag of some sort
to "struct proto" which says to avoid the autobind calls, then
make TCP vector through the inet_*() functions just like the other
inet protocols do.
Then these extra send_rps_record_flow() annotations will not be
necessary.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-09 17:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-09 7:28 [PATCH]: rfs: record flow in TCP receiving and sending pathes Changli Gao
2010-07-09 17:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).