[<prev] [next>] [day] [month] [year] [list]
Message-ID: <65795E11DBF1E645A09CEC7EAEE94B9C402B96E2@USINDEVS02.corp.hds.com>
Date: Fri, 17 Jun 2011 17:54:08 -0400
From: Satoru Moriya <satoru.moriya@....com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "nhorman@...driver.com" <nhorman@...driver.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"dle-develop@...ts.sourceforge.net"
<dle-develop@...ts.sourceforge.net>,
Seiji Aguchi <seiji.aguchi@....com>
Subject: PATCH 0/2] Tracepoints for queueing skb to rcvbuf
Hi,
Kernel may drops packets when it queues them to socket receive buffer.
Currently We can detect packet drop events and know when and where it
happened via kfree_skb tracepoint. But it's difficult to know a detailed
reason because there are some possibilities.
In UDP case, core function for queueing skb to socket rcvbuf is
__udp_queue_rcv_skb and its call chain is following:
__udp_queue_rcv_skb
ip_queue_rcv_skb
sock_queue_rcv_skb
sk_rmem_schedule
__sk_mem_schedule
We can catch a packet drop event in __udp_queue_rcv_skb and it means
ip_queue_rcv_skb/sock_queue_rcv_skb returned negative value.
In sock_queue_rcv_skb there are 3 possibilities-(*) where it returns
negative value but we can't separate them. Moreover sock_queue_rcv_skb calls
__sk_mem_schedule and there are several if satetements to decide whether
kernel should drop the packet.
To separate these reasons, this patchset adds 3 tracepoints.
1st one is added to __udp_queue_rcv_skb to get return value of
ip_queue_rcv_skb. Analyzing it we can separate above (*) (3 possibilities).
2nd and 3rd one are to get more detailed information. We can collect status
of socket receive queue and related parameters(some of them are sysctl knob
e.g. /proc/sys/net/ipv4/udp_mem, etc. for UDP) and then we can tune kernel
behavior easily.
Any comments and feedback are welcome.
Satoru Moriya (2):
udp: add tracepoint for queueing skb to rcvbuf
core: add tracepoints for queueing skb to rcvbuf
include/trace/events/sock.h | 68 +++++++++++++++++++++++++++++++++++++++++++
include/trace/events/udp.h | 32 ++++++++++++++++++++
net/core/net-traces.c | 2 +
net/core/sock.c | 5 +++
net/ipv4/udp.c | 2 +
5 files changed, 109 insertions(+), 0 deletions(-)
create mode 100644 include/trace/events/sock.h
create mode 100644 include/trace/events/udp.h
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists