Re: [PATCH 1/2] ucc_geth: Move freeing of TX packets to NAPI context.
From: Li Yang <hidden>
Date: 2009-03-30 07:36:23
Also in:
netdev
On Fri, Mar 27, 2009 at 7:52 PM, Joakim Tjernlund [off-list ref] wrote:
pku.leo@gmail.com wrote on 27/03/2009 11:50:09:quoted
On Thu, Mar 26, 2009 at 8:54 PM, Joakim Tjernlund [off-list ref] wrote:quoted
Also set NAPI weight to 64 as this is a common value. This will make the system alot more responsive while ping flooding the ucc_geth ethernet interaface. Signed-off-by: Joakim Tjernlund <redacted> --- =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Errors and other events */ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (ucce & UCCE_OTHER) { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (ucce & UCC_=
GETH_UCCE_BSY)
quoted
quoted
@@ -3733,7 +3725,7 @@ static int ucc_geth_probe(struct of_device*ofdev, const struct of_device_id *maquoted
quoted
=C2=A0 =C2=A0 =C2=A0 =C2=A0dev->netdev_ops =3D &ucc_geth_netdev_ops; =C2=A0 =C2=A0 =C2=A0 =C2=A0dev->watchdog_timeo =3D TX_TIMEOUT; =C2=A0 =C2=A0 =C2=A0 =C2=A0INIT_WORK(&ugeth->timeout_work, ucc_geth_ti=
meout_work);
quoted
quoted
- =C2=A0 =C2=A0 =C2=A0 netif_napi_add(dev, &ugeth->napi, ucc_geth_poll=
,
UCC_GETH_DEV_WEIGHT);quoted
quoted
+ =C2=A0 =C2=A0 =C2=A0 netif_napi_add(dev, &ugeth->napi, ucc_geth_poll=
, 64);
quoted
It doesn't make sense to have larger napi budget than the size of RX BD ring. =C2=A0You can't have more BDs than RX_BD_RING_LEN in backlog fo=
r
quoted
napi_poll to process. =C2=A0Increase the RX_BD_RING_LEN if you want to increase UCC_GETH_DEV_WEIGHT. =C2=A0However please also provide the performance comparison for this kind of change. =C2=A0ThanksBring it up with David Miller. After my initial attempt to just increase weight somewhat, he requested that I hardcoded it to 64. Just read the whole thread. If I don't increase weight somewhat, ping -f -l 3 almost halts the board. Logging in takes forever. These are my "performance numbers".
Faster response time is surely good. But it might also mean CPU is not fully loaded. IMHO, throughput is a more important factor for network devices. When you try to optimize the driver, please also consider the throughput change. Thanks. - Leo