]> git.baikalelectronics.ru Git - kernel.git/commit
net/rds: Use DMA memory pool allocation for rds_header
authorKa-Cheong Poon <ka-cheong.poon@oracle.com>
Thu, 3 Oct 2019 04:11:08 +0000 (21:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Oct 2019 19:11:08 +0000 (12:11 -0700)
commit6a439997002afffc888bfdf5b8a639bb6827c0d2
treec82ada52740a8a0c38cc6931ef83ddd742b120f2
parent854a15b522f4630a9d0f5264c43f7740c68dc4a9
net/rds: Use DMA memory pool allocation for rds_header

Currently, RDS calls ib_dma_alloc_coherent() to allocate a large piece
of contiguous DMA coherent memory to store struct rds_header for
sending/receiving packets.  The memory allocated is then partitioned
into struct rds_header.  This is not necessary and can be costly at
times when memory is fragmented.  Instead, RDS should use the DMA
memory pool interface to handle this.  The DMA addresses of the pre-
allocated headers are stored in an array.  At send/receive ring
initialization and refill time, this arrary is de-referenced to get
the DMA addresses.  This array is not accessed at send/receive packet
processing.

Suggested-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Ka-Cheong Poon <ka-cheong.poon@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/ib.c
net/rds/ib.h
net/rds/ib_cm.c
net/rds/ib_recv.c
net/rds/ib_send.c