diff options
author | Alexander Duyck <alexander.h.duyck@linux.intel.com> | 2018-10-10 16:39:35 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-10-12 08:39:31 -0700 |
commit | 7d47aad4570e5e6e9a8162bb417ca9b74132f27c (patch) | |
tree | d3ced75bf26076e6be01c513f7fdfe22de5a6f1f /drivers/nvdimm/dimm.c | |
parent | 2d657d17f72d2ae70c02f0d0ea6a04ad0f016b57 (diff) | |
download | linux-riscv-7d47aad4570e5e6e9a8162bb417ca9b74132f27c.tar.gz linux-riscv-7d47aad4570e5e6e9a8162bb417ca9b74132f27c.tar.bz2 linux-riscv-7d47aad4570e5e6e9a8162bb417ca9b74132f27c.zip |
nvdimm: Use namespace index data to reduce number of label reads needed
This patch adds logic that is meant to make use of the namespace index data
to reduce the number of reads that are needed to initialize a given
namespace. The general idea is that once we have enough data to validate
the namespace index we do so and then proceed to fetch only those labels
that are not listed as being "free". By doing this I am seeing a total time
reduction from about 4-5 seconds to 2-3 seconds for 24 NVDIMM modules each
with 128K of label config area.
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>
Diffstat (limited to 'drivers/nvdimm/dimm.c')
-rw-r--r-- | drivers/nvdimm/dimm.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/nvdimm/dimm.c b/drivers/nvdimm/dimm.c index 07bf96948553..9899c97138a3 100644 --- a/drivers/nvdimm/dimm.c +++ b/drivers/nvdimm/dimm.c @@ -84,10 +84,6 @@ static int nvdimm_probe(struct device *dev) dev_dbg(dev, "config data size: %d\n", ndd->nsarea.config_size); nvdimm_bus_lock(dev); - ndd->ns_current = nd_label_validate(ndd); - ndd->ns_next = nd_label_next_nsindex(ndd->ns_current); - nd_label_copy(ndd, to_next_namespace_index(ndd), - to_current_namespace_index(ndd)); if (ndd->ns_current >= 0) { rc = nd_label_reserve_dpa(ndd); if (rc == 0) |