[PATCH v3 0/2] Support ACPI 6.1 update in NFIT Control Region Structure
by Toshi Kani
ACPI 6.1, Table 5-133, updates NVDIMM Control Region Structure as
follows.
- Valid Fields, Manufacturing Location, and Manufacturing Date
are added from reserved range. No change in the structure size.
- IDs (SPD values) are stored as arrays of bytes (i.e. big-endian
format). The spec clarifies that they need to be represented
as arrays of bytes as well.
Patch 1 changes the NFIT driver to comply with ACPI 6.1.
Patch 2 adds a new sysfs file "id" to show NVDIMM ID defined in ACPI 6.1.
The patch-set applies on linux-pm.git acpica.
link: http://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf
---
v3:
- Need to coordinate with ACPICA update (Bob Moore, Dan Williams)
- Integrate with ACPICA changes in struct acpi_nfit_control_region.
(commit 138a95547ab0)
v2:
- Remove 'mfg_location' and 'mfg_date'. (Dan Williams)
- Rename 'unique_id' to 'id' and make this change as a separate patch.
(Dan Williams)
---
Toshi Kani (3):
1/2 acpi/nfit: Update nfit driver to comply with ACPI 6.1
2/3 acpi/nfit: Add sysfs "id" for NVDIMM ID
---
drivers/acpi/nfit.c | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
2 years, 8 months
[PATCH] nfit: add Microsoft NVDIMM DSM command set to white list
by Stuart Hayes
Add the Microsoft _DSM command set to the white list of NVDIMM command sets.
This command set is documented at https://msdn.microsoft.com/library/windows/hardware/mt604741.
Signed-off-by: Stuart Hayes <stuart.w.hayes(a)gmail.com>
---
drivers/acpi/nfit.c | 9 ++++++---
drivers/acpi/nfit.h | 4 ++++
include/uapi/linux/ndctl.h | 1 +
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index 2215fc8..48fc575 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
@@ -1130,11 +1130,11 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
}
/*
- * Until standardization materializes we need to consider up to 3
+ * Until standardization materializes we need to consider several
* different command sets. Note, that checking for function0 (bit0)
* tells us if any commands are reachable through this uuid.
*/
- for (i = NVDIMM_FAMILY_INTEL; i <= NVDIMM_FAMILY_HPE2; i++)
+ for (i = NVDIMM_FAMILY_INTEL; i <= NVDIMM_FAMILY_MSFT; i++)
if (acpi_check_dsm(adev_dimm->handle, to_nfit_uuid(i), 1, 1))
break;
@@ -1150,7 +1150,9 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
dsm_mask = 0x1fe;
if (disable_vendor_specific)
dsm_mask &= ~(1 << 8);
- } else {
+ } else if (nfit_mem->family == NVDIMM_FAMILY_MSFT)
+ dsm_mask = 0xffffffff;
+ else {
dev_err(dev, "unknown dimm command family\n");
nfit_mem->family = -1;
return force_enable_dimms ? 0 : -ENODEV;
@@ -2692,6 +2694,7 @@ static __init int nfit_init(void)
acpi_str_to_uuid(UUID_NFIT_DIMM, nfit_uuid[NFIT_DEV_DIMM]);
acpi_str_to_uuid(UUID_NFIT_DIMM_N_HPE1, nfit_uuid[NFIT_DEV_DIMM_N_HPE1]);
acpi_str_to_uuid(UUID_NFIT_DIMM_N_HPE2, nfit_uuid[NFIT_DEV_DIMM_N_HPE2]);
+ acpi_str_to_uuid(UUID_NFIT_DIMM_N_MSFT, nfit_uuid[NFIT_DEV_DIMM_N_MSFT]);
nfit_wq = create_singlethread_workqueue("nfit");
if (!nfit_wq)
diff --git a/drivers/acpi/nfit.h b/drivers/acpi/nfit.h
index 11cb383..f06fa91 100644
--- a/drivers/acpi/nfit.h
+++ b/drivers/acpi/nfit.h
@@ -31,6 +31,9 @@
#define UUID_NFIT_DIMM_N_HPE1 "9002c334-acf3-4c0e-9642-a235f0d53bc6"
#define UUID_NFIT_DIMM_N_HPE2 "5008664b-b758-41a0-a03c-27c2f2d04f7e"
+/* https://msdn.microsoft.com/library/windows/hardware/mt604741 */
+#define UUID_NFIT_DIMM_N_MSFT "1ee68b36-d4bd-4a1a-9a16-4f8e53d46e05"
+
#define ACPI_NFIT_MEM_FAILED_MASK (ACPI_NFIT_MEM_SAVE_FAILED \
| ACPI_NFIT_MEM_RESTORE_FAILED | ACPI_NFIT_MEM_FLUSH_FAILED \
| ACPI_NFIT_MEM_NOT_ARMED)
@@ -40,6 +43,7 @@ enum nfit_uuids {
NFIT_DEV_DIMM = NVDIMM_FAMILY_INTEL,
NFIT_DEV_DIMM_N_HPE1 = NVDIMM_FAMILY_HPE1,
NFIT_DEV_DIMM_N_HPE2 = NVDIMM_FAMILY_HPE2,
+ NFIT_DEV_DIMM_N_MSFT = NVDIMM_FAMILY_MSFT,
NFIT_SPA_VOLATILE,
NFIT_SPA_PM,
NFIT_SPA_DCR,
diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h
index 309915f..ba5a8c7 100644
--- a/include/uapi/linux/ndctl.h
+++ b/include/uapi/linux/ndctl.h
@@ -298,6 +298,7 @@ struct nd_cmd_pkg {
#define NVDIMM_FAMILY_INTEL 0
#define NVDIMM_FAMILY_HPE1 1
#define NVDIMM_FAMILY_HPE2 2
+#define NVDIMM_FAMILY_MSFT 3
#define ND_IOCTL_CALL _IOWR(ND_IOCTL, ND_CMD_CALL,\
struct nd_cmd_pkg)
--
1.8.3.1
4 years, 8 months
linux-next memleak after IO on dax mountpoint
by Xiong Zhou
Hi,
Reporting an oom/memleak issue in linux-next tree:
#Description:
dbench invokes oom-killer, make host unavaiable.
dbench was doing IO on nvdimm device mounted fs with dax mount option.
It happens on both xfs and ext4 filesystems.
It does not happen testing without dax mountoption.
Seems like memleak keep happening untill system run out of memory. On
good kernels, memory get freed after every dbench run.
#Hardware
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 48
On-line CPU(s) list: 0-47
Thread(s) per core: 2
Core(s) per socket: 12
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 63
Model name: Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz
Stepping: 2
CPU MHz: 2596.781
BogoMIPS: 5200.05
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 30720K
NUMA node0 CPU(s): 0-11,24-35
NUMA node1 CPU(s): 12-23,36-47
free -g
total used free shared buff/cache available
Mem: 31 0 30 0 0 30
Swap: 9 0 9
#Version:
Since next-20150517 tree, till latest 0526 tree.
0516 tree survives testing.
dbench version 4.00 - Copyright Andrew Tridgell 1999-2004
#How reproducible:
always
#Reproduce steps:
Repeating fstests[1] generic/241, 30 times, which maybe is relative
to system total ram.
#bisect info
Bisect point to this commit:
commit d6cab70166b5bf2cbeec0c566e51725c793e3aed
Merge: cb9553d 661806a
Author: Stephen Rothwell <sfr(a)canb.auug.org.au>
Date: Tue May 17 11:18:34 2016 +1000
Merge remote-tracking branch 'block/for-next'
which is forwarding to this:
commit 661806a319890962aaa839dc1dbf7ea356aa6b92
Merge: 1335822 b3a834b
Author: Jens Axboe <axboe(a)fb.com>
Date: Mon May 16 09:55:01 2016 -0600
Merge branch 'for-4.7/core' into for-next
On top of 0517 tree, reset --hard to commit cb9553d passed testing,
while reset --hard to commit d6cab70 reproduced issue.
Still working on to id which commit in this merge causes this issuer,
i noticed that lots of merge were going on there....
Meminfo, config, oom msg, bisect log are attached.
Thanks,
Xiong
[1] http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfstests.git
# Additional info
meminfo after running generic/241 7~8 rounds:
------ bad --------------
[root@host linux]# free
total used free shared buff/cache available
Mem: 32807280 422756 25782116 9456 6602408 26044756
Swap: 10485756 0 10485756
[root@host linux]# free -g
total used free shared buff/cache available
Mem: 31 0 24 0 6 24
Swap: 9 0 9
[root@host linux]# git log --oneline -1
d6cab70 Merge remote-tracking branch 'block/for-next'
[root@host linux]# echo 1 > /proc/sys/vm/drop_caches
[root@host linux]# echo 2 > /proc/sys/vm/drop_caches
[root@host linux]# echo 3 > /proc/sys/vm/drop_caches
[root@host linux]# free -g
total used free shared buff/cache available
Mem: 31 0 23 0 6 23
Swap: 9 0 9
[root@host linux]# free
total used free shared buff/cache available
Mem: 32807280 419576 25050868 9456 7336836 24938336
Swap: 10485756 0 10485756
-------- good ------------
[root@host linux]# free
total used free shared buff/cache available
Mem: 32807280 421316 30425892 9464 1960072 31884116
Swap: 10485756 0 10485756
[root@host linux]# free -g
total used free shared buff/cache available
Mem: 31 0 29 0 1 30
Swap: 9 0 9
[root@host linux]# echo 1 > /proc/sys/vm/drop_caches
[root@host linux]# echo 2 > /proc/sys/vm/drop_caches
[root@host linux]# echo 3 > /proc/sys/vm/drop_caches
[root@host linux]# free -g
total used free shared buff/cache available
Mem: 31 0 30 0 0 30
Swap: 9 0 9
[root@host linux]# free
total used free shared buff/cache available
Mem: 32807280 410820 32070196 9464 326264 31946400
Swap: 10485756 0 10485756
[root@host linux]# git log --oneline -1
cb9553d Merge remote-tracking branch 'input/next'
4 years, 8 months
IS_ERR_VALUE misuses
by Linus Torvalds
This is just a heads-up: for some reason the acpi layer and nvdimm use
the IS_ERR_VALUE() macro, and they use it incorrectly.
To see warnings about it, change the macro from
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
to do a cast to a pointer and back (ie make the "(x)" part be
"(unsigned long)(void *)(x)" instead, which then will cause warnings
like
warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
when passed an "int" argument.
The reason "int" arguments are wrong is that the macro really is
designed to test the upper range of a pointer value. It happens to
work for signed integers too, but looking at the users, pretty much
none of them are right. The ACPI and nvdimm users are all about the
perfectly standard "zero for success, negative error code for
failure", and so using
if (IS_ERROR_VALUE(rc))
return rc;
is just plain garbage. The code generally should just do
if (rc)
return rc;
which is simpler, smaller, and generates better code.
This bug seems to have been so common in the power management code
that we even have a coccinelle script for it. But for some reason
several uses remain in acpi_debug.c and now there are cases in
drivers/nvdimm/ too.
There are random various crap cases like that elsewhere too, but acpi
and nvdimm were just more dense with this bug than most other places.
The bug isn't fatal - as mentioned, IS_ERROR_VALUE() _does_ actually
work on the range of integers that are normal errors, but it's
pointless and actively misleading, and it's not meant for that use. So
it just adds complexity and worse code generation for no actual gain.
I noticed this when I was looking at similar idiocy in fs/gfs2, where
the code in question caused warnings (for other reasons, but the main
reason was "code too complex for gcc to understand it")
Linus
4 years, 9 months
[ndctl PATCH] ndctl: fix rpm source url, switch back to v$VERSION tag scheme
by Dan Williams
The way to have github generate tarballs in ndctl-$VERSION format while
maintaining a v$VERSION tag scheme is to use a source url in the
following format:
https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{ver...
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
git-version | 10 +++++-----
ndctl.spec.in | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/git-version b/git-version
index 03b44a613a57..3823ee29afaf 100755
--- a/git-version
+++ b/git-version
@@ -2,9 +2,9 @@
to_ver() {
VN=$1
- #drop leading 'ndctl-' out of the version so its a pure number
- if [ ${VN:0:6} = "ndctl-" ]; then
- VN=${VN:6}
+ #drop leading 'v' out of the version so its a pure number
+ if [ ${VN:0:1} = "v" ]; then
+ VN=${VN:1}
fi
echo $VN
}
@@ -29,10 +29,10 @@ LF='
if test -f version; then
VN=$(cat version) || VN="$DEF_VER"
elif test -d ${GIT_DIR:-.git} -o -f .git &&
- VN=$(git describe --match "ndctl-[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
+ VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
case "$VN" in
*$LF*) (exit 1) ;;
- ndctl-[0-9]*)
+ v[0-9]*)
VN="$(dirty $VN)"
esac; then
VN=$(echo "$VN" | sed -e 's/-/./g');
diff --git a/ndctl.spec.in b/ndctl.spec.in
index 221cd755e2a6..0aaef03b2e5b 100644
--- a/ndctl.spec.in
+++ b/ndctl.spec.in
@@ -5,7 +5,7 @@ Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
License: GPLv2
Group: System Environment/Base
Url: https://github.com/pmem/ndctl
-Source0: https://github.com/pmem/ndctl/archive/ndctl-%{version}.tar.gz
+Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{ver...
BuildRequires: autoconf
BuildRequires: asciidoc
4 years, 9 months
[ndctl PATCH] ndctl: release v53
by Dan Williams
This release incorporates the capabilities of the 4.7-rc1 kernel (most
prominently in that kernel 'Device DAX', DAX error handling, and
third-party DSM support). The ndctl updates include:
New commands / options:
bash completion for ndctl commands
DIMM SMART data retrieval (ndctl list --dimms --health)
ndctl destroy-namespace
ndctl read-labels
New tests:
DAX error handling unit test (dax-errors.sh)
Command fixes:
ndctl list
ndctl create-namespace
New apis:
ndctl_cmd_smart_get_alarm_flags
ndctl_cmd_smart_get_flags
ndctl_cmd_smart_get_health
ndctl_cmd_smart_get_life_used
ndctl_cmd_smart_get_shutdown_state
ndctl_cmd_smart_get_spares
ndctl_cmd_smart_get_temperature
ndctl_cmd_smart_get_vendor_data
ndctl_cmd_smart_get_vendor_size
ndctl_cmd_smart_threshold_get_alarm_control
ndctl_cmd_smart_threshold_get_spares
ndctl_cmd_smart_threshold_get_temperature
ndctl_dax_delete
ndctl_dax_enable
ndctl_dax_get_align
ndctl_dax_get_bus
ndctl_dax_get_ctx
ndctl_dax_get_daxctl_region
ndctl_dax_get_devname
ndctl_dax_get_first
ndctl_dax_get_id
ndctl_dax_get_location
ndctl_dax_get_namespace
ndctl_dax_get_next
ndctl_dax_get_region
ndctl_dax_get_resource
ndctl_dax_get_size
ndctl_dax_get_uuid
ndctl_dax_is_configured
ndctl_dax_is_enabled
ndctl_dax_is_valid
ndctl_dax_set_align
ndctl_dax_set_location
ndctl_dax_set_namespace
ndctl_dax_set_uuid
ndctl_dimm_cmd_new_smart
ndctl_dimm_cmd_new_smart_threshold
ndctl_dimm_get_formatN
ndctl_dimm_get_formats
ndctl_dimm_get_subsystem_device
ndctl_dimm_get_subsystem_revision
ndctl_dimm_get_subsystem_vendor
ndctl_dimm_get_unique_id
ndctl_get_daxctl_ctx
ndctl_namespace_get_dax
ndctl_namespace_get_dax
ndctl_region_get_dax_seed
daxctl_dev_get_devname
daxctl_dev_get_first
daxctl_dev_get_id
daxctl_dev_get_major
daxctl_dev_get_minor
daxctl_dev_get_next
daxctl_dev_get_region
daxctl_dev_get_size
daxctl_get_log_priority
daxctl_get_userdata
daxctl_new
daxctl_new_region
daxctl_ref
daxctl_region_get_ctx
daxctl_region_get_id
daxctl_region_get_uuid
daxctl_region_ref
daxctl_region_unref
daxctl_region_unref
daxctl_set_log_fn
daxctl_set_log_priority
daxctl_set_userdata
daxctl_unref
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
Makefile.am.in | 4 ++--
git-version | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile.am.in b/Makefile.am.in
index f3dc8b48c890..7f3a5b283a75 100644
--- a/Makefile.am.in
+++ b/Makefile.am.in
@@ -35,9 +35,9 @@ SED_PROCESS = \
-e 's,@includedir\@,$(includedir),g' \
< $< > $@ || rm $@
-LIBNDCTL_CURRENT=7
+LIBNDCTL_CURRENT=8
LIBNDCTL_REVISION=0
-LIBNDCTL_AGE=1
+LIBNDCTL_AGE=2
LIBDAXCTL_CURRENT=1
LIBDAXCTL_REVISION=0
diff --git a/git-version b/git-version
index ea6e26880aea..03b44a613a57 100755
--- a/git-version
+++ b/git-version
@@ -19,7 +19,7 @@ dirty() {
fi
}
-DEF_VER=52
+DEF_VER=53
LF='
'
4 years, 9 months
[PATCH v2] libnvdimm, btt: update the usage section in Documentation
by Vishal Verma
Section 5 about BTT's in kernel usage was quite obsolete,
replace it with a simple 'Usage' section that describes how
to set up a BTT namespace using the 'ndctl' utility.
Signed-off-by: Vishal Verma <vishal.l.verma(a)intel.com>
---
Documentation/nvdimm/btt.txt | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
diff --git a/Documentation/nvdimm/btt.txt b/Documentation/nvdimm/btt.txt
index b91443f..e293fb6 100644
--- a/Documentation/nvdimm/btt.txt
+++ b/Documentation/nvdimm/btt.txt
@@ -256,28 +256,18 @@ If any of these error conditions are encountered, the arena is put into a read
only state using a flag in the info block.
-5. In-kernel usage
-==================
+5. Usage
+========
-Any block driver that supports byte granularity IO to the storage may register
-with the BTT. It will have to provide the rw_bytes interface in its
-block_device_operations struct:
+The BTT can be set up on any disk (namespace) exposed by the libnvdimm subsystem
+(pmem, or blk mode). The easiest way to set up such a namespace is using the
+'ndctl' utility [1]:
- int (*rw_bytes)(struct gendisk *, void *, size_t, off_t, int rw);
+For example, the ndctl command line to setup a btt with a 4k sector size is:
-It may register with the BTT after it adds its own gendisk, using btt_init:
+ ndctl create-namespace -f -e namespace0.0 -m sector -l 4k
- struct btt *btt_init(struct gendisk *disk, unsigned long long rawsize,
- u32 lbasize, u8 uuid[], int maxlane);
+See ndctl create-namespace --help for more options.
-note that maxlane is the maximum amount of concurrency the driver wishes to
-allow the BTT to use.
-
-The BTT 'disk' appears as a stacked block device that grabs the underlying block
-device in the O_EXCL mode.
-
-When the driver wishes to remove the backing disk, it should similarly call
-btt_fini using the same struct btt* handle that was provided to it by btt_init.
-
- void btt_fini(struct btt *btt);
+[1]: https://github.com/pmem/ndctl
--
2.5.5
4 years, 9 months
[PATCH] libnvdimm, btt: update the usage section in Documentation
by Vishal Verma
Section 5 about BTT's in kernel usage was quite obsolete,
replace it with a simple 'Usage' section that describes how
to set up a BTT namespace using the 'ndctl' utility.
Signed-off-by: Vishal Verma <vishal.l.verma(a)intel.com>
---
Documentation/nvdimm/btt.txt | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
diff --git a/Documentation/nvdimm/btt.txt b/Documentation/nvdimm/btt.txt
index b91443f..e9d4881 100644
--- a/Documentation/nvdimm/btt.txt
+++ b/Documentation/nvdimm/btt.txt
@@ -256,28 +256,18 @@ If any of these error conditions are encountered, the arena is put into a read
only state using a flag in the info block.
-5. In-kernel usage
-==================
+5. Usage
+========
-Any block driver that supports byte granularity IO to the storage may register
-with the BTT. It will have to provide the rw_bytes interface in its
-block_device_operations struct:
+The BTT can be set up on any disk (namespace) exposed by the libnvdimm subsystem
+(pmem, or blk mode). The easiest way to set up such a namespace is using the
+'ndctl' utility [1]:
- int (*rw_bytes)(struct gendisk *, void *, size_t, off_t, int rw);
+Then the ndctl command line to setup a btt with a 4k sector size is:
-It may register with the BTT after it adds its own gendisk, using btt_init:
+ ndctl create-namespace -f -e namespace0.0 -m sector -l 4k
- struct btt *btt_init(struct gendisk *disk, unsigned long long rawsize,
- u32 lbasize, u8 uuid[], int maxlane);
+See ndctl create-namespace --help for more options.
-note that maxlane is the maximum amount of concurrency the driver wishes to
-allow the BTT to use.
-
-The BTT 'disk' appears as a stacked block device that grabs the underlying block
-device in the O_EXCL mode.
-
-When the driver wishes to remove the backing disk, it should similarly call
-btt_fini using the same struct btt* handle that was provided to it by btt_init.
-
- void btt_fini(struct btt *btt);
+[1]: https://github.com/pmem/ndctl
--
2.5.5
4 years, 9 months
[GIT PULL] dax-locking for 4.7
by Ross Zwisler
Hi Linus, please pull from
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/dax-locking-for-4.7
... to receive filesystem DAX locking changes for v4.7.
These current version of these changes have been under review and test for a
few weeks, and have appeared in the two most recent linux-next releases
(next-20160520 and next-20160524). I've reviewed all of the DAX changes in
these patches, and Neil Brown has reviewed the patch that introduced the actual
locking and wait queues.
This pull request is dependent on Vishal Verma's "dax-misc for 4.7" pull
request.
The following changes since commit 40543f62cbdce42633e3fe10923099feee272e1f:
dax: fix a comment in dax_zero_page_range and dax_truncate_page (2016-05-18 12:16:58 -0600)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/dax-locking-for-4.7
for you to fetch changes up to 4d9a2c8746671efbb0c27d3ae28c7474597a7aad:
dax: Remove i_mmap_lock protection (2016-05-19 15:28:40 -0600)
----------------------------------------------------------------
Filesystem DAX locking for 4.7
- We use a bit in an exceptional radix tree entry as a lock bit and use it
similarly to how page lock is used for normal faults. This fixes races
between hole instantiation and read faults of the same index.
- Filesystem DAX PMD faults are disabled, and will be re-enabled when PMD
locking is implemented.
----------------------------------------------------------------
Jan Kara (7):
dax: Fix condition for filling of PMD holes
dax: Make huge page handling depend of CONFIG_BROKEN
dax: Define DAX lock bit for radix tree exceptional entry
dax: Allow DAX code to replace exceptional entries
dax: New fault locking
dax: Use radix tree entry lock to protect cow faults
dax: Remove i_mmap_lock protection
fs/Kconfig | 1 +
fs/dax.c | 592 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
include/linux/dax.h | 16 ++-
include/linux/mm.h | 7 ++
mm/filemap.c | 30 +++--
mm/memory.c | 40 +++----
mm/truncate.c | 62 +++++-----
7 files changed, 513 insertions(+), 235 deletions(-)
4 years, 9 months
[ndctl PATCH] ndctl, list: display named devices by default
by Dan Williams
Instead of being silent when no list options are specified, default to
list the device if it is the only parameter specified. For example,
before:
# ndctl list -d nmem0
#
...after:
# ndctl list -d nmem0
{
"dev":"nmem0",
"id":"cdab-ffffffff"
}
#
...in other words omit the need for --dimms to be specified for this
case.
Reported-by: Vishal Verma <vishal.l.verma(a)intel.com>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
ndctl/builtin-list.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/ndctl/builtin-list.c b/ndctl/builtin-list.c
index 2080337252c8..5c5dc5a5db5b 100644
--- a/ndctl/builtin-list.c
+++ b/ndctl/builtin-list.c
@@ -179,6 +179,11 @@ static struct json_object *region_to_json(struct ndctl_region *region)
return NULL;
}
+static int num_list_flags(void)
+{
+ return list.buses + list.dimms + list.regions + list.namespaces;
+}
+
int cmd_list(int argc, const char **argv)
{
const struct option options[] = {
@@ -212,9 +217,6 @@ int cmd_list(int argc, const char **argv)
unsigned int type = 0;
int i, rc;
- if (argc == 1)
- list.namespaces = true;
-
argc = parse_options(argc, argv, options, u, 0);
for (i = 0; i < argc; i++)
error("unknown parameter \"%s\"\n", argv[i]);
@@ -228,6 +230,15 @@ int cmd_list(int argc, const char **argv)
if (argc)
usage_with_options(u, options);
+ if (num_list_flags() == 0) {
+ list.buses = !!param.bus;
+ list.regions = !!param.region;
+ list.dimms = !!param.dimm;
+ }
+
+ if (num_list_flags() == 0)
+ list.namespaces = true;
+
if (param.type) {
if (strcmp(param.type, "pmem") == 0)
type = ND_DEVICE_REGION_PMEM;
4 years, 9 months