[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1260766625.20884.2.camel@localhost>
Date: Sun, 13 Dec 2009 20:57:05 -0800
From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>
To: David Miller <davem@...emloft.net>
Cc: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"gospo@...hat.com" <gospo@...hat.com>,
"Chilakala, Mallikarjuna" <mallikarjuna.chilakala@...el.com>
Subject: Re: [net-2.6 PATCH 2/3] ixgbe: Fix tx_restart_queue/non_eop_desc
statistics counters
On Sun, 2009-12-13 at 19:18 -0800, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> Date: Fri, 11 Dec 2009 23:51:41 -0800
>
> > @@ -4528,10 +4529,12 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
> >
> > /* gather some stats to the adapter struct that are per queue */
> > for (i = 0; i < adapter->num_tx_queues; i++)
> > - adapter->restart_queue += adapter->tx_ring[i].restart_queue;
> > + restart_queue += adapter->tx_ring[i]->restart_queue;
> > + adapter->restart_queue = restart_queue;
>
> I don't see how these two versions of the code can behave
> differently unless there is very broken locking on the
> adapter->* statistic counters.
The problem is the adapter->restart_queue is being double-counted. If
we accumulate from each ring's restart_queue, which are cumulative, then
we don't want to add it to the previous update_stats() values in
adapter->restart_queue.
> I'm not applying this without at least a better commit
> log message.
We can fix the commit log message to better explain what the problem is.
Thanks,
-PJ
--
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