[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] netback: maintain stats for both kinds of copied SKBs
# HG changeset patch # User Jan Beulich <jbeulich@xxxxxxxx> # Date 1441785142 -7200 # Node ID b4bb467e5c077745957e26ea6872cfc65e87e4c2 # Parent 36fb301948766f3ac9efbf87f16595d50dbc41b9 netback: maintain stats for both kinds of copied SKBs The copying on the (guest) receive path is expensive, so worth keeping an eye on too. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- diff -r 36fb30194876 -r b4bb467e5c07 drivers/xen/netback/common.h --- a/drivers/xen/netback/common.h Wed Sep 09 09:51:35 2015 +0200 +++ b/drivers/xen/netback/common.h Wed Sep 09 09:52:22 2015 +0200 @@ -93,7 +93,8 @@ typedef struct netif_st { struct timer_list tx_queue_timeout; /* Statistics */ - unsigned long nr_copied_skbs; + unsigned long nr_copied_rx_skbs; + unsigned long nr_copied_tx_skbs; /* Miscellaneous private stuff. */ struct list_head list; /* scheduling list */ diff -r 36fb30194876 -r b4bb467e5c07 drivers/xen/netback/interface.c --- a/drivers/xen/netback/interface.c Wed Sep 09 09:51:35 2015 +0200 +++ b/drivers/xen/netback/interface.c Wed Sep 09 09:52:22 2015 +0200 @@ -176,7 +176,8 @@ static const struct netif_stat { char name[ETH_GSTRING_LEN]; u16 offset; } netbk_stats[] = { - { "copied_skbs", offsetof(netif_t, nr_copied_skbs) / sizeof(long) }, + { "copied_rx_skbs", offsetof(netif_t, nr_copied_rx_skbs) / sizeof(long) }, + { "copied_tx_skbs", offsetof(netif_t, nr_copied_tx_skbs) / sizeof(long) }, }; static int netbk_get_stats_count(struct net_device *dev) diff -r 36fb30194876 -r b4bb467e5c07 drivers/xen/netback/netback.c --- a/drivers/xen/netback/netback.c Wed Sep 09 09:51:35 2015 +0200 +++ b/drivers/xen/netback/netback.c Wed Sep 09 09:52:22 2015 +0200 @@ -319,6 +319,7 @@ int netif_be_start_xmit(struct sk_buff * nskb->proto_data_valid = skb->proto_data_valid; dev_kfree_skb(skb); skb = nskb; + netif->nr_copied_rx_skbs++; } netif->rx_req_cons_peek += skb_shinfo(skb)->nr_frags + 1 + @@ -969,7 +970,7 @@ inline static void net_tx_action_dealloc pending_idx = inuse - pending_inuse; - pending_tx_info[pending_idx].netif->nr_copied_skbs++; + pending_tx_info[pending_idx].netif->nr_copied_tx_skbs++; switch (copy_pending_req(pending_idx)) { case 0: _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |