linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-nvdimm <linux-nvdimm@lists.01.org>,
	"Martin Schwidefsky" <schwidefsky@de.ibm.com>,
	"Heiko Carstens" <heiko.carstens@de.ibm.com>,
	"Michal Hocko" <mhocko@suse.com>,
	"kbuild test robot" <lkp@intel.com>,
	"Thomas Meyer" <thomas@m3y3r.de>,
	"Dave Jiang" <dave.jiang@intel.com>,
	"Jérôme Glisse" <jglisse@redhat.com>, "Jan Kara" <jack@suse.cz>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	"Linux MM" <linux-mm@kvack.org>,
	"Gerald Schaefer" <gerald.schaefer@de.ibm.com>
Subject: Re: [PATCH v10] mm: introduce MEMORY_DEVICE_FS_DAX and CONFIG_DEV_PAGEMAP_OPS
Date: Fri, 18 May 2018 09:00:29 -0700	[thread overview]
Message-ID: <CAPcyv4iO1yss0sfBzHVDy3qja_wc+JT2Zi1zwtApDckTeuG2wQ@mail.gmail.com> (raw)
In-Reply-To: <20180518094616.GA25838@lst.de>

On Fri, May 18, 2018 at 2:46 AM, Christoph Hellwig <hch@lst.de> wrote:
> This looks reasonable to me.  A few more comments below.
>
>> This patch replaces and consolidates patch 2 [1] and 4 [2] from the v9
>> series [3] for "dax: fix dma vs truncate/hole-punch".
>
> Can you repost the whole series?  Otherwise things might get a little
> too confusing.

Sure thing.

>>               WARN_ON(IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API));
>> +             return 0;
>>       } else if (pfn_t_devmap(pfn)) {
>> +             struct dev_pagemap *pgmap;
>
> This should probably become something like:
>
>         bool supported = false;
>
>         ...
>
>
>         if (IS_ENABLED(CONFIG_FS_DAX_LIMITED) && pfn_t_special(pfn)) {
>                 ...
>                 supported = true;
>         } else if (pfn_t_devmap(pfn)) {
>                 pgmap = get_dev_pagemap(pfn_t_to_pfn(pfn), NULL);
>                 if (pgmap && pgmap->type == MEMORY_DEVICE_FS_DAX)
>                         supported = true;
>                 put_dev_pagemap(pgmap);
>         }
>
>         if (!supported) {
>                 pr_debug("VFS (%s): error: dax support not enabled\n",
>                         sb->s_id);
>                 return -EOPNOTSUPP;
>         }
>         return 0;

Looks good, will do.

>> +     select DEV_PAGEMAP_OPS if (ZONE_DEVICE && !FS_DAX_LIMITED)
>
> Btw, what was the reason again we couldn't get rid of FS_DAX_LIMITED?

The last I heard from Gerald they were still mildly interested in
keeping the dccssblk dax support going with this limited mode, and
threatened to add full page support at a later date:

---
From: Gerald

dcssblk seems to work fine, I did not see any SIGBUS while "executing
in place" from dcssblk with the current upstream kernel, maybe because
we only use dcssblk with fs dax in read-only mode.

Anyway, the dcssblk change is fine with me. I will look into adding
struct pages for dcssblk memory later, to make it work again with
this change, but for now I do not know of anyone needing this in the
upstream kernel.

https://www.spinics.net/lists/linux-xfs/msg14628.html
---

>> +void generic_dax_pagefree(struct page *page, void *data)
>> +{
>> +     wake_up_var(&page->_refcount);
>> +}
>> +EXPORT_SYMBOL_GPL(generic_dax_pagefree);
>
> Why is this here and exported instead of static in drivers/nvdimm/pmem.c?

I was thinking it did not belong to the pmem driver, but you're right
unless / until we grow another fsdax capable driver this detail can
stay internal to the pmem driver.

  reply	other threads:[~2018-05-18 16:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 20:06 Dan Williams
2018-05-18  9:00 ` Jan Kara
2018-05-18  9:46 ` Christoph Hellwig
2018-05-18 16:00   ` Dan Williams [this message]
2018-05-21  9:04     ` Jan Kara
2018-05-22  6:28       ` Christoph Hellwig
2018-05-23 18:50         ` Gerald Schaefer
2018-05-29 20:26           ` Dan Williams
2018-06-01 15:01             ` Gerald Schaefer
2018-06-02  0:03               ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPcyv4iO1yss0sfBzHVDy3qja_wc+JT2Zi1zwtApDckTeuG2wQ@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=hch@lst.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jack@suse.cz \
    --cc=jglisse@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=lkp@intel.com \
    --cc=mhocko@suse.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=thomas@m3y3r.de \
    --subject='Re: [PATCH v10] mm: introduce MEMORY_DEVICE_FS_DAX and CONFIG_DEV_PAGEMAP_OPS' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).