瀏覽代碼

ag71xx: Reorder ring struct for lower cache thrashing.

Based on Qualcomm's upstream code. Reordered a bit different.

iperf3 speed goes from ~279mbps to ~320mbps on an Archer C7v4.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Rosen Penev 6 年之前
父節點
當前提交
f74ce430f2
共有 1 個文件被更改,包括 8 次插入5 次删除
  1. 8 5
      target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h

+ 8 - 5
target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h

@@ -105,13 +105,16 @@ struct ag71xx_buf {
 };
 
 struct ag71xx_ring {
-	struct ag71xx_buf	*buf;
-	u8			*descs_cpu;
-	dma_addr_t		descs_dma;
-	u16			desc_split;
-	u16			order;
+	/* "Hot" fields in the data path. */
 	unsigned int		curr;
 	unsigned int		dirty;
+
+	/* "Cold" fields - not used in the data path. */
+	struct ag71xx_buf	*buf;
+	u16			order;
+	u16			desc_split;
+	dma_addr_t		descs_dma;
+	u8			*descs_cpu;
 };
 
 struct ag71xx_mdio {