All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cheng-mean Liu (SOCCER)" <soccerl-0li6OtcxBFHby3iVrkZq2A@public.gmane.org>
To: "linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org"
	<linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org>,
	Dan Williams
	<dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Matthew Wilcox <willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Matthew Wilcox <mawilcox-0li6OtcxBFHby3iVrkZq2A@public.gmane.org>
Subject: [PATCH] NVDIMM: Reduced-the-ND_MIN_NAMESPACE_SIZE-from-4MB-to-4KB
Date: Thu, 11 Jan 2018 18:49:17 +0000	[thread overview]
Message-ID: <MWHPR21MB074927A9495B1E121D7C8DF2A6160@MWHPR21MB0749.namprd21.prod.outlook.com> (raw)

In the case of emulated NVDIMM devices in the VM environment, there
are scenarios that NVDIMM device with much smaller sizes are desired, for example, we might
use a single enumerated NVDIMM DAX device for representing each container layer, which in some
cases could be just a few KBs size.The current ND_MIN_NAMESPACE_SIZE is 4MB. To avoid wasting
address and inefficient zero padding for meeting this 4MB min requirement, the proposed change is to
reduce it to 4KB, a single page size, is a size good for all platforms.

Two patches are included in this request :

1. A patch for Linux kernel changes
2. A patch for ndctl project to keep it in sync with the Linux kernel header file


>From 29e173c32661d976cda073438979991167ee13fc Mon Sep 17 00:00:00 2001
From: Cheng-mean Liu <soccerl-0li6OtcxBFHby3iVrkZq2A@public.gmane.org>
Date: Thu, 11 Jan 2018 10:06:13 -0800
Subject: [PATCH] reduced the ND_MIN_NAMESPACE_SIZE from 4MB to 4KB

Signed-off-by: Cheng-mean Liu <soccerl-0li6OtcxBFHby3iVrkZq2A@public.gmane.org>
---
include/uapi/linux/ndctl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h
index 3f03567631cb..e63c201ed1ef 100644
--- a/include/uapi/linux/ndctl.h
+++ b/include/uapi/linux/ndctl.h
@@ -263,7 +263,7 @@ enum nd_driver_flags {
};
 enum {
-              ND_MIN_NAMESPACE_SIZE = 0x00400000,
+             ND_MIN_NAMESPACE_SIZE = 0x00001000,
};
 enum ars_masks {
--
2.11.0



>From 2bf3e2bbfae81ab50d141571414c0e6556bc0e0c Mon Sep 17 00:00:00 2001
From: Cheng-mean Liu <soccerl-0li6OtcxBFHby3iVrkZq2A@public.gmane.org>
Date: Thu, 11 Jan 2018 10:02:52 -0800
Subject: [PATCH] reduced the ND_MIN_NAMESPACE_SIZE from 4MB to 4KB

Signed-off-by: Cheng-mean Liu <soccerl-0li6OtcxBFHby3iVrkZq2A@public.gmane.org>
---
ndctl/ndctl.h    | 2 +-
test/dpa-alloc.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ndctl/ndctl.h b/ndctl/ndctl.h
index 5e6905c..8c14d90 100644
--- a/ndctl/ndctl.h
+++ b/ndctl/ndctl.h
@@ -263,7 +263,7 @@ enum nd_driver_flags {
};
 enum {
-              ND_MIN_NAMESPACE_SIZE = 0x00400000,
+             ND_MIN_NAMESPACE_SIZE = 0x00001000,
};
 enum ars_masks {
diff --git a/test/dpa-alloc.c b/test/dpa-alloc.c
index d13cf5d..ba3deed 100644
--- a/test/dpa-alloc.c
+++ b/test/dpa-alloc.c
@@ -237,6 +237,12 @@ static int do_test(struct ndctl_ctx *ctx, struct ndctl_test *test)
                                uuid_unparse(namespaces[i].uuid, uuid_str);
                               size = ndctl_namespace_get_size(victim);
+
+                             rc = ndctl_namespace_disable_invalidate(victim);
+                if (rc) {
+                                             fprintf(stderr, "failed to disable %s\n", uuid_str);
+                                             return rc;
+                             }
                               rc = ndctl_namespace_delete(victim);
                               if (rc) {
                                               fprintf(stderr, "failed to delete %s\n", uuid_str);
--
2.11.0

             reply	other threads:[~2018-01-11 18:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 18:49 Cheng-mean Liu (SOCCER) [this message]
2018-01-16 16:40 ` [PATCH] NVDIMM: Reduced-the-ND_MIN_NAMESPACE_SIZE-from-4MB-to-4KB Ross Zwisler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MWHPR21MB074927A9495B1E121D7C8DF2A6160@MWHPR21MB0749.namprd21.prod.outlook.com \
    --to=soccerl-0li6otcxbfhby3ivrkzq2a@public.gmane.org \
    --cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org \
    --cc=mawilcox-0li6OtcxBFHby3iVrkZq2A@public.gmane.org \
    --cc=willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.