OSDN Git Service

libnvdimm, dimm: Maximize label transfer size
authorDan Williams <dan.j.williams@intel.com>
Wed, 10 Oct 2018 23:38:24 +0000 (16:38 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 11 Oct 2018 03:54:16 +0000 (20:54 -0700)
commitd11cf4a7321b538563b0ab30dc0d1f18f9c56226
tree6bff022729ff1802b9b65735afe2bbcaea8e63f9
parent91ed7ac444ef749603a95629a5ec483988c4f14b
libnvdimm, dimm: Maximize label transfer size

Use kvzalloc() to bypass the arbitrary PAGE_SIZE limit of label transfer
operations. Given the expense of calling into firmware, maximize the
amount of label data we transfer per call to be up to the total label
space if allowed by the firmware.

Instead of limiting based on PAGE_SIZE we can instead simply limit the
maximum size based on either the config_size int he case of the get
operation, or the length of the write based on the set operation.

On a system with 24 NVDIMM modules each with a config_size of 128K and a
maximum transfer size of 64K - 4, this patch reduces the init time for the
label data from around 24 seconds down to between 4-5 seconds.

Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/dimm_devs.c