[PATCH v2 0/3] Maintainer Entry Profiles
by Dan Williams
Changes since v1 [1]:
- Simplify the profile to a hopefully non-controversial set of
attributes that address the most common sources of contributor
confusion, or maintainer frustration.
- Rename "Subsystem Profile" to "Maintainer Entry Profile". Not every
entry in MAINTAINERS represents a full subsystem. There may be driver
local considerations to communicate to a submitter in addition to wider
subsystem guidelines.
- Delete the old P: tag in MAINTAINERS rather than convert to a new E:
tag (Joe Perches).
[1]: http://lore.kernel.org/r/154225759358.2499188.15268218778137905050.stgit@...
---
At last years Plumbers Conference I proposed the Maintainer Entry
Profile as a document that a maintainer can provide to set contributor
expectations and provide fodder for a discussion between maintainers
about the merits of different maintainer policies.
For those that did not attend, the goal of the Maintainer Entry Profile,
and the Maintainer Handbook more generally, is to provide a desk
reference for maintainers both new and experienced. The session
introduction was:
The first rule of kernel maintenance is that there are no hard and
fast rules. That state of affairs is both a blessing and a curse. It
has served the community well to be adaptable to the different
people and different problem spaces that inhabit the kernel
community. However, that variability also leads to inconsistent
experiences for contributors, little to no guidance for new
contributors, and unnecessary stress on current maintainers. There
are quite a few of people who have been around long enough to make
enough mistakes that they have gained some hard earned proficiency.
However if the kernel community expects to keep growing it needs to
be able both scale the maintainers it has and ramp new ones without
necessarily let them make a decades worth of mistakes to learn the
ropes.
To be clear, the proposed document does not impose or suggest new
rules. Instead it provides an outlet to document the unwritten rules
and policies in effect for each subsystem, and that each subsystem
might decide differently for whatever reason.
---
Dan Williams (3):
MAINTAINERS: Reclaim the P: tag for Maintainer Entry Profile
Maintainer Handbook: Maintainer Entry Profile
libnvdimm, MAINTAINERS: Maintainer Entry Profile
Documentation/maintainer/index.rst | 1
.../maintainer/maintainer-entry-profile.rst | 99 ++++++++++++++++++++
Documentation/nvdimm/maintainer-entry-profile.rst | 64 +++++++++++++
MAINTAINERS | 20 ++--
4 files changed, 175 insertions(+), 9 deletions(-)
create mode 100644 Documentation/maintainer/maintainer-entry-profile.rst
create mode 100644 Documentation/nvdimm/maintainer-entry-profile.rst
10 months, 1 week
[ndctl PATCH] ndctl/list: Drop named list objects from verbose
listing
by Dan Williams
The only expected difference between "ndctl list -R" and "ndctl list
-Rv" is some additional output fields. Instead it currently results in
the region array being contained in a named "regions" list object.
# ndctl list -R -r 0
[
{
"dev":"region0",
"size":4294967296,
"available_size":0,
"max_available_extent":0,
"type":"pmem",
"persistence_domain":"unknown"
}
]
# ndctl list -Rv -r 0
{
"regions":[
{
"dev":"region0",
"size":4294967296,
"available_size":0,
"max_available_extent":0,
"type":"pmem",
"numa_node":0,
"target_node":2,
"persistence_domain":"unknown",
"namespaces":[
{
"dev":"namespace0.0",
"mode":"fsdax",
"map":"mem",
"size":4294967296,
"sector_size":512,
"blockdev":"pmem0",
"numa_node":0,
"target_node":2
}
]
}
]
}
Drop the named list, by not including namespaces in the listing. Extra
objects only appear at the -vv level. "ndctl list -v" and "ndctl list
-Nv" are synonyms and behave as expected.
# ndctl list -Rv -r 0
[
{
"dev":"region0",
"size":4294967296,
"available_size":0,
"max_available_extent":0,
"type":"pmem",
"numa_node":0,
"target_node":2,
"persistence_domain":"unknown"
}
]
Another side effect of this change is that it allows for:
ndctl list -Rvvv
...to only show the verbose region details vs assuming that namespaces
and dimms etc also need to be added.
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
Documentation/ndctl/ndctl-list.txt | 46 ++++++++++++++++++++++++++++++++++++
ndctl/list.c | 10 +++++---
2 files changed, 52 insertions(+), 4 deletions(-)
diff --git a/Documentation/ndctl/ndctl-list.txt b/Documentation/ndctl/ndctl-list.txt
index f9c7434d3b0b..75fd11876395 100644
--- a/Documentation/ndctl/ndctl-list.txt
+++ b/Documentation/ndctl/ndctl-list.txt
@@ -234,6 +234,52 @@ include::xable-bus-options.txt[]
- *-vvv*
Everything '-vv' provides, plus --health, --capabilities,
--idle, and --firmware.
+::
+ The verbosity can also be scoped by the object type. For example
+ to just list regions with capabilities and media error info.
+----
+# ndctl list -Ru -vvv -r 0
+{
+ "dev":"region0",
+ "size":"4.00 GiB (4.29 GB)",
+ "available_size":0,
+ "max_available_extent":0,
+ "type":"pmem",
+ "numa_node":0,
+ "target_node":2,
+ "capabilities":[
+ {
+ "mode":"sector",
+ "sector_sizes":[
+ 512,
+ 520,
+ 528,
+ 4096,
+ 4104,
+ 4160,
+ 4224
+ ]
+ },
+ {
+ "mode":"fsdax",
+ "alignments":[
+ 4096,
+ 2097152,
+ 1073741824
+ ]
+ },
+ {
+ "mode":"devdax",
+ "alignments":[
+ 4096,
+ 2097152,
+ 1073741824
+ ]
+ }
+ ],
+ "persistence_domain":"unknown"
+}
+----
include::human-option.txt[]
diff --git a/ndctl/list.c b/ndctl/list.c
index 607996a85784..125a9fe34cb8 100644
--- a/ndctl/list.c
+++ b/ndctl/list.c
@@ -507,12 +507,14 @@ int cmd_list(int argc, const char **argv, struct ndctl_ctx *ctx)
list.health = true;
list.capabilities = true;
case 2:
- list.dimms = true;
- list.buses = true;
- list.regions = true;
+ if (num_list_flags() == 0) {
+ list.dimms = true;
+ list.buses = true;
+ list.regions = true;
+ list.namespaces = true;
+ }
case 1:
list.media_errors = true;
- list.namespaces = true;
list.dax = true;
case 0:
break;
1 year
[PATCH v2 00/27] Add support for OpenCAPI SCM devices
by Alastair D'Silva
From: Alastair D'Silva <alastair(a)d-silva.org>
This series adds support for OpenCAPI SCM devices, exposing
them as nvdimms so that we can make use of the existing
infrastructure.
V2:
- "powerpc: Map & release OpenCAPI LPC memory"
- Fix #if -> #ifdef
- use pci_dev_id to get the bdfn
- use __be64 to hold be data
- indent check_hotplug_memory_addressable correctly
- Remove export of check_hotplug_memory_addressable
- "ocxl: Conditionally bind SCM devices to the generic OCXL driver"
- Improve patch description and remove redundant default
- "nvdimm: Add driver for OpenCAPI Storage Class Memory"
- Mark a few funcs as static as identified by the 0day bot
- Add OCXL dependancies to OCXL_SCM
- Use memcpy_mcsafe in scm_ndctl_config_read
- Rename scm_foo_offset_0x00 to scm_foo_header_parse & add docs
- Name DIMM attribs "ocxl" rather than "scm"
- Split out into base + many feature patches
- "powerpc: Enable OpenCAPI Storage Class Memory driver on bare metal"
- Build DEV_DAX & friends as modules
- "ocxl: Conditionally bind SCM devices to the generic OCXL driver"
- Patch dropped (easy enough to maintain this out of tree for development)
- "ocxl: Tally up the LPC memory on a link & allow it to be mapped"
- Add a warning if an unmatched lpc_release is called
- "ocxl: Add functions to map/unmap LPC memory"
- Use EXPORT_SYMBOL_GPL
Alastair D'Silva (27):
memory_hotplug: Add a bounds check to __add_pages
nvdimm: remove prototypes for nonexistent functions
powerpc: Add OPAL calls for LPC memory alloc/release
mm/memory_hotplug: Allow check_hotplug_memory_addressable to be called
from drivers
powerpc: Map & release OpenCAPI LPC memory
ocxl: Tally up the LPC memory on a link & allow it to be mapped
ocxl: Add functions to map/unmap LPC memory
ocxl: Save the device serial number in ocxl_fn
ocxl: Free detached contexts in ocxl_context_detach_all()
nvdimm: Add driver for OpenCAPI Storage Class Memory
nvdimm/ocxl: Add register addresses & status values to header
nvdimm/ocxl: Read the capability registers & wait for device ready
nvdimm/ocxl: Add support for Admin commands
nvdimm/ocxl: Add support for near storage commands
nvdimm/ocxl: Register a character device for userspace to interact
with
nvdimm/ocxl: Implement the Read Error Log command
nvdimm/ocxl: Add controller dump IOCTLs
nvdimm/ocxl: Add an IOCTL to report controller statistics
nvdimm/ocxl: Forward events to userspace
nvdimm/ocxl: Add an IOCTL to request controller health & perf data
nvdimm/ocxl: Support firmware update via sysfs
nvdimm/ocxl: Implement the heartbeat command
nvdimm/ocxl: Add debug IOCTLs
nvdimm/ocxl: Implement Overwrite
nvdimm/ocxl: Expose SMART data via ndctl
powerpc: Enable OpenCAPI Storage Class Memory driver on bare metal
MAINTAINERS: Add myself & nvdimm/ocxl to ocxl
MAINTAINERS | 3 +
arch/powerpc/configs/powernv_defconfig | 4 +
arch/powerpc/include/asm/opal-api.h | 2 +
arch/powerpc/include/asm/opal.h | 3 +
arch/powerpc/include/asm/pnv-ocxl.h | 2 +
arch/powerpc/platforms/powernv/ocxl.c | 42 +
arch/powerpc/platforms/powernv/opal-call.c | 2 +
drivers/misc/ocxl/config.c | 50 +
drivers/misc/ocxl/context.c | 6 +-
drivers/misc/ocxl/core.c | 60 +
drivers/misc/ocxl/link.c | 60 +
drivers/misc/ocxl/ocxl_internal.h | 36 +
drivers/nvdimm/Kconfig | 2 +
drivers/nvdimm/Makefile | 2 +-
drivers/nvdimm/nd-core.h | 4 -
drivers/nvdimm/ocxl/Kconfig | 21 +
drivers/nvdimm/ocxl/Makefile | 7 +
drivers/nvdimm/ocxl/scm.c | 2220 ++++++++++++++++++++
drivers/nvdimm/ocxl/scm_internal.c | 238 +++
drivers/nvdimm/ocxl/scm_internal.h | 284 +++
drivers/nvdimm/ocxl/scm_sysfs.c | 163 ++
include/linux/memory_hotplug.h | 5 +
include/misc/ocxl.h | 19 +
include/uapi/nvdimm/ocxl-scm.h | 127 ++
mm/memory_hotplug.c | 21 +
25 files changed, 3377 insertions(+), 6 deletions(-)
create mode 100644 drivers/nvdimm/ocxl/Kconfig
create mode 100644 drivers/nvdimm/ocxl/Makefile
create mode 100644 drivers/nvdimm/ocxl/scm.c
create mode 100644 drivers/nvdimm/ocxl/scm_internal.c
create mode 100644 drivers/nvdimm/ocxl/scm_internal.h
create mode 100644 drivers/nvdimm/ocxl/scm_sysfs.c
create mode 100644 include/uapi/nvdimm/ocxl-scm.h
--
2.23.0
1 year
[PATCH] mm: get rid of WARN if failed to cow user pages
by Murphy Zhou
By running xfstests with fsdax enabled, generic/437 always hits this
warning[1] since this commit:
commit 83d116c53058d505ddef051e90ab27f57015b025
Author: Jia He <justin.he(a)arm.com>
Date: Fri Oct 11 22:09:39 2019 +0800
mm: fix double page fault on arm64 if PTE_AF is cleared
Looking at the test program[2] generic/437 uses, it's pretty easy
to hit this warning. Remove this WARN as it seems not necessary.
[2] https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/src/t_mmap_co...
[1] warning message:
-----------------------------------------------------------------------
[ 97.344077] WARNING: CPU: 0 PID: 2486 at mm/memory.c:2281 wp_page_copy+0x687/0x6e0
[ 97.348354] Modules linked in: nf_tables nfnetlink rfkill sunrpc snd_hda_codec_generic ledtrig_audio qxl snd_hda_intel snd_intel_dspcfg drm_ttm_helper snd_hda_codec ttm snd_hda_core drm_kms_helper snd_hwdep snd_seq syscopyarea sysfillrect sysimgblt snd_seq_device fb_sys_fops snd_pcm drm snd_timer crc32_pclmul snd soundcore dax_pmem_compat i2c_piix4 device_dax virtio_balloon pcspkr joydev dax_pmem_core ip_tables xfs libcrc32c crct10dif_pclmul crc32c_intel sd_mod sg ata_generic 8139too ata_piix libata ghash_clmulni_intel 8139cp virtio_console serio_raw nd_pmem mii dm_mirror dm_region_hash dm_log dm_mod
[ 97.382176] CPU: 0 PID: 2486 Comm: t_mmap_cow_race Tainted: G W 5.5.0-rc3-v5.5-rc3 #1
[ 97.387804] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
[ 97.392228] RIP: 0010:wp_page_copy+0x687/0x6e0
[ 97.396572] Code: 95 f5 00 48 81 e6 00 f0 ff ff ba 00 10 00 00 49 c1 ff 06 49 c1 e7 0c 4c 03 3d 35 95 f5 00 4c 89 ff e8 8d 85 6a 00 85 c0 74 0a <0f> 0b 4c 89 ff e8 8f 80 6a 00 65 48 8b 04 25 40 7f 01 00 83 a8 d8
[ 97.413487] RSP: 0000:ffffb882493afd28 EFLAGS: 00010206
[ 97.417520] RAX: 0000000000001000 RBX: ffffb882493afdf8 RCX: 0000000000001000
[ 97.422295] RDX: 0000000000001000 RSI: 00007f1d20c00000 RDI: ffff976384d1f000
[ 97.426914] RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000000ca308
[ 97.431746] R10: 0000000000000000 R11: ffffe0cd4c1347c0 R12: ffffe0cd4c1347c0
[ 97.436371] R13: ffff9763b46ba190 R14: ffff9763a963d0c0 R15: ffff976384d1f000
[ 97.441085] FS: 00007f1d203fe700(0000) GS:ffff9763b8a00000(0000) knlGS:0000000000000000
[ 97.445500] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 97.448393] CR2: 00007f1d20c00000 CR3: 0000000333dfc000 CR4: 00000000000006f0
[ 97.452346] Call Trace:
[ 97.453681] ? __switch_to_asm+0x34/0x70
[ 97.455566] ? __switch_to_asm+0x40/0x70
[ 97.457418] ? __switch_to_asm+0x34/0x70
[ 97.459197] ? __switch_to_asm+0x40/0x70
[ 97.460971] ? __switch_to_asm+0x34/0x70
[ 97.462746] ? __switch_to_asm+0x40/0x70
[ 97.464561] ? __switch_to_asm+0x34/0x70
[ 97.466342] ? __switch_to_asm+0x40/0x70
[ 97.468141] do_wp_page+0x8c/0x640
[ 97.469818] ? finish_task_switch+0x77/0x2a0
[ 97.471631] __handle_mm_fault+0xa06/0x1420
[ 97.473517] handle_mm_fault+0xae/0x1d0
[ 97.475168] __do_page_fault+0x27f/0x4e0
[ 97.476947] do_page_fault+0x30/0x110
[ 97.478490] async_page_fault+0x39/0x40
[ 97.480275] RIP: 0033:0x400d68
[ 97.481587] Code: 53 48 89 fb 48 83 ec 10 66 2e 0f 1f 84 00 00 00 00 00 0f b6 03 ba 04 00 00 00 be 00 00 20 00 48 89 df 89 44 24 0c 8b 44 24 0c <88> 03 e8 71 fc ff ff 85 c0 78 30 e8 b8 fc ff ff 89 c7 41 f7 ec 89
[ 97.489326] RSP: 002b:00007f1d203fded0 EFLAGS: 00010202
[ 97.491336] RAX: 0000000000000001 RBX: 00007f1d20c00000 RCX: 0000000000000000
[ 97.494080] RDX: 0000000000000004 RSI: 0000000000200000 RDI: 00007f1d20c00000
[ 97.497244] RBP: 0000000000000002 R08: 00007f1d2138d230 R09: 00007f1d2138d260
[ 97.500028] R10: 00007f1d203fe9d0 R11: 0000000000000000 R12: 0000000051eb851f
[ 97.502785] R13: 00007fff01d5607f R14: 0000000000000000 R15: 00007f1d203fdfc0
[ 97.505546] ---[ end trace 18f1c94bd7c3d1e1 ]---
Signed-off-by: Murphy Zhou <jencce.kernel(a)gmail.com>
---
mm/memory.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/mm/memory.c b/mm/memory.c
index 45442d9..e3a1dce 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2269,18 +2269,12 @@ static inline bool cow_user_page(struct page *dst, struct page *src,
/*
* This really shouldn't fail, because the page is there
- * in the page tables. But it might just be unreadable,
- * in which case we just give up and fill the result with
- * zeroes.
+ * in the page tables. But it could happen during races,
+ * or it might just be unreadable, in which cases we
+ * just give up and fill the result with zeroes.
*/
- if (__copy_from_user_inatomic(kaddr, uaddr, PAGE_SIZE)) {
- /*
- * Give a warn in case there can be some obscure
- * use-case
- */
- WARN_ON_ONCE(1);
+ if (__copy_from_user_inatomic(kaddr, uaddr, PAGE_SIZE))
clear_page(kaddr);
- }
ret = true;
--
1.8.3.1
1 year
[ndctl V2] namespace/create: Don't create multiple namespaces unless greedy
by Santosh Sivaraj
From: Vaibhav Jain <vaibhav(a)linux.ibm.com>
Currently create-namespace creates two namespaces with the '-f' option
even without the greedy flag. This behavior got introduced by
c75f7236d. The earlier behaviour was to create one namespace even with
the '-f' flag. The earlier behavior:
$ sudo ./ndctl/ndctl create-namespace -s 16M -f
[sudo] password for santosh:
{
"dev":"namespace1.14",
"mode":"fsdax",
"map":"dev",
"size":"14.00 MiB (14.68 MB)",
"uuid":"03f6b921-7684-4736-b2be-87f021996e52",
"sector_size":512,
"align":65536,
"blockdev":"pmem1.14"
}
After greedy option was introduced:
$ sudo ./ndctl/ndctl create-namespace -s 16M -f
{
"dev":"namespace1.8",
"mode":"fsdax",
"map":"dev",
"size":"14.00 MiB (14.68 MB)",
"uuid":"1a9d6610-558b-454e-8b95-76c6201798cb",
"sector_size":512,
"align":65536,
"blockdev":"pmem1.8"
}
{
"dev":"namespace0.3",
"mode":"fsdax",
"map":"dev",
"size":"14.00 MiB (14.68 MB)",
"uuid":"eed9d28b-69a2-4c7c-9503-24e8aee87b1e",
"sector_size":512,
"align":65536,
"blockdev":"pmem0.3"
}
The force flag makes sense only in the case of a reconfiguration or
greedy namespace creation.
Fixes: c75f7236d (ndctl/namespace: add a --continue option to create namespaces greedily)
Signed-off-by: Santosh Sivaraj <santosh(a)fossix.org>
Signed-off-by: Vaibhav Jain <vaibhav(a)linux.ibm.com>
---
ndctl/namespace.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/ndctl/namespace.c b/ndctl/namespace.c
index 7fb0007..b1f2158 100644
--- a/ndctl/namespace.c
+++ b/ndctl/namespace.c
@@ -1388,11 +1388,9 @@ static int do_xaction_namespace(const char *namespace,
(*processed)++;
if (param.greedy)
continue;
- }
- if (force) {
- if (rc)
+ } else if (param.greedy && force) {
saved_rc = rc;
- continue;
+ continue;
}
return rc;
}
--
2.23.0
1 year
[PATCH ndctl] ndctl, test: add bus-id parameter for start-scrub/wait-scrub operation
by Yi Zhang
On some NVDIMM servers, scrub operation will take long time to be finished
as it start on all nvdimm buses in the system, add the bus-id parameter to
do the scrub on the NFIT_TEST_BUS0
Signed-off-by: Yi Zhang <yi.zhang(a)redhat.com>
---
test/btt-errors.sh | 4 ++--
test/clear.sh | 2 +-
test/inject-error.sh | 2 +-
test/pfn-meta-errors.sh | 2 +-
test/pmem-errors.sh | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/btt-errors.sh b/test/btt-errors.sh
index cb35865..00c0796 100755
--- a/test/btt-errors.sh
+++ b/test/btt-errors.sh
@@ -115,7 +115,7 @@ bb_inj=$((dataoff/512))
# inject badblocks for one page at the start of the file
$NDCTL inject-error --block="$bb_inj" --count=8 $dev
-$NDCTL start-scrub && $NDCTL wait-scrub
+$NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
force_raw 0
mount -o nodelalloc "/dev/$blockdev" $MNT
@@ -149,7 +149,7 @@ map=$(hexdump -s 96 -n 4 "/dev/$raw_bdev" | head -1 | cut -d' ' -f2-)
map=$(tr -d ' ' <<< "0x${map#* }${map%% *}")
bb_inj=$((map/512))
$NDCTL inject-error --block="$bb_inj" --count=1 $dev
-$NDCTL start-scrub && $NDCTL wait-scrub
+$NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
force_raw 0
# make sure reading the first block of the namespace fails
diff --git a/test/clear.sh b/test/clear.sh
index 17d5bed..1bd12da 100755
--- a/test/clear.sh
+++ b/test/clear.sh
@@ -41,7 +41,7 @@ err_sector="$(((size/512) / 2))"
err_count=8
if ! read sector len < /sys/block/$blockdev/badblocks; then
$NDCTL inject-error --block="$err_sector" --count=$err_count $dev
- $NDCTL start-scrub && $NDCTL wait-scrub
+ $NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
fi
read sector len < /sys/block/$blockdev/badblocks
[ $((sector * 2)) -ne $((size /512)) ] && echo "fail: $LINENO" && exit 1
diff --git a/test/inject-error.sh b/test/inject-error.sh
index 49e68b3..825bf18 100755
--- a/test/inject-error.sh
+++ b/test/inject-error.sh
@@ -77,7 +77,7 @@ do_tests()
# inject normally
$NDCTL inject-error --block=$err_block --count=$err_count $dev
- $NDCTL start-scrub && $NDCTL wait-scrub
+ $NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
check_status "$err_block" "$err_count"
if read -r sector len < /sys/block/$blockdev/badblocks; then
test "$sector" -eq "$err_block"
diff --git a/test/pfn-meta-errors.sh b/test/pfn-meta-errors.sh
index 2b57f19..14a15ae 100755
--- a/test/pfn-meta-errors.sh
+++ b/test/pfn-meta-errors.sh
@@ -61,7 +61,7 @@ mblk="$((metaoff/512))"
# inject in the middle of the struct page area
bb_inj=$(((dblk - mblk)/2))
$NDCTL inject-error --block="$bb_inj" --count=32 $dev
-$NDCTL start-scrub && $NDCTL wait-scrub
+$NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
# after probe from the enable-namespace, the error should've been cleared
force_raw 0
diff --git a/test/pmem-errors.sh b/test/pmem-errors.sh
index 9553a3f..3d90508 100755
--- a/test/pmem-errors.sh
+++ b/test/pmem-errors.sh
@@ -46,7 +46,7 @@ err_sector="$(((size/512) / 2))"
err_count=8
if ! read sector len < /sys/block/$blockdev/badblocks; then
$NDCTL inject-error --block="$err_sector" --count=$err_count $dev
- $NDCTL start-scrub; $NDCTL wait-scrub
+ $NDCTL start-scrub $NFIT_TEST_BUS0; $NDCTL wait-scrub $NFIT_TEST_BUS0
fi
read sector len < /sys/block/$blockdev/badblocks
[ $((sector * 2)) -ne $((size /512)) ] && echo "fail: $LINENO" && false
--
2.21.0
1 year
[PATCH v3 00/19][RFC] virtio-fs: Enable DAX support
by Vivek Goyal
Hi,
This patch series enables DAX support for virtio-fs filesystem. Patches
are based on 5.3-rc5 kernel and need first patch series posted for
virtio-fs support with subject "virtio-fs: shared file system for virtual
machines".
https://www.redhat.com/archives/virtio-fs/2019-August/msg00281.html
Enabling DAX seems to improve performance for most of the operations
in general a great deal. I have reported performance numbers in first patch
series so I am not repeating these here.
Any comments or feedback is welcome.
Thanks
Vivek
Sebastien Boeuf (3):
virtio: Add get_shm_region method
virtio: Implement get_shm_region for PCI transport
virtio: Implement get_shm_region for MMIO transport
Stefan Hajnoczi (4):
dax: remove block device dependencies
fuse, dax: add fuse_conn->dax_dev field
virtio_fs, dax: Set up virtio_fs dax_device
fuse, dax: add DAX mmap support
Vivek Goyal (12):
dax: Pass dax_dev to dax_writeback_mapping_range()
fuse: Keep a list of free dax memory ranges
fuse: implement FUSE_INIT map_alignment field
fuse: Introduce setupmapping/removemapping commands
fuse, dax: Implement dax read/write operations
fuse: Define dax address space operations
fuse, dax: Take ->i_mmap_sem lock during dax page fault
fuse: Maintain a list of busy elements
dax: Create a range version of dax_layout_busy_page()
fuse: Add logic to free up a memory range
fuse: Release file in process context
fuse: Take inode lock for dax inode truncation
drivers/dax/super.c | 3 +-
drivers/virtio/virtio_mmio.c | 32 +
drivers/virtio/virtio_pci_modern.c | 108 +++
fs/dax.c | 89 +-
fs/ext2/inode.c | 2 +-
fs/ext4/inode.c | 2 +-
fs/fuse/cuse.c | 3 +-
fs/fuse/dir.c | 2 +
fs/fuse/file.c | 1206 +++++++++++++++++++++++++++-
fs/fuse/fuse_i.h | 99 ++-
fs/fuse/inode.c | 138 +++-
fs/fuse/virtio_fs.c | 134 +++-
fs/xfs/xfs_aops.c | 2 +-
include/linux/dax.h | 12 +-
include/linux/virtio_config.h | 17 +
include/uapi/linux/fuse.h | 47 +-
include/uapi/linux/virtio_fs.h | 3 +
include/uapi/linux/virtio_mmio.h | 11 +
include/uapi/linux/virtio_pci.h | 11 +-
19 files changed, 1868 insertions(+), 53 deletions(-)
--
2.20.1
1 year
[PATCH 00/10] Add support for OpenCAPI SCM devices
by Alastair D'Silva
From: Alastair D'Silva <alastair(a)d-silva.org>
This series adds support for OpenCAPI SCM devices, exposing
them as nvdimms so that we can make use of the existing
infrastructure.
The first patch (in memory_hotplug) has reviews/acks, but has
not yet made it upstream.
Alastair D'Silva (10):
memory_hotplug: Add a bounds check to __add_pages
nvdimm: remove prototypes for nonexistent functions
powerpc: Add OPAL calls for LPC memory alloc/release
powerpc: Map & release OpenCAPI LPC memory
ocxl: Tally up the LPC memory on a link & allow it to be mapped
ocxl: Add functions to map/unmap LPC memory
ocxl: Save the device serial number in ocxl_fn
nvdimm: Add driver for OpenCAPI Storage Class Memory
powerpc: Enable OpenCAPI Storage Class Memory driver on bare metal
ocxl: Conditionally bind SCM devices to the generic OCXL driver
arch/powerpc/configs/powernv_defconfig | 4 +
arch/powerpc/include/asm/opal-api.h | 2 +
arch/powerpc/include/asm/opal.h | 3 +
arch/powerpc/include/asm/pnv-ocxl.h | 2 +
arch/powerpc/platforms/powernv/ocxl.c | 41 +
arch/powerpc/platforms/powernv/opal-call.c | 2 +
drivers/misc/ocxl/Kconfig | 7 +
drivers/misc/ocxl/config.c | 50 +
drivers/misc/ocxl/core.c | 60 +
drivers/misc/ocxl/link.c | 60 +
drivers/misc/ocxl/ocxl_internal.h | 36 +
drivers/misc/ocxl/pci.c | 3 +
drivers/nvdimm/Kconfig | 17 +
drivers/nvdimm/Makefile | 3 +
drivers/nvdimm/nd-core.h | 4 -
drivers/nvdimm/ocxl-scm.c | 2210 ++++++++++++++++++++
drivers/nvdimm/ocxl-scm_internal.c | 232 ++
drivers/nvdimm/ocxl-scm_internal.h | 331 +++
drivers/nvdimm/ocxl-scm_sysfs.c | 219 ++
include/linux/memory_hotplug.h | 5 +
include/misc/ocxl.h | 19 +
include/uapi/linux/ocxl-scm.h | 128 ++
mm/memory_hotplug.c | 22 +
23 files changed, 3456 insertions(+), 4 deletions(-)
create mode 100644 drivers/nvdimm/ocxl-scm.c
create mode 100644 drivers/nvdimm/ocxl-scm_internal.c
create mode 100644 drivers/nvdimm/ocxl-scm_internal.h
create mode 100644 drivers/nvdimm/ocxl-scm_sysfs.c
create mode 100644 include/uapi/linux/ocxl-scm.h
--
2.21.0
1 year, 1 month
[PATCH v6] mm/pgmap: Use correct alignment when looking at first pfn from a region
by Aneesh Kumar K.V
vmem_altmap_offset() adjust the section aligned base_pfn offset.
So we need to make sure we account for the same when computing base_pfn.
ie, for altmap_valid case, our pfn_first should be:
pfn_first = altmap->base_pfn + vmem_altmap_offset(altmap);
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar(a)linux.ibm.com>
---
* changes from v5
* update commit subject and use linux-mm for merge
mm/memremap.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/mm/memremap.c b/mm/memremap.c
index ed70c4e8e52a..233908d7df75 100644
--- a/mm/memremap.c
+++ b/mm/memremap.c
@@ -54,8 +54,16 @@ static void pgmap_array_delete(struct resource *res)
static unsigned long pfn_first(struct dev_pagemap *pgmap)
{
- return PHYS_PFN(pgmap->res.start) +
- vmem_altmap_offset(pgmap_altmap(pgmap));
+ const struct resource *res = &pgmap->res;
+ struct vmem_altmap *altmap = pgmap_altmap(pgmap);
+ unsigned long pfn;
+
+ if (altmap) {
+ pfn = altmap->base_pfn + vmem_altmap_offset(altmap);
+ } else
+ pfn = PHYS_PFN(res->start);
+
+ return pfn;
}
static unsigned long pfn_end(struct dev_pagemap *pgmap)
--
2.21.0
1 year, 1 month
Lease semantic proposal
by Ira Weiny
Since the last RFC patch set[1] much of the discussion of supporting RDMA with
FS DAX has been around the semantics of the lease mechanism.[2] Within that
thread it was suggested I try and write some documentation and/or tests for the
new mechanism being proposed. I have created a foundation to test lease
functionality within xfstests.[3] This should be close to being accepted.
Before writing additional lease tests, or changing lots of kernel code, this
email presents documentation for the new proposed "layout lease" semantic.
At Linux Plumbers[4] just over a week ago, I presented the current state of the
patch set and the outstanding issues. Based on the discussion there, well as
follow up emails, I propose the following addition to the fcntl() man page.
Thank you,
Ira
[1] https://lkml.org/lkml/2019/8/9/1043
[2] https://lkml.org/lkml/2019/8/9/1062
[3] https://www.spinics.net/lists/fstests/msg12620.html
[4] https://linuxplumbersconf.org/event/4/contributions/368/
<fcntl man page addition>
Layout Leases
-------------
Layout (F_LAYOUT) leases are special leases which can be used to control and/or
be informed about the manipulation of the underlying layout of a file.
A layout is defined as the logical file block -> physical file block mapping
including the file size and sharing of physical blocks among files. Note that
the unwritten state of a block is not considered part of file layout.
**Read layout lease F_RDLCK | F_LAYOUT**
Read layout leases can be used to be informed of layout changes by the
system or other users. This lease is similar to the standard read (F_RDLCK)
lease in that any attempt to change the _layout_ of the file will be reported to
the process through the lease break process. But this lease is different
because the file can be opened for write and data can be read and/or written to
the file as long as the underlying layout of the file does not change.
Therefore, the lease is not broken if the file is simply open for write, but
_may_ be broken if an operation such as, truncate(), fallocate() or write()
results in changing the underlying layout.
**Write layout lease (F_WRLCK | F_LAYOUT)**
Write Layout leases can be used to break read layout leases to indicate that
the process intends to change the underlying layout lease of the file.
A process which has taken a write layout lease has exclusive ownership of the
file layout and can modify that layout as long as the lease is held.
Operations which change the layout are allowed by that process. But operations
from other file descriptors which attempt to change the layout will break the
lease through the standard lease break process. The F_LAYOUT flag is used to
indicate a difference between a regular F_WRLCK and F_WRLCK with F_LAYOUT. In
the F_LAYOUT case opens for write do not break the lease. But some operations,
if they change the underlying layout, may.
The distinction between read layout leases and write layout leases is that
write layout leases can change the layout without breaking the lease within the
owning process. This is useful to guarantee a layout prior to specifying the
unbreakable flag described below.
**Unbreakable Layout Leases (F_UNBREAK)**
In order to support pinning of file pages by direct user space users an
unbreakable flag (F_UNBREAK) can be used to modify the read and write layout
lease. When specified, F_UNBREAK indicates that any user attempting to break
the lease will fail with ETXTBUSY rather than follow the normal breaking
procedure.
Both read and write layout leases can have the unbreakable flag (F_UNBREAK)
specified. The difference between an unbreakable read layout lease and an
unbreakable write layout lease are that an unbreakable read layout lease is
_not_ exclusive. This means that once a layout is established on a file,
multiple unbreakable read layout leases can be taken by multiple processes and
used to pin the underlying pages of that file.
Care must therefore be taken to ensure that the layout of the file is as the
user wants prior to using the unbreakable read layout lease. A safe mechanism
to do this would be to take a write layout lease and use fallocate() to set the
layout of the file. The layout lease can then be "downgraded" to unbreakable
read layout as long as no other user broke the write layout lease.
</fcntl man page addition>
1 year, 1 month