Hackers know password from your account. Password must be changed now.
by linux-nvdimm@lists.01.org
Hi, your account has been infected! Renew the password this time!
You do not know anything about me and you may be probably surprised for what reason you're reading this particular letter, proper?
I'm hacker who exploitedyour emailand all devicesnot so long ago.
Never try out to msg me or alternatively seek for me, it's impossible,
because I forwarded you this message using YOUR hacked account.
I've installed special program on the adult videos (porno) site
and guess that you visited this site to have fun (you understand what I mean).
While you have been keeping an eye on video clips,
your internet browser started out to act like a RDP (Remote Control)
having a keylogger that provided me access to your screen and network camera.
Then, my softobtainedall information.
You have typed passcodes on the online resources you visited, I caught them.
Surely, you are able change each of them, or have already modified them.
However it doesn't matter, my program renews needed data regularly.
What actually I have done?
I generated a reserve copy of every your system. Of all the files and each contact.
I formed a dual-screen videofile.
The first part displays the film that you were watching (you have got an interesting preferences, ahahhh...),
and the second screen displays the recording from your own camera.
What exactly should you do?
Clearly, I think, $774(USD) will be a fair price for our small riddle.
You will make the deposit by bitcoins
(if you do not understand this, go searching "how to purchase bitcoin" in any search engine).
My bitcoin wallet address: 12s4cfoNTzT68gSdxLjmSRT3qdvaqwDWNz
(It is cAsE sensitive, so copy and paste it).
Important:
You will have 2 days in order to make the payment.
(I have an unique pixel in this letter, and at the moment I understand that you've read through this email).
To tracethe reading of a messageand the actionsin it, I utilizea Facebook pixel.
Thanks to them. (That whichis usedfor the authorities may helpus.)
In case I fail to get bitcoins,
I shall undoubtedly send your video files to each of your contacts, along with relatives, co-workers, etc?
1 year, 10 months
[ndctl PATCH] ndctl/list: Introduce region capability objects
by Dan Williams
For common capabilities that a region can create provide a json object
of the following form:
"capabilities":[
{
"mode":"sector",
"sector_sizes":[
512,
520,
528,
4096,
4104,
4160,
4224
]
},
{
"mode":"fsdax",
"alignments":[
4096,
2097152,
1073741824
]
},
{
"mode":"devdax",
"alignments":[
4096,
2097152,
1073741824
]
}
]
This replaces the "supported_alignments" and "supported sector sizes"
fields which ended up being too repetitive at the namespace level.
Cc: Oliver O'Halloran <oohall(a)gmail.com>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
Documentation/ndctl/ndctl-list.txt | 9 +++-
ndctl/list.c | 12 +++++
util/json.c | 89 +++++++++++++++++++++++++++++-------
util/json.h | 2 +
4 files changed, 93 insertions(+), 19 deletions(-)
diff --git a/Documentation/ndctl/ndctl-list.txt b/Documentation/ndctl/ndctl-list.txt
index bdd69add9f22..80ad6100060f 100644
--- a/Documentation/ndctl/ndctl-list.txt
+++ b/Documentation/ndctl/ndctl-list.txt
@@ -175,6 +175,12 @@ include::xable-region-options.txt[]
--idle::
Include idle (not enabled) devices in the listing
+-C::
+--capabilities::
+ Include region capabilities in the listing, i.e. supported
+ namespace modes and variable properties like sector sizes and
+ alignments.
+
-M::
--media-errors::
Include media errors (badblocks) in the listing. Note that the
@@ -222,7 +228,8 @@ include::xable-region-options.txt[]
Everything '-v' provides, plus automatically enable --dimms,
--buses, and --regions. +
- *-vvv*
- Everything '-vv' provides, plus --health, --idle, and --firmware.
+ Everything '-vv' provides, plus --health, --capabilities,
+ --idle, and --firmware.
include::human-option.txt[]
diff --git a/ndctl/list.c b/ndctl/list.c
index 506404db11b0..1c3e34d58ddb 100644
--- a/ndctl/list.c
+++ b/ndctl/list.c
@@ -36,6 +36,7 @@ static struct {
bool media_errors;
bool human;
bool firmware;
+ bool capabilities;
int verbose;
} list;
@@ -53,6 +54,8 @@ static unsigned long listopts_to_flags(void)
flags |= UTIL_JSON_HUMAN;
if (list.verbose)
flags |= UTIL_JSON_VERBOSE;
+ if (list.capabilities)
+ flags |= UTIL_JSON_CAPABILITIES;
return flags;
}
@@ -186,6 +189,12 @@ static struct json_object *region_to_json(struct ndctl_region *region,
if ((flags & UTIL_JSON_MEDIA_ERRORS) && jbbs)
json_object_object_add(jregion, "badblocks", jbbs);
+ if (flags & UTIL_JSON_CAPABILITIES) {
+ jobj = util_region_capabilities_to_json(region);
+ if (jobj)
+ json_object_object_add(jregion, "capabilities", jobj);
+ }
+
pd = ndctl_region_get_persistence_domain(region);
switch (pd) {
case PERSISTENCE_CPU_CACHE:
@@ -450,6 +459,8 @@ int cmd_list(int argc, const char **argv, struct ndctl_ctx *ctx)
"include namespace info (default)"),
OPT_BOOLEAN('X', "device-dax", &list.dax,
"include device-dax info"),
+ OPT_BOOLEAN('C', "capabilities", &list.capabilities,
+ "include region capability info"),
OPT_BOOLEAN('i', "idle", &list.idle, "include idle devices"),
OPT_BOOLEAN('M', "media-errors", &list.media_errors,
"include media errors"),
@@ -487,6 +498,7 @@ int cmd_list(int argc, const char **argv, struct ndctl_ctx *ctx)
list.idle = true;
list.firmware = true;
list.health = true;
+ list.capabilities = true;
case 2:
list.dimms = true;
list.buses = true;
diff --git a/util/json.c b/util/json.c
index c732f1b77522..babdc8c47565 100644
--- a/util/json.c
+++ b/util/json.c
@@ -321,7 +321,7 @@ struct json_object *util_daxctl_devs_to_list(struct daxctl_region *region,
}
#define _SZ(get_max, get_elem, type) \
-static struct json_object *type##_build_size_array(struct type *arg) \
+static struct json_object *util_##type##_build_size_array(struct ndctl_##type *arg) \
{ \
struct json_object *arr = json_object_new_array(); \
int i; \
@@ -346,11 +346,78 @@ err: \
return NULL; \
}
#define SZ(type, kind) _SZ(ndctl_##type##_get_num_##kind##s, \
- ndctl_##type##_get_supported_##kind, ndctl_##type)
+ ndctl_##type##_get_supported_##kind, type)
SZ(pfn, alignment)
SZ(dax, alignment)
SZ(btt, sector_size)
-//SZ(namespace, sector_size)
+
+struct json_object *util_region_capabilities_to_json(struct ndctl_region *region)
+{
+ struct json_object *jcaps, *jcap, *jobj;
+ struct ndctl_btt *btt = ndctl_region_get_btt_seed(region);
+ struct ndctl_pfn *pfn = ndctl_region_get_pfn_seed(region);
+ struct ndctl_dax *dax = ndctl_region_get_dax_seed(region);
+
+ if (!btt || !pfn || !dax)
+ return NULL;
+
+ jcaps = json_object_new_array();
+ if (!jcaps)
+ return NULL;
+
+ if (btt) {
+ jcap = json_object_new_object();
+ if (!jcap)
+ goto err;
+ json_object_array_add(jcaps, jcap);
+
+ jobj = json_object_new_string("sector");
+ if (!jobj)
+ goto err;
+ json_object_object_add(jcap, "mode", jobj);
+ jobj = util_btt_build_size_array(btt);
+ if (!jobj)
+ goto err;
+ json_object_object_add(jcap, "sector_sizes", jobj);
+ }
+
+ if (pfn) {
+ jcap = json_object_new_object();
+ if (!jcap)
+ goto err;
+ json_object_array_add(jcaps, jcap);
+
+ jobj = json_object_new_string("fsdax");
+ if (!jobj)
+ goto err;
+ json_object_object_add(jcap, "mode", jobj);
+ jobj = util_pfn_build_size_array(pfn);
+ if (!jobj)
+ goto err;
+ json_object_object_add(jcap, "alignments", jobj);
+ }
+
+ if (dax) {
+ jcap = json_object_new_object();
+ if (!jcap)
+ goto err;
+ json_object_array_add(jcaps, jcap);
+
+ jobj = json_object_new_string("devdax");
+ if (!jobj)
+ goto err;
+ json_object_object_add(jcap, "mode", jobj);
+ jobj = util_dax_build_size_array(dax);
+ if (!jobj)
+ goto err;
+ json_object_object_add(jcap, "alignments", jobj);
+ }
+
+ return jcaps;
+err:
+ json_object_put(jcaps);
+ return NULL;
+}
struct json_object *util_daxctl_region_to_json(struct daxctl_region *region,
const char *ident, unsigned long flags)
@@ -788,7 +855,7 @@ struct json_object *util_namespace_to_json(struct ndctl_namespace *ndns,
{
struct json_object *jndns = json_object_new_object();
enum ndctl_pfn_loc loc = NDCTL_PFN_LOC_NONE;
- struct json_object *jobj, *jbbs = NULL, *size_array = NULL;
+ struct json_object *jobj, *jbbs = NULL;
const char *locations[] = {
[NDCTL_PFN_LOC_NONE] = "none",
[NDCTL_PFN_LOC_RAM] = "mem",
@@ -798,7 +865,6 @@ struct json_object *util_namespace_to_json(struct ndctl_namespace *ndns,
unsigned int sector_size = UINT_MAX;
enum ndctl_namespace_mode mode;
const char *bdev = NULL, *name;
- const char *size_array_name;
unsigned int bb_count = 0;
struct ndctl_btt *btt;
struct ndctl_pfn *pfn;
@@ -986,19 +1052,6 @@ struct json_object *util_namespace_to_json(struct ndctl_namespace *ndns,
json_object_object_add(jndns, "numa_node", jobj);
}
- if (pfn) {
- size_array_name = "supported_alignments";
- size_array = ndctl_pfn_build_size_array(pfn);
- } else if (dax) {
- size_array_name = "supported_alignments";
- size_array = ndctl_dax_build_size_array(dax);
- } else if (btt) {
- size_array_name = "supported sector sizes";
- size_array = ndctl_btt_build_size_array(btt);
- }
- if (size_array && flags & UTIL_JSON_VERBOSE)
- json_object_object_add(jndns, size_array_name, size_array);
-
if (pfn)
jbbs = util_pfn_badblocks_to_json(pfn, &bb_count, flags);
else if (dax)
diff --git a/util/json.h b/util/json.h
index e292973dbbbf..7c3f64932cec 100644
--- a/util/json.h
+++ b/util/json.h
@@ -24,6 +24,7 @@ enum util_json_flags {
UTIL_JSON_DAX_DEVS = (1 << 3),
UTIL_JSON_HUMAN = (1 << 4),
UTIL_JSON_VERBOSE = (1 << 5),
+ UTIL_JSON_CAPABILITIES = (1 << 6),
};
struct json_object;
@@ -56,4 +57,5 @@ struct json_object *util_json_object_hex(unsigned long long val,
struct json_object *util_dimm_health_to_json(struct ndctl_dimm *dimm);
struct json_object *util_dimm_firmware_to_json(struct ndctl_dimm *dimm,
unsigned long flags);
+struct json_object *util_region_capabilities_to_json(struct ndctl_region *region);
#endif /* __NDCTL_JSON_H__ */
1 year, 10 months
[RFC PATCH] drivers/nvdimm: Architecture specific abstraction for pfn device alignment
by Aneesh Kumar K.V
Even if the kernel is built with THP or HUGEPAGE_PUD, the platform can decide
not to allow huge pages based on different parameters. The huge page support
checks are mostly arch specific and this patch provides arch specific
callbacks/abstraction for finding alignment values we should use when configuring
pfn device.
Cc: Oliver O'Halloran <oohall(a)gmail.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar(a)linux.ibm.com>
---
arch/powerpc/include/asm/libnvdimm.h | 10 ++++++
arch/powerpc/mm/Makefile | 1 +
arch/powerpc/mm/nvdimm.c | 48 ++++++++++++++++++++++++++++
arch/x86/include/asm/libnvdimm.h | 19 +++++++++++
drivers/nvdimm/nd.h | 6 ----
drivers/nvdimm/pfn_devs.c | 31 ++++++++++++++++--
6 files changed, 107 insertions(+), 8 deletions(-)
create mode 100644 arch/powerpc/include/asm/libnvdimm.h
create mode 100644 arch/powerpc/mm/nvdimm.c
create mode 100644 arch/x86/include/asm/libnvdimm.h
diff --git a/arch/powerpc/include/asm/libnvdimm.h b/arch/powerpc/include/asm/libnvdimm.h
new file mode 100644
index 000000000000..0928096eca90
--- /dev/null
+++ b/arch/powerpc/include/asm/libnvdimm.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_POWERPC_LIBNVDIMM_H
+#define _ASM_POWERPC_LIBNVDIMM_H
+
+#define nd_pfn_supported_alignment nd_pfn_supported_alignment
+extern unsigned long *nd_pfn_supported_alignments(void);
+extern unsigned long nd_pfn_default_alignment(void);
+extern unsigned long nd_altmap_align_size(unsigned long nd_align);
+
+#endif
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index f965fc33a8b7..fed0d4b3b4bc 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -55,3 +55,4 @@ obj-$(CONFIG_PPC_BOOK3S_64) += dump_linuxpagetables-book3s64.o
endif
obj-$(CONFIG_PPC_HTDUMP) += dump_hashpagetable.o
obj-$(CONFIG_PPC_MEM_KEYS) += pkeys.o
+obj-$(CONFIG_NVDIMM_PFN) += nvdimm.o
diff --git a/arch/powerpc/mm/nvdimm.c b/arch/powerpc/mm/nvdimm.c
new file mode 100644
index 000000000000..ae47a65362a1
--- /dev/null
+++ b/arch/powerpc/mm/nvdimm.c
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/mm.h>
+
+/*
+ * We support only pte and pmd mappings for now.
+ */
+const unsigned long *nd_pfn_supported_alignments(void)
+{
+ static unsigned long supported_alignments[3];
+
+#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
+#error "Update page size"
+#endif
+ supported_alignments[0] = PAGE_SIZE;
+
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+ if (mmu_psize_defs[MMU_PAGE_16M].shift ||
+ mmu_psize_defs[MMU_PAGE_2M].shift)
+ supported_alignments[1] = HPAGE_PMD_SIZE;
+#else
+ supported_alignments[1] = 0;
+#endif
+
+ supported_alignments[2] = 0;
+ return supported_alignments;
+}
+
+/*
+ * Use pmd mapping if supported as default alignment
+ */
+unsigned long nd_pfn_default_alignment(void)
+{
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+ if (mmu_psize_defs[MMU_PAGE_16M].shift ||
+ mmu_psize_defs[MMU_PAGE_2M].shift)
+ return HPAGE_PMD_SIZE;
+#endif
+ return PAGE_SIZE;
+}
+
+unsigned long nd_altmap_align_size(unsigned long nd_align)
+{
+ unsigned long vmemmap_psize;
+
+ vmemmap_psize = 1UL << mmu_psize_defs[mmu_vmemmap_psize].shift;
+ return max(nd_align, vmemmap_psize);
+}
diff --git a/arch/x86/include/asm/libnvdimm.h b/arch/x86/include/asm/libnvdimm.h
new file mode 100644
index 000000000000..3d5361db9164
--- /dev/null
+++ b/arch/x86/include/asm/libnvdimm.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_LIBNVDIMM_H
+#define _ASM_X86_LIBNVDIMM_H
+
+static inline unsigned long nd_pfn_default_alignment(void)
+{
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+ return HPAGE_PMD_SIZE;
+#else
+ return PAGE_SIZE;
+#endif
+}
+
+static inline unsigned long nd_altmap_align_size(unsigned long nd_align)
+{
+ return PMD_SIZE;
+}
+
+#endif
diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h
index 379bf4305e61..e5a65868476f 100644
--- a/drivers/nvdimm/nd.h
+++ b/drivers/nvdimm/nd.h
@@ -292,12 +292,6 @@ static inline struct device *nd_btt_create(struct nd_region *nd_region)
struct nd_pfn *to_nd_pfn(struct device *dev);
#if IS_ENABLED(CONFIG_NVDIMM_PFN)
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
-#define PFN_DEFAULT_ALIGNMENT HPAGE_PMD_SIZE
-#else
-#define PFN_DEFAULT_ALIGNMENT PAGE_SIZE
-#endif
-
int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns);
bool is_nd_pfn(struct device *dev);
struct device *nd_pfn_create(struct nd_region *nd_region);
diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
index 6f22272e8d80..331e53bcb65e 100644
--- a/drivers/nvdimm/pfn_devs.c
+++ b/drivers/nvdimm/pfn_devs.c
@@ -18,6 +18,7 @@
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/mm.h>
+#include <asm/libnvdimm.h>
#include "nd-core.h"
#include "pfn.h"
#include "nd.h"
@@ -111,6 +112,8 @@ static ssize_t align_show(struct device *dev,
return sprintf(buf, "%ld\n", nd_pfn->align);
}
+#ifndef nd_pfn_supported_alignment
+#define nd_pfn_supported_alignment nd_pfn_supported_alignment
static const unsigned long *nd_pfn_supported_alignments(void)
{
/*
@@ -133,6 +136,7 @@ static const unsigned long *nd_pfn_supported_alignments(void)
return data;
}
+#endif
static ssize_t align_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t len)
@@ -310,7 +314,7 @@ struct device *nd_pfn_devinit(struct nd_pfn *nd_pfn,
return NULL;
nd_pfn->mode = PFN_MODE_NONE;
- nd_pfn->align = PFN_DEFAULT_ALIGNMENT;
+ nd_pfn->align = nd_pfn_default_alignment();
dev = &nd_pfn->dev;
device_initialize(&nd_pfn->dev);
if (ndns && !__nd_attach_ndns(&nd_pfn->dev, ndns, &nd_pfn->ndns)) {
@@ -420,6 +424,20 @@ static int nd_pfn_clear_memmap_errors(struct nd_pfn *nd_pfn)
return 0;
}
+static bool nd_supported_alignment(unsigned long align)
+{
+ int i;
+ const unsigned long *supported = nd_pfn_supported_alignments();
+
+ if (align == 0)
+ return false;
+
+ for (i = 0; supported[i]; i++)
+ if (align == supported[i])
+ return true;
+ return false;
+}
+
int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
{
u64 checksum, offset;
@@ -474,6 +492,15 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
align = 1UL << ilog2(offset);
mode = le32_to_cpu(pfn_sb->mode);
+ /*
+ * Check whether the we support the alignment
+ */
+ if (!nd_supported_alignment(align)) {
+ dev_err(&nd_pfn->dev, "init failed, settings mismatch\n");
+ dev_dbg(&nd_pfn->dev, "align: %lx:%lx\n", nd_pfn->align, align);
+ return -EINVAL;
+ }
+
if (!nd_pfn->uuid) {
/*
* When probing a namepace via nd_pfn_probe() the uuid
@@ -743,7 +770,7 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
* PMD_SIZE for most architectures.
*/
offset = ALIGN(start + SZ_8K + 64 * npfns + dax_label_reserve,
- max(nd_pfn->align, PMD_SIZE)) - start;
+ nd_altmap_align_size(nd_pfn->align)) - start;
} else if (nd_pfn->mode == PFN_MODE_RAM)
offset = ALIGN(start + SZ_8K + dax_label_reserve,
nd_pfn->align) - start;
--
2.20.1
1 year, 10 months
[PATCH v5 1/7] libndctl: Use the supported_alignment attribute
by Oliver O'Halloran
Newer kernels provide the "supported_alignments" sysfs attribute that
indicates what alignments can be used with a PFN or DAX namespace. This
patch adds the plumbing inside of libndctl to allow users to query this
information through using:
ndctl_{dax|pfn}_get_supported_alignment(), and
ndctl_{dax|pfn}_get_num_alignments()
Signed-off-by: Oliver O'Halloran <oohall(a)gmail.com>
---
v5: Fixed comment wording
v4: Changed return code of ndctl_pfn_get_supported_alignment from -1 to
-1 to -EINVAL.
Reworded comment about why we default to 4K and 2M alignments when
the sysfs attribute is missing.
Shuffled around prototypes in ndctl.h.
80 char compliance fixes.
rebased onto pending branch
v3: Changed the return type of the *_get_supported_alignment() functions
to unsigned long to match the existing *_get_alignment() functions.
---
ndctl/lib/libndctl.c | 43 ++++++++++++++++++++++++++++++++++++++++++
ndctl/lib/libndctl.sym | 4 ++++
ndctl/libndctl.h | 4 ++++
3 files changed, 51 insertions(+)
diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c
index 830b791339d2..06f835d76117 100644
--- a/ndctl/lib/libndctl.c
+++ b/ndctl/lib/libndctl.c
@@ -31,6 +31,7 @@
#include <ccan/build_assert/build_assert.h>
#include <ndctl.h>
+#include <util/size.h>
#include <util/sysfs.h>
#include <ndctl/libndctl.h>
#include <ndctl/namespace.h>
@@ -237,6 +238,7 @@ struct ndctl_pfn {
int buf_len;
uuid_t uuid;
int id, generation;
+ struct ndctl_lbasize alignments;
};
struct ndctl_dax {
@@ -4814,6 +4816,19 @@ static void *__add_pfn(struct ndctl_pfn *pfn, const char *pfn_base)
else
pfn->size = strtoull(buf, NULL, 0);
+ /*
+ * The supported_alignments attribute was added before arches other
+ * than x86 had pmem support. If the kernel doesn't provide the
+ * attribute then it's safe to assume that we running on x86 where
+ * 4KiB and 2MiB have always been supported.
+ */
+ sprintf(path, "%s/supported_alignments", pfn_base);
+ if (sysfs_read_attr(ctx, path, buf) < 0)
+ sprintf(buf, "%d %d", SZ_4K, SZ_2M);
+
+ if (parse_lbasize_supported(ctx, pfn_base, buf, &pfn->alignments) < 0)
+ goto err_read;
+
free(path);
return pfn;
@@ -5048,6 +5063,23 @@ NDCTL_EXPORT int ndctl_pfn_set_align(struct ndctl_pfn *pfn, unsigned long align)
return 0;
}
+NDCTL_EXPORT int ndctl_pfn_get_num_alignments(struct ndctl_pfn *pfn)
+{
+ return pfn->alignments.num;
+}
+
+NDCTL_EXPORT unsigned long ndctl_pfn_get_supported_alignment(
+ struct ndctl_pfn *pfn, int i)
+{
+ if (pfn->alignments.num == 0)
+ return 0;
+
+ if (i < 0 || i > pfn->alignments.num)
+ return -EINVAL;
+ else
+ return pfn->alignments.supported[i];
+}
+
NDCTL_EXPORT int ndctl_pfn_set_namespace(struct ndctl_pfn *pfn,
struct ndctl_namespace *ndns)
{
@@ -5270,6 +5302,17 @@ NDCTL_EXPORT unsigned long ndctl_dax_get_align(struct ndctl_dax *dax)
return ndctl_pfn_get_align(&dax->pfn);
}
+NDCTL_EXPORT int ndctl_dax_get_num_alignments(struct ndctl_dax *dax)
+{
+ return ndctl_pfn_get_num_alignments(&dax->pfn);
+}
+
+NDCTL_EXPORT unsigned long ndctl_dax_get_supported_alignment(
+ struct ndctl_dax *dax, int i)
+{
+ return ndctl_pfn_get_supported_alignment(&dax->pfn, i);
+}
+
NDCTL_EXPORT int ndctl_dax_has_align(struct ndctl_dax *dax)
{
return ndctl_pfn_has_align(&dax->pfn);
diff --git a/ndctl/lib/libndctl.sym b/ndctl/lib/libndctl.sym
index 275db92ee103..a30a93e3c012 100644
--- a/ndctl/lib/libndctl.sym
+++ b/ndctl/lib/libndctl.sym
@@ -390,4 +390,8 @@ LIBNDCTL_19 {
global:
ndctl_cmd_xlat_firmware_status;
ndctl_cmd_submit_xlat;
+ ndctl_pfn_get_supported_alignment;
+ ndctl_pfn_get_num_alignments;
+ ndctl_dax_get_supported_alignment;
+ ndctl_dax_get_num_alignments;
} LIBNDCTL_18;
diff --git a/ndctl/libndctl.h b/ndctl/libndctl.h
index e55a5932781d..ac639b7d9142 100644
--- a/ndctl/libndctl.h
+++ b/ndctl/libndctl.h
@@ -597,7 +597,9 @@ int ndctl_pfn_set_uuid(struct ndctl_pfn *pfn, uuid_t uu);
void ndctl_pfn_get_uuid(struct ndctl_pfn *pfn, uuid_t uu);
int ndctl_pfn_has_align(struct ndctl_pfn *pfn);
int ndctl_pfn_set_align(struct ndctl_pfn *pfn, unsigned long align);
+int ndctl_pfn_get_num_alignments(struct ndctl_pfn *pfn);
unsigned long ndctl_pfn_get_align(struct ndctl_pfn *pfn);
+unsigned long ndctl_pfn_get_supported_alignment(struct ndctl_pfn *pfn, int i);
unsigned long long ndctl_pfn_get_resource(struct ndctl_pfn *pfn);
unsigned long long ndctl_pfn_get_size(struct ndctl_pfn *pfn);
int ndctl_pfn_set_namespace(struct ndctl_pfn *pfn, struct ndctl_namespace *ndns);
@@ -628,7 +630,9 @@ unsigned long long ndctl_dax_get_resource(struct ndctl_dax *dax);
int ndctl_dax_set_uuid(struct ndctl_dax *dax, uuid_t uu);
enum ndctl_pfn_loc ndctl_dax_get_location(struct ndctl_dax *dax);
int ndctl_dax_set_location(struct ndctl_dax *dax, enum ndctl_pfn_loc loc);
+int ndctl_dax_get_num_alignments(struct ndctl_dax *dax);
unsigned long ndctl_dax_get_align(struct ndctl_dax *dax);
+unsigned long ndctl_dax_get_supported_alignment(struct ndctl_dax *dax, int i);
int ndctl_dax_has_align(struct ndctl_dax *dax);
int ndctl_dax_set_align(struct ndctl_dax *dax, unsigned long align);
int ndctl_dax_set_namespace(struct ndctl_dax *dax,
--
2.20.1
1 year, 10 months
如何减少精益制造过程中的七大浪费
by 吕总
-------- 转发邮件信息 --------
发件人:iamkjk(a)kvu.org
发送日期:2019-3-6 4:19:00
收件人:linux-nvdimm(a)lists.01.org
如何减少精益制造过程中的七大浪费
培训时间/地点:2019年 3月13~14日(星期三~星期四)/上 海
课程收益:
--认识精益生产的核心思想与理论框架
--理解并结合工作实际思考七大浪费
--围绕七大浪费学习改善思路、方法和工具
--掌握价值流分析方法,认识价值流改善
课程对象:
生产、品质、仓储、物流、工艺、技术等部门管理人员,订单实现流程所涉相关管理人员
课程大纲:
一、破冰
从一个苹果看生产制造的发展
二、丰田生产方式概论
1.从稳定化到标准化
2.小组讨论:制造业现场管理之屋
3.成本、利润和售价
4.获得利润的正确思考:消除浪费
--什么是浪费?
--七大浪费
--影像资料:识别视频中的七大浪费
三、精益改善的重要认知
1.两大支柱—自働化和准时化
2.全面拉动系统
3.均衡化生产
--快速切换改善方法
4.PDCA-SDCA
5.“三现”主义
6.数据量化
--案例分享:标准化、“三现”、量化管理
四、七大浪费及其精益改善工具详解
1.库存的浪费
--库存及库存成本
--库存对ROI的影响
--库存掩盖问题的发现
--案例分享:库存浪费背后的改善机会
2.生产过剩的浪费
--生产过剩是万恶之源
--核心是流动
--影像资料:让生产流动起来
--单件流与同步化装配
3.搬运的浪费
--搬运浪费知多少?
--搬运灵活性改善表的运用
--程序流程图改善
--案例分享:精益布局、成组化搬运、标准化搬运
4.等待的浪费
--为什么会等待?
--生产线平衡改善
--案例分享:等待浪费的改善与优化
5.动作的浪费
--无处不在的动作浪费
--动作改善的20个原则
--课堂演练:动作改善及手工作业自働化
6.加工的浪费
--为什么会出现加工的浪费
--案例分析:贴标贴的改善
7.从源头改善加工的浪费
--不良的浪费
--不良为什么会发生
--工序内打造品质
--课堂演练:自働化改善
8.工作改善
--工作改善分析
--ECRS与5W1H
--案例分享:工作改善案例
五、价值流改善
1.什么是价值流图?
2.价值流图的组成
3.价值流图析四阶段
--选择产品族
--绘制现状图
--设计未来图
--实现未来状态
--课堂演练:绘制价值流图
六、课程总结
Q&A
讲师简介:陈老师
15年项目改善经验
30个以上咨询项目实操
强思企管高级顾问,多年外资企业、民营企业运营管理和项目管理经验,优秀的企业管理素养和视野
先后担当过生产管理、精益生产推进、公司运营管理工作,具有丰富的制造业管理实践经验
职业生涯至今,重点从事项目改善和管理咨询工作,主持过的项目有:现场改善、5S与目视管理改善、TPS推进、工厂&物流中心布局规划、仓储管理改善、库存优化……
培训特色:通过实战案例和课堂互动,挑战学员旧有观念,促进学员反思,带动其在更高的意识层面上去看待和解决问题,同时针对学员的个性化问题给予实操性方案辅导
个人专长:
课程专长
ü 5S与目视管理实务(工具篇)5S与目视管理推行实战(推行篇)
ü 卓越主管能力训练
ü 现场精细化管理改善提升
ü 工厂物流与仓储管理进阶
ü 精益生产系列课程
项目专长
ü 5S与目视管理管理
ü 现场改善
ü 生产绩效提升
ü 精益生产改善
ü 物流仓储管理改善
ü 工厂、仓储布局与规划
部分服务客户:
航通用电气、大陆汽车电子、大众联合汽车、航天机电、通力电梯、上海庄臣、联亚制衣、昆山铝业、上海考泰斯、南京圣韩玻璃特步中国、宏大齿轮、雅马哈乐器、青岛圣戈班、广汉圣戈班、爱思恩梯(大宇)、傲卓凯恩纸业、港华清源华衍水务、欧文斯科宁、威高医疗、扬州高露洁、YKK(吉田)拉链、东洋电装、卫岗乳业、新宁物流、索尼移动通信……
成功项目个案:
案例一:上海某外企5S改善项目(2008/12 -- 2009/05)
工作担当:项目经理/咨询顾问
项目背景:
上海某外企响应总部要求开始筹划5S项目推进。通过沟通,高层希望并认可我们能够通过5S项目,从“形式化”到“行事化”提升员工行为的转变过程;希望在项目过程中通过团队与团队的竞争形成现场新标准和基础管理上的共同语言,促进认知水平的提高,改善现场流程与环境。希望项目能为公司推行LEAN的远景规划奠定基础,从而推动LEAN工厂的建设。
项目成就:
Ø 项目完全按期完成,项目组成员获得升职和海外培训机会;
Ø 项目质量获得客户方认可;
Ø 与项目组成员建立了良好的交流合作关系,多次带领客户前往参观,该公司已经在5S基础上顺利推进精益生产。
案例二: 某民企500强集团子公司精益改善与工厂布局项目(2011/03-- 2013/04)
工作担当:精益办主任
项目背景:
公司通过几年的精益生产改善,至2010年底,已经基本过渡到生产线作业,但并未真正实现产品流动,同时,因为设备维护、工艺粗放、原材料不良等一系列问题,品质问题异常突出。2011年年初,结合新工厂布局规划工作,开展了以“工序内打造品质”、“工序流畅化”为核心的精益改善与工厂布局设计项目。
项目成就:
Ø 完成样板线改造并推广,实现生产单件流及少人化改善,生产效率提高70%以上,不良率改善80%以上;
Ø 整体物流距离削减85%以上,实现新工厂布局规划设计,优化物料搬运路线,实现小批量配送,内部物流格局的根本性变化。
Ø 启动库存管理优化项目,建立基于数据分析的销售预测与库存管控分析模型,并开展库存管理改善。
案例三:某配件后市场服务公司管理系统优化(2013/04 -- 至今)
工作担当:副总经理
项目背景:
公司深受订单波峰波谷的困扰,长期以来生产效率低下,订单处理周期过长,准时发货要求得不到满足。为了改善客户服务水平,提高公司效益和员工收益,开展全面的管理系统优化工作。
项目成就:
Ø 开展生产与物流绩效改善,提高交付能力,订单处理周期由一周以上改善至3.77天;
Ø 生产部门效率分别提升119%和51%,物流部门效率提升74%;准时交付率达95%以上;
Ø 进行仓储管理优化,提升仓储利用率和改善库存管理水平,规划设计物流配送中心,优化内部运作流程,库存周转率由8次改善至10次以上。
报名详情:
收费标准:¥3800/人(含授课费、证书费、资料费、午餐费、茶点费、会务费、税费)
报名咨询电话: 021-31261580 手机:18890700600 (微信同号)赵先生
在线咨询QQ/邮箱:6983436 (报名请报名表)
-----------------------------------------------------------------------------------------------------------------------------
报 名 回 执(请务必于开课前3天回复)
姓名性别部门/职位课程名称TelFaxEmail/手机
培训负责人:公司名称:公司地址:
★缴费方式: o 支票 o 现场缴费 o 汇款(汇款后请将汇款单据传真至本公司)
1 year, 10 months
答复:零故障管理,确保生产设备的高效运转
by 从荏
Received: from WS-web (blukvtai(a)noyaa.com)
Date: 星期五 2019-3-5 9:31:51+0800
From: "从荏" <blukvtai(a)noyaa.com>
Reply-To: "linux-nvdimm" <linux-nvdimm(a)lists.01.org>
Message-ID: <imuktlaq-th7q4-235161182-cvlqf-1lqsazicwqg.blukvtai(a)noyaa.com>
详 细 内 容 烦 请 查 阅 附 件
1 year, 10 months
Status
by Mail Administrator
Message could not be delivered
1 year, 10 months
[PATCH] libnvdimm/namespace: Clean up holder_class_store()
by Dan Williams
Use sysfs_streq() in place of open-coded strcmp()'s that check for an
optional "\n" at the end of the input.
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
drivers/nvdimm/namespace_devs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
index 3677b0c4a33d..17fb7f931f0c 100644
--- a/drivers/nvdimm/namespace_devs.c
+++ b/drivers/nvdimm/namespace_devs.c
@@ -1506,13 +1506,13 @@ static ssize_t __holder_class_store(struct device *dev, const char *buf)
if (dev->driver || ndns->claim)
return -EBUSY;
- if (strcmp(buf, "btt") == 0 || strcmp(buf, "btt\n") == 0)
+ if (sysfs_streq(buf, "btt"))
ndns->claim_class = btt_claim_class(dev);
- else if (strcmp(buf, "pfn") == 0 || strcmp(buf, "pfn\n") == 0)
+ else if (sysfs_streq(buf, "pfn"))
ndns->claim_class = NVDIMM_CCLASS_PFN;
- else if (strcmp(buf, "dax") == 0 || strcmp(buf, "dax\n") == 0)
+ else if (sysfs_streq(buf, "dax"))
ndns->claim_class = NVDIMM_CCLASS_DAX;
- else if (strcmp(buf, "") == 0 || strcmp(buf, "\n") == 0)
+ else if (sysfs_streq(buf, ""))
ndns->claim_class = NVDIMM_CCLASS_NONE;
else
return -EINVAL;
1 year, 10 months