[PATCH 02/11] lib/scatterlist: Skip requesting zeroed allocations in sgl_alloc_order
Tvrtko Ursulin
tursulin at ursulin.net
Fri Feb 16 14:46:32 UTC 2018
From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
sg_init_table will clear the allocated block so requesting zeroed memory
from the allocator is redundant.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Bart Van Assche <bart.vanassche at wdc.com>
Cc: Hannes Reinecke <hare at suse.com>
Cc: Johannes Thumshirn <jthumshirn at suse.de>
Cc: Jens Axboe <axboe at kernel.dk>
---
lib/scatterlist.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 068a1f494583..67164b4f7650 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -511,8 +511,7 @@ struct scatterlist *sgl_alloc_order(unsigned long length, unsigned int order,
nent++;
}
- sgl = kmalloc_array(nent, sizeof(struct scatterlist),
- (gfp & ~GFP_DMA) | __GFP_ZERO);
+ sgl = kmalloc_array(nent, sizeof(struct scatterlist), (gfp & ~GFP_DMA));
if (!sgl)
return NULL;
--
2.14.1
More information about the Intel-gfx-trybot
mailing list