Re: [PATCH v19 6/8] PM: hibernate: disable when there are active secretmem users

2021-05-18 Thread Dan Williams
On Tue, May 18, 2021 at 6:33 PM James Bottomley wrote: > > On Tue, 2021-05-18 at 11:24 +0100, Mark Rutland wrote: > > On Thu, May 13, 2021 at 09:47:32PM +0300, Mike Rapoport wrote: > > > From: Mike Rapoport > > > > > > It is unsafe to allow saving of secretmem areas to the hibernation > > >

Re: [ndctl PATCH] ndctl: Update nvdimm mailing list address

2021-05-18 Thread Dan Williams
On Tue, May 18, 2021 at 3:26 PM Vishal Verma wrote: > > The 'nvdimm' mailing list has moved from lists.01.org to > lists.linux.dev. Update CONTRIBUTING.md and configure.ac to reflect > this. LGTM Reviewed-by: Dan Williams

Re: [Virtio-fs] [PATCH v3 2/3] dax: Add a wakeup mode parameter to put_unlocked_entry()

2021-05-17 Thread Dan Williams
On Wed, Apr 21, 2021 at 11:25 PM Christoph Hellwig wrote: > > On Wed, Apr 21, 2021 at 12:09:54PM -0700, Dan Williams wrote: > > Can you get in the habit of not replying inline with new patches like > > this? Collect the review feedback, take a pause, and resend the full > >

[GIT PULL] libnvdimm fixes for 5.13-rc2

2021-05-14 Thread Dan Williams
failures. - Move the nvdimm mailing list - Miscellaneous minor fixups Dan Williams (2): MAINTAINERS: Move nvdimm mailing list ACPI: NFIT: Fix support for variable 'SPA' structure size Wan Jiabing (1): libnvdimm: Remove

[GIT PULL] dax fixes for v5.13-rc2

2021-05-14 Thread Dan Williams
Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/dax-fixes-5.13-rc2 ...to receive a fix for a hang condition in the filesystem-dax core when exercised by virtiofs. This bug has been there from the beginning, but the condition has not triggered on

Re: [PATCH] MAINTAINERS: Move nvdimm mailing list

2021-05-13 Thread Dan Williams
On Wed, Apr 21, 2021 at 12:05 AM Dan Williams wrote: > > After seeing some users have subscription management trouble, more spam > than other Linux development lists, and considering some of the benefits > of kernel.org hosted lists, nvdimm and persistent memory development is >

Re: [PATCH v2] powerpc/papr_scm: Make 'perf_stats' invisible if perf-stats unavailable

2021-05-12 Thread Dan Williams
p->res.name = pdev->name; > p->res.flags = IORESOURCE_MEM; > > + /* Try retriving the stat buffer and see if its supported */ s/retriving/retrieving/ > + stat_size = drc_pmem_query_stats(p, NULL, 0); > + if (stat_size > 0)

Re: [PATCH v1 07/11] mm/sparse-vmemmap: populate compound pagemaps

2021-05-10 Thread Dan Williams
On Thu, May 6, 2021 at 4:02 AM Joao Martins wrote: [..] > >> +static pte_t * __meminit vmemmap_lookup_address(unsigned long addr) > > > > I think this can be replaced with a call to follow_pte(_mm...). > > > > Ah, of course! That would shorten things up too. Now that I look closely, I notice

Re: [PATCH] ACPI: NFIT: Fix support for variable 'SPA' structure size

2021-05-07 Thread Dan Williams
On Fri, May 7, 2021 at 7:49 AM Rafael J. Wysocki wrote: > > On Fri, May 7, 2021 at 4:12 PM Dan Williams wrote: > > > > On Fri, May 7, 2021 at 2:47 AM Rafael J. Wysocki wrote: > > > > > > Hi Dan, > > > > > > On Fri, May 7, 2021 at 9:33 A

Re: [PATCH] ACPI: NFIT: Fix support for variable 'SPA' structure size

2021-05-07 Thread Dan Williams
On Fri, May 7, 2021 at 2:47 AM Rafael J. Wysocki wrote: > > Hi Dan, > > On Fri, May 7, 2021 at 9:33 AM Dan Williams wrote: > > > > ACPI 6.4 introduced the "SpaLocationCookie" to the NFIT "System Physical > > Address (SPA) Range Structure"

[PATCH] ACPI: NFIT: Fix support for variable 'SPA' structure size

2021-05-07 Thread Dan Williams
Yi Zhang Tested-by: Yi Zhang Signed-off-by: Dan Williams --- Rafael, I can take this through nvdimm.git after -rc1, but if you are sending any fixes to Linus based on your merge baseline between now and Monday, please pick up this one. drivers/acpi/nfit/core.c | 15 ++ to

Re: [bug report] system panic at nfit_get_smbios_id+0x6e/0xf0 [nfit] during boot

2021-05-06 Thread Dan Williams
cki, Rafael J > > Subject: Re: [bug report] system panic at nfit_get_smbios_id+0x6e/0xf0 > > [nfit] during boot > > > > On Sat, May 1, 2021 at 2:05 PM Dan Williams > > wrote: > > > > > > On Fri, Apr 30, 2021 at 7:28 PM Yi Zhang wrote: > > >

Re: [PATCH v1 07/11] mm/sparse-vmemmap: populate compound pagemaps

2021-05-05 Thread Dan Williams
On Thu, Mar 25, 2021 at 4:10 PM Joao Martins wrote: > > A compound pagemap is a dev_pagemap with @align > PAGE_SIZE and it > means that pages are mapped at a given huge page alignment and utilize > uses compound pages as opposed to order-0 pages. > > To minimize struct page overhead we take

Re: [PATCH v1 05/11] mm/sparse-vmemmap: add a pgmap argument to section activation

2021-05-05 Thread Dan Williams
On Wed, May 5, 2021 at 3:38 PM Joao Martins wrote: > > > > On 5/5/21 11:34 PM, Dan Williams wrote: > > On Thu, Mar 25, 2021 at 4:10 PM Joao Martins > > wrote: > >> > >> @altmap is stored in a dev_pagemap, but it will be repurposed for > >> hotp

Re: [PATCH v1 04/11] mm/memremap: add ZONE_DEVICE support for compound pages

2021-05-05 Thread Dan Williams
On Wed, May 5, 2021 at 3:36 PM Joao Martins wrote: [..] > > Ah yup, my eyes glazed over that. I think this is another place that > > benefits from a more specific name than "align". "pfns_per_compound" > > "compound_pfns"? > > > We are still describing a page, just not a base page. So perhaps >

Re: [PATCH v1 06/11] mm/sparse-vmemmap: refactor vmemmap_populate_basepages()

2021-05-05 Thread Dan Williams
I suspect it's a good sign I'm only finding cosmetic and changelog changes in the review... I have some more: A year for now if I'm tracking down a problem and looking through mm commits I would appreciate a subject line like the following: "refactor core of vmemmap_populate_basepages() to

Re: [PATCH v1 05/11] mm/sparse-vmemmap: add a pgmap argument to section activation

2021-05-05 Thread Dan Williams
On Thu, Mar 25, 2021 at 4:10 PM Joao Martins wrote: > > @altmap is stored in a dev_pagemap, but it will be repurposed for > hotplug memory for storing the memmap in the hotplugged memory[*] and > reusing the altmap infrastructure to that end. This is to say that > altmap can't be replaced with a

Re: [PATCH v1 04/11] mm/memremap: add ZONE_DEVICE support for compound pages

2021-05-05 Thread Dan Williams
On Wed, May 5, 2021 at 12:50 PM Joao Martins wrote: > > > > On 5/5/21 7:44 PM, Dan Williams wrote: > > On Thu, Mar 25, 2021 at 4:10 PM Joao Martins > > wrote: > >> > >> Add a new align property for struct dev_pagemap which specifies that a > >

Re: [PATCH v1 04/11] mm/memremap: add ZONE_DEVICE support for compound pages

2021-05-05 Thread Dan Williams
On Thu, Mar 25, 2021 at 4:10 PM Joao Martins wrote: > > Add a new align property for struct dev_pagemap which specifies that a > pagemap is composed of a set of compound pages of size @align, instead > of base pages. When these pages are initialised, most are initialised as > tail pages instead

Re: [PATCH v4 0/3] nvdimm: Enable sync-dax property for nvdimm

2021-05-04 Thread Dan Williams
On Tue, May 4, 2021 at 2:03 AM Aneesh Kumar K.V wrote: > > On 5/4/21 11:13 AM, Pankaj Gupta wrote: > > > >> > >> What this patch series did was to express that property via a device > >> tree node and guest driver enables a hypercall based flush mechanism to > >> ensure persistence. > > > >

Re: [PATCH v4 0/3] nvdimm: Enable sync-dax property for nvdimm

2021-05-03 Thread Dan Williams
On Mon, May 3, 2021 at 7:06 AM Shivaprasad G Bhat wrote: > > > On 5/1/21 12:44 AM, Dan Williams wrote: > > Some corrections to terminology confusion below... > > > > > > On Wed, Apr 28, 2021 at 8:49 PM Shivaprasad G Bhat > > wrote: > >>

Re: [bug report] system panic at nfit_get_smbios_id+0x6e/0xf0 [nfit] during boot

2021-05-01 Thread Dan Williams
On Fri, Apr 30, 2021 at 7:28 PM Yi Zhang wrote: > > Hi > > With the latest Linux tree, my DCPMM server boot failed with the > bellow panic log, pls help check it, let me know if you need any test > for it. So v5.12 is ok but v5.12+ is not? Might you be able to bisect? If not can you send the

Re: [PATCH v4 0/3] nvdimm: Enable sync-dax property for nvdimm

2021-04-30 Thread Dan Williams
Some corrections to terminology confusion below... On Wed, Apr 28, 2021 at 8:49 PM Shivaprasad G Bhat wrote: > > The nvdimm devices are expected to ensure write persistence during power > failure kind of scenarios. No, QEMU is not expected to make that guarantee. QEMU is free to lie to the

Re: [PATCH] MAINTAINERS: Move nvdimm mailing list

2021-04-29 Thread Dan Williams
On Tue, Apr 27, 2021 at 8:58 AM Jonathan Corbet wrote: > > Dan Williams writes: > > > After seeing some users have subscription management trouble, more spam > > than other Linux development lists, and considering some of the benefits > > of kernel.org hosted lists, n

Re: [PATCH v6 0/3] dax: Fix missed wakeup in put_unlocked_entry()

2021-04-28 Thread Dan Williams
On Wed, Apr 28, 2021 at 12:03 PM Vivek Goyal wrote: > > Hi, > > This is V6. Only change since V5 is that I changed order of WAKE_NEXT > and WAKE_ALL in comments too. > > Vivek > > Vivek Goyal (3): > dax: Add an enum for specifying dax wakup mode > dax: Add a wakeup mode parameter to

Re: [PATCH v1 03/11] mm/page_alloc: refactor memmap_init_zone_device() page init

2021-04-23 Thread Dan Williams
On Thu, Mar 25, 2021 at 4:10 PM Joao Martins wrote: > > Move struct page init to an helper function __init_zone_device_page(). Same sentence addition suggestion from the last patch to make this patch have some rationale for existing. > > Signed-off-by: Joao Martins > --- > mm/page_alloc.c |

Re: [PATCH v1 02/11] mm/page_alloc: split prep_compound_page into head and tail subparts

2021-04-23 Thread Dan Williams
On Thu, Mar 25, 2021 at 4:10 PM Joao Martins wrote: > > Split the utility function prep_compound_page() into head and tail > counterparts, and use them accordingly. To make this patch stand alone better lets add another sentence: "This is in preparation for sharing the storage for /

Re: [PATCH v1 01/11] memory-failure: fetch compound_head after pgmap_pfn_valid()

2021-04-23 Thread Dan Williams
On Thu, Mar 25, 2021 at 4:10 PM Joao Martins wrote: > > memory_failure_dev_pagemap() at the moment assumes base pages (e.g. > dax_lock_page()). For pagemap with compound pages fetch the > compound_head in case we are handling a tail page memory failure. > > Currently this is a nop, but in the

Re: [PATCH v4 0/3] dax: Fix missed wakeup in put_unlocked_entry()

2021-04-23 Thread Dan Williams
On Fri, Apr 23, 2021 at 6:07 AM Vivek Goyal wrote: > > Hi, > > This is V4 of the patches. Posted V3 here. > > https://lore.kernel.org/linux-fsdevel/20210419213636.1514816-1-vgo...@redhat.com/ > > Changes since V3 are. > > - Renamed "enum dax_entry_wake_mode" to "enum dax_wake_mode" (Matthew

Re: [Virtio-fs] [PATCH v3 2/3] dax: Add a wakeup mode parameter to put_unlocked_entry()

2021-04-22 Thread Dan Williams
On Wed, Apr 21, 2021 at 11:25 PM Christoph Hellwig wrote: > > On Wed, Apr 21, 2021 at 12:09:54PM -0700, Dan Williams wrote: > > Can you get in the habit of not replying inline with new patches like > > this? Collect the review feedback, take a pause, and resend the full > >

Re: [Virtio-fs] [PATCH v3 2/3] dax: Add a wakeup mode parameter to put_unlocked_entry()

2021-04-21 Thread Dan Williams
; > > patches we want to wake up all waiters at one callsite. Hence, add a > > > parameter to the function. > > > > > > This patch does not introduce any change of behavior. > > > > > > Suggested-by: Dan Williams > > > Signed-off-by: Viv

[PATCH] MAINTAINERS: Move nvdimm mailing list

2021-04-21 Thread Dan Williams
and shutdown thereafter. Cc: Ira Weiny Cc: Oliver O'Halloran Cc: Matthew Wilcox Cc: Jan Kara Cc: Jonathan Corbet Cc: Dave Jiang Cc: Vishal Verma Signed-off-by: Dan Williams --- Documentation/ABI/obsolete/sysfs-class-dax|2 + Documentation/ABI/removed/sysfs-bus-nfit |2

Re: [PATCH -next v2] tools/testing/nvdimm: Make symbol '__nfit_test_ioremap' static

2021-04-20 Thread Dan Williams
On Tue, Apr 20, 2021 at 12:31 AM Zou Wei wrote: > > The sparse tool complains as follows: > > tools/testing/nvdimm/test/iomap.c:65:14: warning: > symbol '__nfit_test_ioremap' was not declared. Should it be static? > > This symbol is not used outside of iomap.c, so this > commit marks it static.

[ANNOUNCE] NVDIMM development move to nvd...@lists.linux.dev

2021-04-20 Thread Dan Williams
There have been multiple occasions recently where people reported trouble managing their subscription to linux-nvdimm@lists.01.org. The spam filtering also appears less robust compared to other Linux development lists. There are also side benefits to being on kernel.org infrastructure as it has a

Re: [PATCH] libnvdimm.h: Remove duplicate struct declaration

2021-04-20 Thread Dan Williams
On Tue, Apr 20, 2021 at 6:39 AM Santosh Sivaraj wrote: > > Hi Ira, > > Ira Weiny writes: > > > On Mon, Apr 19, 2021 at 07:27:25PM +0800, Wan Jiabing wrote: > >> struct device is declared at 133rd line. > >> The declaration here is unnecessary. Remove it. > >> > >> Signed-off-by: Wan Jiabing >

Re: [PATCH][v2] dax: Fix missed wakeup during dax entry invalidation

2021-04-19 Thread Dan Williams
On Mon, Apr 19, 2021 at 11:45 AM Vivek Goyal wrote: > > This is V2 of the patch. Posted V1 here. > > https://lore.kernel.org/linux-fsdevel/20210416173524.ga1379...@redhat.com/ > > Based on feedback from Dan and Jan, modified the patch to wake up > all waiters when dax entry is invalidated. This

[GIT PULL] libnvdimm fixes for v5.12-rc8 / final

2021-04-16 Thread Dan Williams
Arnd Bergmann (1): dax: avoid -Wempty-body warnings Dan Williams (2): libnvdimm: Notify disk drivers to revalidate region read-only Merge branch 'for-5.12/dax' into libnvdimm-fixes Vaibhav Jain (1): libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC

Re: [PATCH v1 1/1] libnvdimm: Don't use GUID APIs against raw buffer

2021-04-16 Thread Dan Williams
On Fri, Apr 16, 2021 at 1:42 PM Andy Shevchenko wrote: > > On Fri, Apr 16, 2021 at 01:08:06PM -0700, Dan Williams wrote: > > [ add Erik ] > > > > On Fri, Apr 16, 2021 at 10:36 AM Andy Shevchenko > > wrote: > > > > > > On Thu, Apr 15,

Re: [PATCH v1 1/1] libnvdimm: Don't use GUID APIs against raw buffer

2021-04-16 Thread Dan Williams
[ add Erik ] On Fri, Apr 16, 2021 at 10:36 AM Andy Shevchenko wrote: > > On Thu, Apr 15, 2021 at 05:37:54PM +0300, Andy Shevchenko wrote: > > Strictly speaking the comparison between guid_t and raw buffer > > is not correct. Return to plain memcmp() since the data structures > > haven't changed

Re: [PATCH] dax: Fix missed wakeup in put_unlocked_entry()

2021-04-16 Thread Dan Williams
On Fri, Apr 16, 2021 at 10:35 AM Vivek Goyal wrote: > > I am seeing missed wakeups which ultimately lead to a deadlock when I am > using virtiofs with DAX enabled and running "make -j". I had to mount > virtiofs as rootfs and also reduce to dax window size to 32M to reproduce > the problem

Re: [PATCH v1 1/1] ACPI: NFIT: Import GUID before use

2021-04-16 Thread Dan Williams
On Fri, Apr 16, 2021 at 10:34 AM Andy Shevchenko wrote: > > On Fri, Apr 16, 2021 at 09:15:34AM -0700, Dan Williams wrote: > > On Fri, Apr 16, 2021 at 1:58 AM Andy Shevchenko > > wrote: > > > On Fri, Apr 16, 2021 at 8:28 AM Dan Williams > > > wrote: > >

Re: [PATCH v1 1/1] ACPI: NFIT: Import GUID before use

2021-04-16 Thread Dan Williams
On Fri, Apr 16, 2021 at 1:58 AM Andy Shevchenko wrote: > > On Fri, Apr 16, 2021 at 8:28 AM Dan Williams wrote: > > > > On Thu, Apr 15, 2021 at 6:59 AM Andy Shevchenko > > wrote: > > > > > > Strictly speaking the comparison between guid_t and ra

Re: [PATCH v1 1/1] ACPI: NFIT: Import GUID before use

2021-04-15 Thread Dan Williams
On Thu, Apr 15, 2021 at 6:59 AM Andy Shevchenko wrote: > > Strictly speaking the comparison between guid_t and raw buffer > is not correct. Import GUID to variable of guid_t type and then > compare. Hmm, what about something like the following instead, because it adds safety. Any concerns about

Re: [PATCH] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-04-15 Thread Dan Williams
On Thu, Apr 15, 2021 at 4:44 AM Vaibhav Jain wrote: > > Thanks for looking into this Dan, > > Dan Williams writes: > > > On Wed, Apr 14, 2021 at 5:40 AM Vaibhav Jain wrote: > >> > >> Currently drc_pmem_qeury_stats() generates a dev_err in case > >

Re: [PATCH] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-04-14 Thread Dan Williams
On Wed, Apr 14, 2021 at 5:40 AM Vaibhav Jain wrote: > > Currently drc_pmem_qeury_stats() generates a dev_err in case > "Enable Performance Information Collection" feature is disabled from > HMC. The error is of the form below: > > papr_scm ibm,persistent-memory:ibm,pmemory@44104001: Failed to

Re: [PATCH v1] libnvdimm, dax: Fix a missing check in nd_dax_probe()

2021-04-09 Thread Dan Williams
On Fri, Apr 9, 2021 at 5:33 PM wrote: > > From: Yingjie Wang > > In nd_dax_probe(), nd_dax_alloc() may fail and return NULL. > Check for NULL before attempting to > use nd_dax to avoid a NULL pointer dereference. > > Fixes: c5ed9268643c ("libnvdimm, dax: autodetect support") > Signed-off-by:

Re: [PATCH] libnvdimm/region: Update nvdimm_has_flush() to handle ND_REGION_ASYNC

2021-04-09 Thread Dan Williams
On Mon, Apr 5, 2021 at 4:31 AM Aneesh Kumar K.V wrote: > > Vaibhav Jain writes: > > > In case a platform doesn't provide explicit flush-hints but provides an > > explicit flush callback via ND_REGION_ASYNC region flag, then > > nvdimm_has_flush() still returns '0' indicating that writes do not >

Re: [PATCH] libnvdimm/region: Update nvdimm_has_flush() to handle ND_REGION_ASYNC

2021-04-09 Thread Dan Williams
On Fri, Apr 2, 2021 at 2:26 AM Vaibhav Jain wrote: > > In case a platform doesn't provide explicit flush-hints but provides an > explicit flush callback via ND_REGION_ASYNC region flag, then > nvdimm_has_flush() still returns '0' indicating that writes do not > require flushing. This happens on

Re: [PATCH 3/3] mm/devmap: Remove pgmap accounting in the get_user_pages_fast() path

2021-03-29 Thread Dan Williams
On Thu, Mar 25, 2021 at 7:34 AM Jason Gunthorpe wrote: > > On Thu, Mar 18, 2021 at 10:03:06AM -0700, Dan Williams wrote: > > Yes. I still need to answer the question of whether mapping > > invalidation triggers longterm pin holders to relinquish their hold, > > but tha

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-24 Thread Dan Williams
On Wed, Mar 24, 2021 at 10:39 AM Christoph Hellwig wrote: > > On Wed, Mar 24, 2021 at 09:37:01AM -0700, Dan Williams wrote: > > > Eww. As I said I think the right way is that the file system (or > > > other consumer) can register a set of callbacks for opening the

Re: [PATCH 3/3] mm/devmap: Remove pgmap accounting in the get_user_pages_fast() path

2021-03-24 Thread Dan Williams
On Thu, Mar 18, 2021 at 3:02 AM Joao Martins wrote: > > On 3/18/21 4:08 AM, Dan Williams wrote: > > Now that device-dax and filesystem-dax are guaranteed to unmap all user > > mappings of devmap / DAX pages before tearing down the 'struct page' > > array, get_user_page

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-24 Thread Dan Williams
On Wed, Mar 24, 2021 at 12:48 AM Christoph Hellwig wrote: > > On Tue, Mar 23, 2021 at 07:19:28PM -0700, Dan Williams wrote: > > So I think the path forward is: > > > > - teach memory_failure() to allow for ranged failures > > > > - let interested drivers re

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-23 Thread Dan Williams
On Thu, Mar 18, 2021 at 7:18 PM ruansy.f...@fujitsu.com wrote: > > > > > -Original Message- > > From: ruansy.f...@fujitsu.com > > Subject: RE: [PATCH v3 01/11] pagemap: Introduce ->memory_failure() > > > > > > > > > > > > > > After the conversation with Dave I don't see the point of

Re: [PATCH] dax: avoid -Wempty-body warnings

2021-03-22 Thread Dan Williams
On Mon, Mar 22, 2021 at 4:45 AM Arnd Bergmann wrote: > > From: Arnd Bergmann > > gcc warns about an empty body in an else statement: > > drivers/dax/bus.c: In function 'do_id_store': > drivers/dax/bus.c:94:48: error: suggest braces around empty body in an 'else' > statement [-Werror=empty-body]

Re: [PATCH 2/3] mm, dax, pmem: Introduce dev_pagemap_failure()

2021-03-19 Thread Dan Williams
On Fri, Mar 19, 2021 at 6:47 PM Dave Chinner wrote: [..] > > Now I'm trying to reconcile the fact that platform > > poison handling will hit memory_failure() first and may not > > immediately reach the driver, if ever (see the perennially awkward > > firmware-first-mode error handling:

Re: [PATCH 2/3] mm, dax, pmem: Introduce dev_pagemap_failure()

2021-03-18 Thread Dan Williams
On Wed, Mar 17, 2021 at 9:45 PM Darrick J. Wong wrote: > > On Wed, Mar 17, 2021 at 09:08:23PM -0700, Dan Williams wrote: > > Jason wondered why the get_user_pages_fast() path takes references on a > > @pgmap object. The rationale was to protect against accessing a 'struct &g

Re: [PATCH 2/3] mm, dax, pmem: Introduce dev_pagemap_failure()

2021-03-18 Thread Dan Williams
On Wed, Mar 17, 2021 at 9:58 PM Dave Chinner wrote: > > On Wed, Mar 17, 2021 at 09:08:23PM -0700, Dan Williams wrote: > > Jason wondered why the get_user_pages_fast() path takes references on a > > @pgmap object. The rationale was to protect against accessing a 'struct &g

Re: [PATCH 3/3] mm/devmap: Remove pgmap accounting in the get_user_pages_fast() path

2021-03-18 Thread Dan Williams
On Thu, Mar 18, 2021 at 3:02 AM Joao Martins wrote: > > On 3/18/21 4:08 AM, Dan Williams wrote: > > Now that device-dax and filesystem-dax are guaranteed to unmap all user > > mappings of devmap / DAX pages before tearing down the 'struct page' > > array, get_user_page

[PATCH 3/3] mm/devmap: Remove pgmap accounting in the get_user_pages_fast() path

2021-03-17 Thread Dan Williams
c: Shiyang Ruan Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Cc: Matthew Wilcox Cc: Jan Kara Cc: Andrew Morton Signed-off-by: Dan Williams --- mm/gup.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index e4

[PATCH 2/3] mm, dax, pmem: Introduce dev_pagemap_failure()

2021-03-17 Thread Dan Williams
Christoph Hellwig Cc: Shiyang Ruan Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Cc: Matthew Wilcox Cc: Jan Kara Cc: Andrew Morton Cc: Naoya Horiguchi Cc: "Darrick J. Wong" Signed-off-by: Dan Williams --- drivers/dax/super.c | 15 +++ drivers/nvdi

[PATCH 1/3] mm/memory-failure: Prepare for mass memory_failure()

2021-03-17 Thread Dan Williams
to be called directly. Cc: Naoya Horiguchi Cc: Andrew Morton Signed-off-by: Dan Williams --- mm/memory-failure.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 24210c9bd843..43ba4307c526 100644 --- a/mm

[PATCH 0/3] mm, pmem: Force unmap pmem on surprise remove

2021-03-17 Thread Dan Williams
that this proposal is to do a best effort recovery of an event that should not happen (surprise removal) under nominal operation. --- Dan Williams (3): mm/memory-failure: Prepare for mass memory_failure() mm, dax, pmem: Introduce dev_pagemap_failure() mm/devmap: Remove

Re: [RFC 0/2] virtio-pmem: Asynchronous flush

2021-03-11 Thread Dan Williams
On Thu, Mar 11, 2021 at 8:21 PM Pankaj Gupta wrote: > > Hi David, > > > > Jeff reported preflush order issue with the existing implementation > > > of virtio pmem preflush. Dan suggested[1] to implement asynchronous > > > flush > > > for virtio pmem using work queue as done in md/RAID.

Re: [PATCH RFC 1/9] memremap: add ZONE_DEVICE support for compound pages

2021-03-11 Thread Dan Williams
On Wed, Mar 10, 2021 at 10:13 AM Joao Martins wrote: > > On 2/22/21 8:37 PM, Dan Williams wrote: > > On Mon, Feb 22, 2021 at 3:24 AM Joao Martins > > wrote: > >> On 2/20/21 1:43 AM, Dan Williams wrote: > >>> On Tue, Dec 8, 2020 at 9:59 PM John Hubbard

Re: [PATCH v2 00/10] fsdax,xfs: Add reflink support for fsdax

2021-03-10 Thread Dan Williams
On Wed, Mar 10, 2021 at 6:27 AM Matthew Wilcox wrote: > > On Wed, Mar 10, 2021 at 08:21:59AM -0600, Goldwyn Rodrigues wrote: > > On 13:02 10/03, Matthew Wilcox wrote: > > > On Wed, Mar 10, 2021 at 07:30:41AM -0500, Neal Gompa wrote: > > > > Forgive my ignorance, but is there a reason why this

Re: [PATCH v2] libnvdimm: Notify disk drivers to revalidate region read-only

2021-03-10 Thread Dan Williams
On Tue, Mar 9, 2021 at 10:54 PM Christoph Hellwig wrote: > > Looks good to me: > > Reviewed-by: Christoph Hellwig > > Question on the pre-existing code: given that nvdimm_check_and_set_ro is > the only caller of set_disk_ro for nvdimm devices, we'll also get > the message when initially setting

[ndctl PATCH] test/libndctl: Use ndctl_region_set_ro() to change disk read-only state

2021-03-09 Thread Dan Williams
test robot Reported-by: Vishal Verma Signed-off-by: Dan Williams --- test/libndctl.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/test/libndctl.c b/test/libndctl.c index faa308ade8fc..391b94086dae 100644 --- a/test/libndctl.c +++ b/test/libndctl.c @@ -1541

[PATCH v2] libnvdimm: Notify disk drivers to revalidate region read-only

2021-03-09 Thread Dan Williams
Vishal Verma Signed-off-by: Dan Williams --- Changes since v1 [1]: - Move from the sinking ship of revalidate_disk() to the local hotness of nd_pmem_notify() (hch). [1]: http://lore.kernel.org/r/161527286194.446794.5215036039655765042.st...@dwillia2-desk3.amr.corp.intel.com drivers

Re: [PATCH v2] include: Remove pagemap.h from blkdev.h

2021-03-09 Thread Dan Williams
gt; the number of files from 240, but that's still a big win -- 68% > reduction instead of 77%. > [..] > drivers/nvdimm/btt.c | 1 + > drivers/nvdimm/pmem.c | 1 + For the nvdimm bits: Acked-by: Dan Williams ___ Linux-

Re: [PATCH] libnvdimm: Let revalidate_disk() revalidate region read-only

2021-03-09 Thread Dan Williams
On Mon, Mar 8, 2021 at 11:31 PM Christoph Hellwig wrote: > > On Mon, Mar 08, 2021 at 10:54:22PM -0800, Dan Williams wrote: > > Previous kernels allowed the BLKROSET to override the disk's read-only > > status. With that situation fixed the pmem driver needs to rely on &

[PATCH] libnvdimm: Let revalidate_disk() revalidate region read-only

2021-03-08 Thread Dan Williams
Vishal Verma Signed-off-by: Dan Williams --- drivers/nvdimm/btt.c |7 +++ drivers/nvdimm/bus.c | 14 ++ drivers/nvdimm/pmem.c |7 +++ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 41aa1f01fc07..73d3bf

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-08 Thread Dan Williams
On Mon, Mar 8, 2021 at 3:34 AM ruansy.f...@fujitsu.com wrote: > > > > > 1 file changed, 8 insertions(+) > > > > > > > > > > diff --git a/include/linux/memremap.h b/include/linux/memremap.h > > > > > index 79c49e7f5c30..0bcf2b1e20bd 100644 > > > > > --- a/include/linux/memremap.h > > > > > +++

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-07 Thread Dan Williams
On Sun, Mar 7, 2021 at 7:38 PM ruansy.f...@fujitsu.com wrote: > > > On Mon, Feb 8, 2021 at 2:55 AM Shiyang Ruan > > wrote: > > > > > > When memory-failure occurs, we call this function which is implemented > > > by each kind of devices. For the fsdax case, pmem device driver > > > implements

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-06 Thread Dan Williams
On Mon, Feb 8, 2021 at 2:55 AM Shiyang Ruan wrote: > > When memory-failure occurs, we call this function which is implemented > by each kind of devices. For the fsdax case, pmem device driver > implements it. Pmem device driver will find out the block device where > the error page locates in,

Re: Question about the "EXPERIMENTAL" tag for dax in XFS

2021-03-02 Thread Dan Williams
On Mon, Mar 1, 2021 at 11:57 PM Dave Chinner wrote: > > On Mon, Mar 01, 2021 at 09:41:02PM -0800, Dan Williams wrote: > > On Mon, Mar 1, 2021 at 7:28 PM Darrick J. Wong wrote: > > > > > I really don't see you seem to be telling us that invalidation is an > > >

Re: Question about the "EXPERIMENTAL" tag for dax in XFS

2021-03-01 Thread Dan Williams
On Mon, Mar 1, 2021 at 9:38 PM Dave Chinner wrote: > > On Mon, Mar 01, 2021 at 07:33:28PM -0800, Dan Williams wrote: > > On Mon, Mar 1, 2021 at 6:42 PM Dave Chinner wrote: > > [..] > > > We do not need a DAX specific mechanism to tell us "DAX device > > &

Re: Question about the "EXPERIMENTAL" tag for dax in XFS

2021-03-01 Thread Dan Williams
On Mon, Mar 1, 2021 at 7:28 PM Darrick J. Wong wrote: > > On Mon, Mar 01, 2021 at 12:55:53PM -0800, Dan Williams wrote: > > On Sun, Feb 28, 2021 at 2:39 PM Dave Chinner wrote: > > > > > > On Sat, Feb 27, 2021 at 03:40:24PM -0800, Dan Williams wrote: > > >

Re: Question about the "EXPERIMENTAL" tag for dax in XFS

2021-03-01 Thread Dan Williams
On Mon, Mar 1, 2021 at 6:42 PM Dave Chinner wrote: [..] > We do not need a DAX specific mechanism to tell us "DAX device > gone", we need a generic block device interface that tells us "range > of block device is gone". This is the crux of the disagreement. The block_device is going away *and*

Re: Question about the "EXPERIMENTAL" tag for dax in XFS

2021-03-01 Thread Dan Williams
On Mon, Mar 1, 2021 at 2:47 PM Dave Chinner wrote: > > On Mon, Mar 01, 2021 at 12:55:53PM -0800, Dan Williams wrote: > > On Sun, Feb 28, 2021 at 2:39 PM Dave Chinner wrote: > > > > > > On Sat, Feb 27, 2021 at 03:40:24PM -0800, Dan Williams wrote: > > >

Re: Question about the "EXPERIMENTAL" tag for dax in XFS

2021-03-01 Thread Dan Williams
On Sun, Feb 28, 2021 at 11:27 PM Yasunori Goto wrote: > > Hello, Dan-san, > > On 2021/02/27 4:24, Dan Williams wrote: > > On Fri, Feb 26, 2021 at 11:05 AM Darrick J. Wong wrote: > >> > >> On Fri, Feb 26, 2021 at 09:45:45AM +, ruansy.f...@fujitsu.com wrot

Re: Question about the "EXPERIMENTAL" tag for dax in XFS

2021-03-01 Thread Dan Williams
On Sun, Feb 28, 2021 at 2:39 PM Dave Chinner wrote: > > On Sat, Feb 27, 2021 at 03:40:24PM -0800, Dan Williams wrote: > > On Sat, Feb 27, 2021 at 2:36 PM Dave Chinner wrote: > > > On Fri, Feb 26, 2021 at 02:41:34PM -0800, Dan Williams wrote: > > > > On Fri, Feb

Re: Question about the "EXPERIMENTAL" tag for dax in XFS

2021-02-27 Thread Dan Williams
On Sat, Feb 27, 2021 at 2:36 PM Dave Chinner wrote: > > On Fri, Feb 26, 2021 at 02:41:34PM -0800, Dan Williams wrote: > > On Fri, Feb 26, 2021 at 1:28 PM Dave Chinner wrote: > > > On Fri, Feb 26, 2021 at 12:59:53PM -0800, Dan Williams wrote: > > > > On Fri, Feb

Re: Question about the "EXPERIMENTAL" tag for dax in XFS

2021-02-26 Thread Dan Williams
On Fri, Feb 26, 2021 at 1:28 PM Dave Chinner wrote: > > On Fri, Feb 26, 2021 at 12:59:53PM -0800, Dan Williams wrote: > > On Fri, Feb 26, 2021 at 12:51 PM Dave Chinner wrote: > > > > > > On Fri, Feb 26, 2021 at 11:24:53AM -0800, Dan Williams wrote: > >

Re: Question about the "EXPERIMENTAL" tag for dax in XFS

2021-02-26 Thread Dan Williams
On Fri, Feb 26, 2021 at 12:51 PM Dave Chinner wrote: > > On Fri, Feb 26, 2021 at 11:24:53AM -0800, Dan Williams wrote: > > On Fri, Feb 26, 2021 at 11:05 AM Darrick J. Wong wrote: > > > > > > On Fri, Feb 26, 2021 at 09:45:45AM +, ruansy.f...@fujit

Re: Question about the "EXPERIMENTAL" tag for dax in XFS

2021-02-26 Thread Dan Williams
On Fri, Feb 26, 2021 at 11:05 AM Darrick J. Wong wrote: > > On Fri, Feb 26, 2021 at 09:45:45AM +, ruansy.f...@fujitsu.com wrote: > > Hi, guys > > > > Beside this patchset, I'd like to confirm something about the > > "EXPERIMENTAL" tag for dax in XFS. > > > > In XFS, the "EXPERIMENTAL" tag,

Re: [ndctl PATCH] Expose ndctl_bus_nfit_translate_spa as a public function.

2021-02-26 Thread Dan Williams
other buses. Reviewed-by: Dan Williams ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [GIT PULL] Compute Express Linux (CXL) for v5.12-rc1

2021-02-23 Thread Dan Williams
As much as I'd love to be working on "Compute Express Linux" the subject should have read "Compute Express Link". On Tue, Feb 23, 2021 at 8:05 PM Dan Williams wrote: > > Hi Linus, please pull from: > > git://git.kernel.org/pub/scm/linux/kernel/git/nv

[GIT PULL] Compute Express Linux (CXL) for v5.12-rc1

2021-02-23 Thread Dan Williams
ers of the CXL driver cxl/mem: Fix potential memory leak Dan Carpenter (1): cxl/mem: Return -EFAULT if copy_to_user() fails Dan Williams (2): cxl/mem: Introduce a driver for CXL-2.0-Type-3 endpoints cxl/mem: Register CXL memX devices .clang-format

[GIT PULL] libnvdimm + device-dax for v5.12-rc1

2021-02-23 Thread Dan Williams
. - Miscellaneous cleanups Dan Williams (1): Merge branch 'for-5.12/dax' into for-5.12/libnvdimm Shiyang Ruan (1): device-dax: Fix default return code of range_parse() Uwe Kleine-König (7): libnvdimm/dimm: Simplify

Re: [PATCH RFC 0/9] mm, sparse-vmemmap: Introduce compound pagemaps

2021-02-23 Thread Dan Williams
On Tue, Feb 23, 2021 at 5:00 PM Jason Gunthorpe wrote: > > On Tue, Feb 23, 2021 at 04:14:01PM -0800, Dan Williams wrote: > > [ add Ralph ] > > > > On Tue, Feb 23, 2021 at 3:07 PM Jason Gunthorpe wrote: > > > > > > On Tue, Feb 23, 2021 at 02:48:20PM -080

Re: [PATCH RFC 0/9] mm, sparse-vmemmap: Introduce compound pagemaps

2021-02-23 Thread Dan Williams
[ add Ralph ] On Tue, Feb 23, 2021 at 3:07 PM Jason Gunthorpe wrote: > > On Tue, Feb 23, 2021 at 02:48:20PM -0800, Dan Williams wrote: > > On Tue, Feb 23, 2021 at 10:54 AM Jason Gunthorpe wrote: > > > > > > On Tue, Feb 23, 2021 at 08:44:

Re: [PATCH RFC 0/9] mm, sparse-vmemmap: Introduce compound pagemaps

2021-02-23 Thread Dan Williams
On Tue, Feb 23, 2021 at 10:54 AM Jason Gunthorpe wrote: > > On Tue, Feb 23, 2021 at 08:44:52AM -0800, Dan Williams wrote: > > > > The downside would be one extra lookup in dev_pagemap tree > > > for other pgmap->types (P2P, FSDAX, PRIVATE). But just one > >

Re: [PATCH RFC 1/9] memremap: add ZONE_DEVICE support for compound pages

2021-02-23 Thread Dan Williams
On Tue, Feb 23, 2021 at 9:19 AM Joao Martins wrote: > > On 2/23/21 4:50 PM, Dan Williams wrote: > > On Tue, Feb 23, 2021 at 7:46 AM Joao Martins > > wrote: > >> On 2/22/21 8:37 PM, Dan Williams wrote: > >>> On Mon, Feb 22, 2021 at 3:24 AM Joao Martins

Re: [PATCH RFC 0/9] mm, sparse-vmemmap: Introduce compound pagemaps

2021-02-23 Thread Dan Williams
On Tue, Feb 23, 2021 at 9:16 AM Joao Martins wrote: > > On 2/23/21 4:44 PM, Dan Williams wrote: > > On Tue, Feb 23, 2021 at 8:30 AM Joao Martins > > wrote: > >> > >> On 2/20/21 1:18 AM, Dan Williams wrote: > >>> On Tue, Dec 8, 2020 at 9:32 A

Re: [PATCH RFC 1/9] memremap: add ZONE_DEVICE support for compound pages

2021-02-23 Thread Dan Williams
On Tue, Feb 23, 2021 at 7:46 AM Joao Martins wrote: > > On 2/22/21 8:37 PM, Dan Williams wrote: > > On Mon, Feb 22, 2021 at 3:24 AM Joao Martins > > wrote: > >> On 2/20/21 1:43 AM, Dan Williams wrote: > >>> On Tue, Dec 8, 2020 at 9:59 PM John Hubbard

Re: [PATCH RFC 0/9] mm, sparse-vmemmap: Introduce compound pagemaps

2021-02-23 Thread Dan Williams
On Tue, Feb 23, 2021 at 8:30 AM Joao Martins wrote: > > On 2/20/21 1:18 AM, Dan Williams wrote: > > On Tue, Dec 8, 2020 at 9:32 AM Joao Martins > > wrote: > >> Patch 6 - 8: Optimize grabbing/release a page refcount changes given that > >> we > >>

Re: [PATCH RFC 3/9] sparse-vmemmap: Reuse vmemmap areas for a given page size

2021-02-22 Thread Dan Williams
On Mon, Feb 22, 2021 at 3:42 AM Joao Martins wrote: > > > > On 2/20/21 3:34 AM, Dan Williams wrote: > > On Tue, Dec 8, 2020 at 9:32 AM Joao Martins > > wrote: > >> > >> Introduce a new flag, MEMHP_REUSE_VMEMMAP, which signals that > >> struct p

Re: [PATCH RFC 1/9] memremap: add ZONE_DEVICE support for compound pages

2021-02-22 Thread Dan Williams
On Mon, Feb 22, 2021 at 3:24 AM Joao Martins wrote: > > On 2/20/21 1:43 AM, Dan Williams wrote: > > On Tue, Dec 8, 2020 at 9:59 PM John Hubbard wrote: > >> On 12/8/20 9:28 AM, Joao Martins wrote: > >>> diff --git a/mm/memremap.c b/mm/memremap.c > >>

Re: [PATCH v17 08/10] PM: hibernate: disable when there are active secretmem users

2021-02-22 Thread Dan Williams
On Mon, Feb 22, 2021 at 2:24 AM Mike Rapoport wrote: > > On Mon, Feb 22, 2021 at 07:34:52AM +, Matthew Garrett wrote: > > On Mon, Feb 08, 2021 at 10:49:18AM +0200, Mike Rapoport wrote: > > > > > It is unsafe to allow saving of secretmem areas to the hibernation > > > snapshot as they would be

Re: [PATCH] cxl/mem: Fixes to IOCTL interface

2021-02-22 Thread Dan Williams
On Sat, Feb 20, 2021 at 7:47 PM Ben Widawsky wrote: > > On 21-02-20 18:38:36, Dan Williams wrote: > > On Sat, Feb 20, 2021 at 1:57 PM Ben Widawsky wrote: > > > > > > When submitting a command for userspace, input and output payload bounce > > > buffers a

  1   2   3   4   5   6   7   8   9   10   >