[PATCHv14 10/11] nvme: register fdp parameters with the block layer
Christoph Hellwig
hch at lst.de
Mon Dec 16 08:12:55 PST 2024
On Wed, Dec 11, 2024 at 10:35:13AM -0800, Keith Busch wrote:
> + size = le32_to_cpu(hdr.sze);
> + if (size > PAGE_SIZE * MAX_ORDER_NR_PAGES) {
> + dev_warn(ctrl->device, "FDP config size too large:%zu\n",
> + size);
> + return 0;
> + h = vmalloc(size);
> + if (!h)
> + return -ENOMEM;
Isn't an unconditional vmalloc here for something that usually should
have less than a handful of descriptors a little aggressive? I'd use
kvmalloc here to get the best of both worlds, and the free path seems
to already use kvfree anyway.
Otherwise the incremental changes vs the previous version for the entire
series look good to me.
More information about the Linux-nvme
mailing list