RE: DAX numa_attribute vs SubNUMA clusters

2019-04-04 Thread Elliott, Robert (Servers)
> -Original Message- > From: Linux-nvdimm On Behalf Of > Brice Goglin > Sent: Thursday, April 04, 2019 2:48 PM > To: linux-nvdimm@lists.01.org > Subject: DAX numa_attribute vs SubNUMA clusters > > Hello > > I am trying to understand the locality of the DAX devices with > respect to

[PATCH v1 07/17] kunit: test: add initial tests

2019-04-04 Thread Brendan Higgins
Add a test for string stream along with a simpler example. Signed-off-by: Brendan Higgins --- kunit/Kconfig | 12 ++ kunit/Makefile | 4 ++ kunit/example-test.c | 88 ++ kunit/string-stream-test.c | 61

[PATCH v1 17/17] MAINTAINERS: add proc sysctl KUnit test to PROC SYSCTL section

2019-04-04 Thread Brendan Higgins
Add entry for the new proc sysctl KUnit test to the PROC SYSCTL section. Signed-off-by: Brendan Higgins --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index fc2cedbd9b43e..03054e4c6386c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12523,6

[PATCH v1 11/17] kunit: test: add test managed resource tests

2019-04-04 Thread Brendan Higgins
From: Avinash Kondareddy Tests how tests interact with test managed resources in their lifetime. Signed-off-by: Avinash Kondareddy Signed-off-by: Brendan Higgins --- kunit/test-test.c | 122 ++ 1 file changed, 122 insertions(+) diff --git

[PATCH v1 10/17] kunit: test: add the concept of assertions

2019-04-04 Thread Brendan Higgins
Add support for assertions which are like expectations except the test terminates if the assertion is not satisfied. The idea with assertions is that you use them to state all the preconditions for your test. Logically speaking, these are the premises of the test case, so if a premise isn't true,

[PATCH v1 06/17] kbuild: enable building KUnit

2019-04-04 Thread Brendan Higgins
Add KUnit to root Kconfig and Makefile allowing it to actually be built. Signed-off-by: Brendan Higgins --- Kconfig | 2 ++ Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Kconfig b/Kconfig index 48a80beab6853..10428501edb78 100644 --- a/Kconfig +++ b/Kconfig @@

[PATCH v1 13/17] kunit: defconfig: add defconfigs for building KUnit tests

2019-04-04 Thread Brendan Higgins
Add defconfig for UML and a fragment that can be used to configure other architectures for building KUnit tests. Add option to kunit_tool to use a defconfig to create the kunitconfig. Signed-off-by: Brendan Higgins --- arch/um/configs/kunit_defconfig | 8

[PATCH v1 01/17] kunit: test: add KUnit test runner core

2019-04-04 Thread Brendan Higgins
Add core facilities for defining unit tests; this provides a common way to define test cases, functions that execute code which is under test and determine whether the code under test behaves as expected; this also provides a way to group together related test cases in test suites (here we call

[PATCH v1 02/17] kunit: test: add test resource management API

2019-04-04 Thread Brendan Higgins
Create a common API for test managed resources like memory and test objects. A lot of times a test will want to set up infrastructure to be used in test cases; this could be anything from just wanting to allocate some memory to setting up a driver stack; this defines facilities for creating "test

[PATCH v1 16/17] kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec()

2019-04-04 Thread Brendan Higgins
From: Iurii Zaikin KUnit tests for initialized data behavior of proc_dointvec that is explicitly checked in the code. Includes basic parsing tests including int min/max overflow. Signed-off-by: Iurii Zaikin Signed-off-by: Brendan Higgins --- kernel/Makefile | 2 + kernel/sysctl-test.c

[PATCH v1 15/17] MAINTAINERS: add entry for KUnit the unit testing framework

2019-04-04 Thread Brendan Higgins
Add myself as maintainer of KUnit, the Linux kernel's unit testing framework. Signed-off-by: Brendan Higgins --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3e5a5d263f299..fc2cedbd9b43e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@

[PATCH v1 08/17] kunit: test: add support for test abort

2019-04-04 Thread Brendan Higgins
Add support for aborting/bailing out of test cases, which is needed for implementing assertions. An assertion is like an expectation, but bails out of the test case early if the assertion is not met. The idea with assertions is that you use them to state all the preconditions for your test.

[PATCH v1 05/17] kunit: test: add the concept of expectations

2019-04-04 Thread Brendan Higgins
Add support for expectations, which allow properties to be specified and then verified in tests. Signed-off-by: Brendan Higgins --- include/kunit/test.h | 419 +++ kunit/test.c | 34 2 files changed, 453 insertions(+) diff --git

[PATCH v1 12/17] kunit: tool: add Python wrappers for running KUnit tests

2019-04-04 Thread Brendan Higgins
From: Felix Guo The ultimate goal is to create minimal isolated test binaries; in the meantime we are using UML to provide the infrastructure to run tests, so define an abstract way to configure and run tests that allow us to change the context in which tests are built without affecting the

[PATCH v1 14/17] Documentation: kunit: add documentation for KUnit

2019-04-04 Thread Brendan Higgins
Add documentation for KUnit, the Linux kernel unit testing framework. - Add intro and usage guide for KUnit - Add API reference Signed-off-by: Felix Guo Signed-off-by: Brendan Higgins --- Documentation/index.rst | 1 + Documentation/kunit/api/index.rst | 16 ++

[PATCH v1 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-04-04 Thread Brendan Higgins
This patch set proposes KUnit, a lightweight unit testing and mocking framework for the Linux kernel. Unlike Autotest and kselftest, KUnit is a true unit testing framework; it does not require installing the kernel on a test machine or in a VM and does not require tests to be written in userspace

[PATCH v1 09/17] kunit: test: add tests for kunit test abort

2019-04-04 Thread Brendan Higgins
Add KUnit tests for the KUnit test abort mechanism (see preceding commit). Add tests both for general try catch mechanism as well as non-architecture specific mechanism. Signed-off-by: Brendan Higgins --- kunit/Makefile| 3 +- kunit/test-test.c | 135

[PATCH v1 04/17] kunit: test: add kunit_stream a std::stream like logger

2019-04-04 Thread Brendan Higgins
A lot of the expectation and assertion infrastructure prints out fairly complicated test failure messages, so add a C++ style log library for for logging test results. Signed-off-by: Brendan Higgins --- include/kunit/kunit-stream.h | 85 include/kunit/test.h | 2

Re: [PATCH RFC tip/core/rcu 1/4] dax/super: Dynamically allocate dax_srcu

2019-04-04 Thread Paul E. McKenney
On Wed, Apr 03, 2019 at 11:31:01AM -0700, Dan Williams wrote: > On Tue, Apr 2, 2019 at 7:29 AM Paul E. McKenney wrote: > > > > Having DEFINE_SRCU() or DEFINE_STATIC_SRCU() in a loadable module > > requires that the size of the reserved region be increased, which is > > not something we really

Re: [RFC PATCH 2/5] lib/memregion: Uplevel the pmem "region" ida to a global allocator

2019-04-04 Thread Dan Williams
On Thu, Apr 4, 2019 at 12:32 PM Matthew Wilcox wrote: > > On Thu, Apr 04, 2019 at 12:08:38PM -0700, Dan Williams wrote: > > +++ b/lib/Kconfig > > @@ -318,6 +318,12 @@ config DECOMPRESS_LZ4 > > config GENERIC_ALLOCATOR > > bool > > > > +# > > +# Generic IDA for memory regions > > +# > >

Re: [RFC PATCH 3/5] acpi/hmat: Track target address ranges

2019-04-04 Thread Dan Williams
On Thu, Apr 4, 2019 at 1:56 PM Keith Busch wrote: > > On Thu, Apr 04, 2019 at 12:08:44PM -0700, Dan Williams wrote: > > As of ACPI 6.3 the HMAT no longer advertises the physical memory address > > range for its entries. Instead, the expectation is the corresponding > > entry in the SRAT is looked

Re: [RFC PATCH 3/5] acpi/hmat: Track target address ranges

2019-04-04 Thread Keith Busch
On Thu, Apr 04, 2019 at 12:08:44PM -0700, Dan Williams wrote: > As of ACPI 6.3 the HMAT no longer advertises the physical memory address > range for its entries. Instead, the expectation is the corresponding > entry in the SRAT is looked up by the target proximity domain. > > Given there may be

Re: [PATCH v3 3/3] kvm: remove redundant PageReserved() check

2019-04-04 Thread David Hildenbrand
On 04.04.19 22:23, Barret Rhoden wrote: > kvm_is_reserved_pfn() already checks PageReserved(). > > Signed-off-by: Barret Rhoden > Reviewed-by: David Hildenbrand > --- > virt/kvm/kvm_main.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/virt/kvm/kvm_main.c

Re: [PATCH v3 0/3] kvm: Use huge pages for DAX-backed files

2019-04-04 Thread Barret Rhoden
-yi.z.zh...@intel.com (Bad email address / failure) Sorry about that. On 4/4/19 4:23 PM, Barret Rhoden wrote: This patch series depends on DAX pages not being PageReserved. Once that is in place, these changes will let KVM use huge pages with DAX-backed files. From previous

[PATCH v3 3/3] kvm: remove redundant PageReserved() check

2019-04-04 Thread Barret Rhoden
kvm_is_reserved_pfn() already checks PageReserved(). Signed-off-by: Barret Rhoden Reviewed-by: David Hildenbrand --- virt/kvm/kvm_main.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 55fe8e20d8fd..c44985375e7f 100644

[PATCH v3 2/3] kvm: Use huge pages for DAX-backed files

2019-04-04 Thread Barret Rhoden
This change allows KVM to map DAX-backed files made of huge pages with huge mappings in the EPT/TDP. DAX pages are not PageTransCompound. The existing check is trying to determine if the mapping for the pfn is a huge mapping or not. For non-DAX maps, e.g. hugetlbfs, that means checking

[PATCH v3 1/3] mm: make dev_pagemap_mapping_shift() externally visible

2019-04-04 Thread Barret Rhoden
KVM has a use case for determining the size of a dax mapping. The KVM code has easy access to the address and the mm; hence the change in parameters. Signed-off-by: Barret Rhoden Reviewed-by: David Hildenbrand Acked-by: Dan Williams --- include/linux/mm.h | 3 +++ mm/memory-failure.c | 38

[PATCH v3 0/3] kvm: Use huge pages for DAX-backed files

2019-04-04 Thread Barret Rhoden
This patch series depends on DAX pages not being PageReserved. Once that is in place, these changes will let KVM use huge pages with DAX-backed files. >From previous discussions[1], it sounds like DAX might not need to keep the PageReserved bit, but that it hadn't been sorted out yet. Without

Re: [RFC PATCH 2/5] lib/memregion: Uplevel the pmem "region" ida to a global allocator

2019-04-04 Thread Matthew Wilcox
On Thu, Apr 04, 2019 at 12:08:38PM -0700, Dan Williams wrote: > +++ b/lib/Kconfig > @@ -318,6 +318,12 @@ config DECOMPRESS_LZ4 > config GENERIC_ALLOCATOR > bool > > +# > +# Generic IDA for memory regions > +# Leaky abstraction -- nobody needs know that it's implemented as an IDA.

[RFC PATCH 5/5] device-dax: Add a driver for "hmem" devices

2019-04-04 Thread Dan Williams
Platform firmware like EFI/ACPI may publish "hmem" platform devices. Such a device is a performance differentiated memory range likely reserved for an application specific use case. The driver gives access to 100% of the capacity via a device-dax mmap instance by default. However, if

[RFC PATCH 4/5] acpi/hmat: Register special purpose memory as a device

2019-04-04 Thread Dan Williams
Memory that has been tagged EFI_SPECIAL_PURPOSE, and has performance properties described by the ACPI HMAT is expected to have an application specific consumer. Those consumers may want 100% of the memory capacity to be reserved from any usage by the kernel. By default, with this enabling, a

[RFC PATCH 2/5] lib/memregion: Uplevel the pmem "region" ida to a global allocator

2019-04-04 Thread Dan Williams
In preparation for handling platform differentiated memory types beyond persistent memory, uplevel the "region" identifier to a global number space. This enables a device-dax instance to be registered to any memory type with guaranteed unique names. Cc: Keith Busch Signed-off-by: Dan Williams

[RFC PATCH 3/5] acpi/hmat: Track target address ranges

2019-04-04 Thread Dan Williams
As of ACPI 6.3 the HMAT no longer advertises the physical memory address range for its entries. Instead, the expectation is the corresponding entry in the SRAT is looked up by the target proximity domain. Given there may be multiple distinct address ranges that share the same performance profile

[RFC PATCH 1/5] efi: Detect UEFI 2.8 Special Purpose Memory

2019-04-04 Thread Dan Williams
UEFI 2.8 defines an EFI_MEMORY_SP attribute bit to augment the interpretation of the EFI Memory Types as "reserved for a special purpose". The proposed Linux behavior for special purpose memory is that it is reserved for direct-access (device-dax) by default and not available for any kernel

[RFC PATCH 0/5] EFI Special Purpose Memory Support

2019-04-04 Thread Dan Williams
The EFI 2.8 Specification [1] introduces the EFI_MEMORY_SP ("special purpose") memory attribute. This attribute bit replaces the deprecated "reservation hint" that was introduced in ACPI 6.2 and removed in ACPI 6.3. Given the increasing diversity of memory types that might be advertised to the

Re: [PATCH] libnvdimm, pmem: fix a possible OOB access when read and write pmem

2019-04-04 Thread Ira Weiny
On Thu, Apr 04, 2019 at 10:58:01AM +0800, Li RongQing wrote: > If offset is not zero and length is bigger than PAGE_SIZE, > this will cause to out of boundary access to a page memory > > Fixes: 98cc093cba1e "(block, THP: make block_device_operations.rw_page > support THP)" > Co-developed-by:

Re: [Qemu-devel] [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Darrick J. Wong
On Thu, Apr 04, 2019 at 06:08:44AM -0400, Pankaj Gupta wrote: > > > On Thu 04-04-19 05:09:10, Pankaj Gupta wrote: > > > > > > > > On Thu, Apr 04, 2019 at 09:09:12AM +1100, Dave Chinner wrote: > > > > > > On Wed, Apr 03, 2019 at 04:10:18PM +0530, Pankaj Gupta wrote: > > > > > > > Virtio pmem

MESSAGE COULD NOT BE DELIVERED

2019-04-04 Thread michael-k
The original message was received at Thu, 4 Apr 2019 19:26:47 +0800 from users.noreply.github.com [77.6.188.248] - The following addresses had permanent fatal errors - - Transcript of session follows - while talking to lists.01.org.: >>> MAIL

Re: [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Pankaj Gupta
> > On Thu, Apr 04, 2019 at 02:12:30AM -0400, Pankaj Gupta wrote: > > > All this ad hoc IS_DAX conditional logic is getting pretty nasty. > > > > > > xfs_file_mmap( > > > > > > { > > > struct inode*inode = file_inode(filp); > > > > > > if (vma->vm_flags & VM_SYNC) { > > >

Re: [Qemu-devel] [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Pankaj Gupta
> On Thu 04-04-19 05:09:10, Pankaj Gupta wrote: > > > > > > On Thu, Apr 04, 2019 at 09:09:12AM +1100, Dave Chinner wrote: > > > > > On Wed, Apr 03, 2019 at 04:10:18PM +0530, Pankaj Gupta wrote: > > > > > > Virtio pmem provides asynchronous host page cache flush > > > > > > mechanism. we don't

Re: [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Adam Borowski
On Thu, Apr 04, 2019 at 02:12:30AM -0400, Pankaj Gupta wrote: > > All this ad hoc IS_DAX conditional logic is getting pretty nasty. > > > > xfs_file_mmap( > > > > { > > struct inode*inode = file_inode(filp); > > > > if (vma->vm_flags & VM_SYNC) { > > if

Re: [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Jan Kara
On Thu 04-04-19 05:09:10, Pankaj Gupta wrote: > > > > On Thu, Apr 04, 2019 at 09:09:12AM +1100, Dave Chinner wrote: > > > > On Wed, Apr 03, 2019 at 04:10:18PM +0530, Pankaj Gupta wrote: > > > > > Virtio pmem provides asynchronous host page cache flush > > > > > mechanism. we don't support

[PATCH 5.0 057/246] mm/resource: Return real error codes from walk failures

2019-04-04 Thread Greg Kroah-Hartman
5.0-stable review patch. If anyone has any objections, please let me know. -- [ Upstream commit 5cd401ace914dc68556c6d2fcae0c349444d5f86 ] walk_system_ram_range() can return an error code either becuase *it* failed, or because the 'func' that it calls returned an error. The

Re: [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Pankaj Gupta
> > On Thu, Apr 04, 2019 at 09:09:12AM +1100, Dave Chinner wrote: > > > On Wed, Apr 03, 2019 at 04:10:18PM +0530, Pankaj Gupta wrote: > > > > Virtio pmem provides asynchronous host page cache flush > > > > mechanism. we don't support 'MAP_SYNC' with virtio pmem > > > > and xfs. > > > > > > > >

Re: [Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver

2019-04-04 Thread Pankaj Gupta
> > > > > Subject: Re: [Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem > > > driver > > > > > > On Wed, Apr 03, 2019 at 04:10:15PM +0530, Pankaj Gupta wrote: > > > > This patch adds virtio-pmem driver for KVM guest. > > > > > > > > Guest reads the persistent memory range information

Re: [Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver

2019-04-04 Thread Yuval Shaia
On Wed, Apr 03, 2019 at 08:40:13AM -0400, Pankaj Gupta wrote: > > > Subject: Re: [Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver > > > > On Wed, Apr 03, 2019 at 04:10:15PM +0530, Pankaj Gupta wrote: > > > This patch adds virtio-pmem driver for KVM guest. > > > > > > Guest reads

Re: [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Pankaj Gupta
> > On Thu, Apr 04, 2019 at 09:09:12AM +1100, Dave Chinner wrote: > > On Wed, Apr 03, 2019 at 04:10:18PM +0530, Pankaj Gupta wrote: > > > Virtio pmem provides asynchronous host page cache flush > > > mechanism. we don't support 'MAP_SYNC' with virtio pmem > > > and xfs. > > > > > >

Re: [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Pankaj Gupta
Hi Dave, > > Virtio pmem provides asynchronous host page cache flush > > mechanism. we don't support 'MAP_SYNC' with virtio pmem > > and xfs. > > > > Signed-off-by: Pankaj Gupta > > --- > > fs/xfs/xfs_file.c | 8 > > 1 file changed, 8 insertions(+) > > > > diff --git