[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
9 months
[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;
11 months
[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
11 months, 2 weeks
[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
12 months
[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
12 months
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
[LSF/MM TOPIC] The end of the DAX experiment
by Dan Williams
Before people get too excited this isn't a proposal to kill DAX. The
topic proposal is a discussion to resolve lingering open questions
that currently motivate ext4 and xfs to scream "EXPERIMENTAL" when the
current DAX facilities are enabled. The are 2 primary concerns to
resolve. Enumerate the remaining features/fixes, and identify a path
to implement it all without regressing any existing application use
cases.
An enumeration of remaining projects follows, please expand this list
if I missed something:
* "DAX" has no specific meaning by itself, users have 2 use cases for
"DAX" capabilities: userspace cache management via MAP_SYNC, and page
cache avoidance where the latter aspect of DAX has no current api to
discover / use it. The project is to supplement MAP_SYNC with a
MAP_DIRECT facility and MADV_SYNC / MADV_DIRECT to indicate the same
dynamically via madvise. Similar to O_DIRECT, MAP_DIRECT would be an
application hint to avoid / minimiize page cache usage, but no strict
guarantee like what MAP_SYNC provides.
* Resolve all "if (dax) goto fail;" patterns in the kernel. Outside of
longterm-GUP (a topic in its own right) the projects here are
XFS-reflink and XFS-realtime-device support. DAX+reflink effectively
requires a given physical page to be mapped into two different inodes
at different (page->index) offsets. The challenge is to support
DAX-reflink without violating any existing application visible
semantics, the operating assumption / strawman to debate is that
experimental status is not blanket permission to go change existing
semantics in backwards incompatible ways.
* Deprecate, but not remove, the DAX mount option. Too many flows
depend on the option so it will never go away, but the facility is too
coarse. Provide an option to enable MAP_SYNC and
more-likely-to-do-something-useful-MAP_DIRECT on a per-directory
basis. The current proposal is to allow this property to only be
toggled while the directory is empty to avoid the complications of
racing page invalidation with new DAX mappings.
Secondary projects, i.e. important but I would submit are not in the
critical path to removing the "experimental" designation:
* Filesystem-integrated badblock management. Hook up the media error
notifications from libnvdimm to the filesystem to allow for operations
like "list files with media errors" and "enumerate bad file offsets on
a granulatiy smaller than a page". Another consideration along these
lines is to integrate machine-check-handling and dynamic error
notification into a filesystem interface. I've heard complaints that
the sigaction() based mechanism to receive BUS_MCEERR_* information,
while sufficient for the "System RAM" use case, is not precise enough
for the "Persistent Memory / DAX" use case where errors are repairable
and sub-page error information is useful.
* Userfaultfd for file-backed mappings and DAX
Ideally all the usual DAX, persistent memory, and GUP suspects could
be in the room to discuss this:
* Jan Kara
* Dave Chinner
* Christoph Hellwig
* Jeff Moyer
* Johannes Thumshirn
* Matthew Wilcox
* John Hubbard
* Jérôme Glisse
* MM folks for the reflink vs 'struct page' vs Xarray considerations
1 year, 1 month
[GIT PULL] libnvdimm for v5.5
by Dan Williams
Hi Linus, please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
tags/libnvdimm-for-5.5
...to receive the libnvdimm update for this cycle. The highlight this
cycle is continuing integration fixes for PowerPC and some resulting
optimizations. These commits have appeared in -next with no reported
issues.
---
The following changes since commit d6d5df1db6e9d7f8f76d2911707f7d5877251b02:
Linux 5.4-rc5 (2019-10-27 13:19:19 -0400)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
tags/libnvdimm-for-5.5
for you to fetch changes up to 0dfbb932bb67dc76646e579ec5cd21a12125a458:
MAINTAINERS: Remove Keith from NVDIMM maintainers (2019-11-25 15:45:08 -0800)
----------------------------------------------------------------
libnvdimm for 5.5
- Updates to better support vmalloc space restrictions on PowerPC platforms.
- Cleanups to move common sysfs attributes to core 'struct device_type'
objects.
- Export the 'target_node' attribute (the effective numa node if pmem is
marked online) for regions and namespaces.
- Miscellaneous fixups and optimizations.
----------------------------------------------------------------
Alastair D'Silva (1):
libnvdimm: Remove prototypes for nonexistent functions
Aneesh Kumar K.V (2):
libnvdimm/pfn_dev: Don't clear device memmap area during generic
namespace probe
libnvdimm/namespace: Differentiate between probe mapping and
runtime mapping
Dan Williams (14):
libnvdimm/pmem: Delete include of nd-core.h
libnvdimm: Move attribute groups to device type
libnvdimm: Move region attribute group definition
libnvdimm: Move nd_device_attribute_group to device_type
libnvdimm: Move nd_numa_attribute_group to device_type
libnvdimm: Move nd_region_attribute_group to device_type
libnvdimm: Move nd_mapping_attribute_group to device_type
libnvdimm: Move nvdimm_attribute_group to device_type
libnvdimm: Move nvdimm_bus_attribute_group to device_type
dax: Create a dax device_type
dax: Simplify root read-only definition for the 'resource' attribute
libnvdimm: Simplify root read-only definition for the 'resource' attribute
dax: Add numa_node to the default device-dax attributes
libnvdimm: Export the target_node attribute for regions and namespaces
Ira Weiny (2):
libnvdimm/namsepace: Don't set claim_class on error
libnvdimm: Trivial comment fix
Keith Busch (1):
MAINTAINERS: Remove Keith from NVDIMM maintainers
Qian Cai (1):
libnvdimm/btt: fix variable 'rc' set but not used
MAINTAINERS | 2 -
arch/powerpc/platforms/pseries/papr_scm.c | 25 +---
drivers/acpi/nfit/core.c | 7 -
drivers/dax/bus.c | 22 ++-
drivers/dax/pmem/core.c | 6 +-
drivers/nvdimm/btt.c | 18 ++-
drivers/nvdimm/btt_devs.c | 24 +--
drivers/nvdimm/bus.c | 44 +++++-
drivers/nvdimm/claim.c | 14 +-
drivers/nvdimm/core.c | 8 +-
drivers/nvdimm/dax_devs.c | 27 ++--
drivers/nvdimm/dimm_devs.c | 30 ++--
drivers/nvdimm/e820.c | 13 --
drivers/nvdimm/namespace_devs.c | 114 +++++++++------
drivers/nvdimm/nd-core.h | 21 ++-
drivers/nvdimm/nd.h | 27 ++--
drivers/nvdimm/of_pmem.c | 13 --
drivers/nvdimm/pfn_devs.c | 64 ++++----
drivers/nvdimm/pmem.c | 18 ++-
drivers/nvdimm/region_devs.c | 235 +++++++++++++++---------------
include/linux/libnvdimm.h | 7 -
include/linux/nd.h | 2 +-
22 files changed, 387 insertions(+), 354 deletions(-)
1 year, 1 month