2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 20:23:57 +08:00
linux-next/drivers/dma
Shannon Nelson 54a09feb0e [IOAT]: Remove redundant struct member to avoid descriptor cache miss
The layout for struct ioat_desc_sw is non-optimal and causes an extra
cache hit for every descriptor processed.  By tightening up the struct
layout and removing one item, we pull in the fields that get used in
the speedpath and get a little better performance.


Before:
-------
struct ioat_desc_sw {
	struct ioat_dma_descriptor * hw;                 /*     0     8
*/
	struct list_head           node;                 /*     8    16
*/
	int                        tx_cnt;               /*    24     4
*/

	/* XXX 4 bytes hole, try to pack */

	dma_addr_t                 src;                  /*    32     8
*/
	__u32                      src_len;              /*    40     4
*/

	/* XXX 4 bytes hole, try to pack */

	dma_addr_t                 dst;                  /*    48     8
*/
	__u32                      dst_len;              /*    56     4
*/

	/* XXX 4 bytes hole, try to pack */

	/* --- cacheline 1 boundary (64 bytes) --- */
	struct dma_async_tx_descriptor async_tx;         /*    64   144
*/
	/* --- cacheline 3 boundary (192 bytes) was 16 bytes ago --- */

	/* size: 208, cachelines: 4 */
	/* sum members: 196, holes: 3, sum holes: 12 */
	/* last cacheline: 16 bytes */
};	/* definitions: 1 */


After:
------

struct ioat_desc_sw {
	struct ioat_dma_descriptor * hw;                 /*     0     8
*/
	struct list_head           node;                 /*     8    16
*/
	int                        tx_cnt;               /*    24     4
*/
	__u32                      len;                  /*    28     4
*/
	dma_addr_t                 src;                  /*    32     8
*/
	dma_addr_t                 dst;                  /*    40     8
*/
	struct dma_async_tx_descriptor async_tx;         /*    48   144
*/
	/* --- cacheline 3 boundary (192 bytes) --- */

	/* size: 192, cachelines: 3 */
};	/* definitions: 1 */


Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-14 17:36:31 -07:00
..
dmaengine.c dmaengine: make clients responsible for managing channels 2007-07-13 08:06:13 -07:00
ioatdma_hw.h [I/OAT]: Driver for the Intel(R) I/OAT DMA engine 2006-06-17 21:18:46 -07:00
ioatdma_registers.h [IOAT]: fix sparse ulong warning 2006-07-03 19:24:19 -07:00
ioatdma.c [IOAT]: Remove redundant struct member to avoid descriptor cache miss 2007-08-14 17:36:31 -07:00
ioatdma.h [IOAT]: Remove redundant struct member to avoid descriptor cache miss 2007-08-14 17:36:31 -07:00
iop-adma.c dmaengine: driver for the iop32x, iop33x, and iop13xx raid engines 2007-07-13 08:06:18 -07:00
iovlock.c [NET_DMA]: remove unused dma_memcpy_to_kernel_iovec 2007-07-31 02:28:03 -07:00
Kconfig dma-mapping: prevent dma dependent code from linking on !HAS_DMA archs 2007-07-16 09:05:45 -07:00
Makefile dmaengine: driver for the iop32x, iop33x, and iop13xx raid engines 2007-07-13 08:06:18 -07:00