kmalloc cache refactor and pre-alloc in HFI1 open()

This commit is contained in:
Balazs Gerofi
2017-08-23 10:17:14 +09:00
parent d35fa16417
commit bd170e63ba
3 changed files with 31 additions and 14 deletions

View File

@ -1216,6 +1216,12 @@ static inline u32 get_lrh_len(struct hfi1_pkt_header hdr, u32 len)
struct kmalloc_cache_header txreq_cache = {NULL};
void hfi1_txreq_prealloc(void)
{
kmalloc_cache_prealloc(&txreq_cache, sizeof(struct user_sdma_txreq));
}
static int user_sdma_send_pkts(struct user_sdma_request *req, unsigned maxpkts)
{
int ret = 0, count;