From patchwork Wed Oct 10 23:36:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Duyck X-Patchwork-Id: 10635435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 73A1816B1 for ; Wed, 10 Oct 2018 23:36:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50DC92A997 for ; Wed, 10 Oct 2018 23:36:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 450ED2AB51; Wed, 10 Oct 2018 23:36:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D8CBF2A997 for ; Wed, 10 Oct 2018 23:36:25 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6F1E32116524E; Wed, 10 Oct 2018 16:36:25 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: None (no SPF record) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=alexander.h.duyck@linux.intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 34CC321962301 for ; Wed, 10 Oct 2018 16:36:23 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2018 16:36:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,366,1534834800"; d="scan'208";a="80463201" Received: from ahduyck-mobl.amr.corp.intel.com (HELO localhost.localdomain) ([10.7.198.156]) by orsmga008.jf.intel.com with ESMTP; 10 Oct 2018 16:36:15 -0700 Subject: [nvdimm PATCH 0/6] Label initialization time optimizations From: Alexander Duyck To: dan.j.williams@intel.com, linux-nvdimm@lists.01.org Date: Wed, 10 Oct 2018 16:36:15 -0700 Message-ID: <20181010233428.12228.26106.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexander.h.duyck@linux.intel.com, zwisler@kernel.org Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP This patch set is intended to improve NVDIMM label read times by first increasing the upper limit on the label read/write size, and then reducing the number of reads by making use of the free label bitmap in the index to determine what labels are actually populated and only read those labels. In my testing on a system populated with 24 NVDIMM modules I see the total label init time drop from about 24 seconds down to 2 to 3 seconds. In the process of coding this up I came across a few minor issues that I felt should be addressed so I have added a few patches for those fixes along the way. Reviewed-by: Toshi Kani --- Alexander Duyck (5): nvdimm: Sanity check labeloff nvdimm: Clarify comment in sizeof_namespace_index nvdimm: Remove empty if statement nvdimm: Split label init out from the logic for getting config data nvdimm: Use namespace index data to reduce number of label reads needed Dan Williams (1): libnvdimm, dimm: Maximize label transfer size drivers/nvdimm/dimm.c | 6 -- drivers/nvdimm/dimm_devs.c | 60 +++++++------------ drivers/nvdimm/label.c | 142 ++++++++++++++++++++++++++++++++++++++++++-- drivers/nvdimm/label.h | 4 - drivers/nvdimm/nd.h | 2 + 5 files changed, 163 insertions(+), 51 deletions(-) --