Messages in this thread | | | From | Wei Fang <> | Subject | RE: [PATCH net 3/3] net: fec: increase the size of tx ring and update thresholds of tx ring | Date | Thu, 6 Jul 2023 06:14:54 +0000 |
| |
> -----Original Message----- > From: Jakub Kicinski <kuba@kernel.org> > Sent: 2023年7月6日 11:12 > To: Wei Fang <wei.fang@nxp.com> > Cc: Andrew Lunn <andrew@lunn.ch>; davem@davemloft.net; > edumazet@google.com; pabeni@redhat.com; ast@kernel.org; > daniel@iogearbox.net; hawk@kernel.org; john.fastabend@gmail.com; > Shenwei Wang <shenwei.wang@nxp.com>; Clark Wang > <xiaoning.wang@nxp.com>; netdev@vger.kernel.org; dl-linux-imx > <linux-imx@nxp.com>; linux-kernel@vger.kernel.org; bpf@vger.kernel.org > Subject: Re: [PATCH net 3/3] net: fec: increase the size of tx ring and update > thresholds of tx ring > > On Thu, 6 Jul 2023 01:44:49 +0000 Wei Fang wrote: > > > But you shouldn't restart the queue for a single packet either. > > > Restarting for a single packet wastes CPU cycles as there will be > > > much more stop / start operations. Two large packets seem like the > > > absolute minimum reasonable wake threshold. > > > > > > Setting tx_stop_threshold to MAX_SKB_FRAGS doesn't seem right > > > either, as you won't be able to accept a full TSO frame. > > > > > Maybe I should keep the tx_stop_threshold unchanged, so that the queue > > is to be stopped if the available BDs is not enough for a full TSO frame to be > attached. > > And then just change tx_wake_threshold to tx_stop_threshold + 1, which > > I think it's more reasonable. > > How about at least tx_stop_threshold + 2 * MAX_SKB_FRAGS ? It's okay. The iperf performance is well as before.
> If a queue of hundreds of entries is overflowing, we should be able to apply a > hysteresis of a few tens of entries. Do you see a difference in drops? The I didn't see there was any packet loss.
> packets from the stack should preferably stay in the qdiscs instead of the driver > queue, where AQM and scheduling can be applied.
| |