search for: 8767401f75e0

Displaying 1 result from an estimated 1 matches for "8767401f75e0".

2019 Apr 27
0
[PATCH AUTOSEL 4.14 26/32] virtio-blk: limit number of hw queues by nr_cpu_ids
...ngli.zhang at oracle.com> Signed-off-by: Jens Axboe <axboe at kernel.dk> Signed-off-by: Sasha Levin <sashal at kernel.org> --- drivers/block/virtio_blk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 68846897d213..8767401f75e0 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -437,6 +437,8 @@ static int init_vq(struct virtio_blk *vblk) if (err) num_vqs = 1; + num_vqs = min_t(unsigned int, nr_cpu_ids, num_vqs); + vblk->vqs = kmalloc_array(num_vqs, sizeof(*vblk->vqs), GFP_KERNEL);...