netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Tracepoints for queueing skb to rcvbuf
@ 2011-06-17 21:56 Satoru Moriya
  2011-06-17 21:58 ` [PATCH 1/2] udp: add tracepoints " Satoru Moriya
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Satoru Moriya @ 2011-06-17 21:56 UTC (permalink / raw)
  To: netdev@vger.kernel.org
  Cc: nhorman@tuxdriver.com, davem@davemloft.net,
	dle-develop@lists.sourceforge.net, Seiji Aguchi

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-06-21 23:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-17 21:56 [PATCH 0/2] Tracepoints for queueing skb to rcvbuf Satoru Moriya
2011-06-17 21:58 ` [PATCH 1/2] udp: add tracepoints " Satoru Moriya
2011-06-21 10:47   ` Neil Horman
2011-06-21 11:58     ` Hagen Paul Pfeifer
2011-06-21 13:50       ` Neil Horman
2011-06-21 14:48         ` Hagen Paul Pfeifer
2011-06-21 17:14           ` Steven Rostedt
2011-06-17 22:00 ` [PATCH 2/2] core: " Satoru Moriya
2011-06-21 10:48   ` Neil Horman
2011-06-21 23:07 ` [PATCH 0/2] Tracepoints " 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).