1. 21 May, 2016 7 commits
    • Dan Williams's avatar
      libnvdimm, dax: fix deletion · 03dca343
      Dan Williams authored
      The ndctl unit tests discovered that the dax enabling omitted updates to
      nd_detach_and_reset().  This routine clears device the configuration
      when the namespace is detached.  Without this clearing userspace may
      assume that the device is in the process of being configured by another
      agent in the system.
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      03dca343
    • Dan Williams's avatar
      libnvdimm, dax: fix alignment validation · 5e24c9fd
      Dan Williams authored
      Testing the dax-device autodetect support revealed a probe failure with
      the following result:
      
          dax0.1: bad offset: 0x8200000 dax disabled
      
      The original pfn-device implementation inferred the alignment from
      ilog2(offset), now that the alignment is explicit the is_power_of_2()
      needs replacing with a real sanity check against the recorded alignment.
      Otherwise the alignment check is useless in the implicit case and only
      the minimum size of the offset matters.
      
      This self-consistency check is further validated by the probe path that
      will re-check that the offset is large enough to contain all the
      metadata required to enable the device.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      5e24c9fd
    • Dan Williams's avatar
      libnvdimm, dax: autodetect support · c5ed9268
      Dan Williams authored
      For autodetecting a previously established dax configuration we need the
      info block to indicate block-device vs device-dax mode, and we need to
      have the default namespace probe hand-off the configuration to the
      dax_pmem driver.
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      c5ed9268
    • Dan Williams's avatar
      libnvdimm: release ida resources · b354aba0
      Dan Williams authored
      ida instances allocate some internal memory for ->free_bitmap in
      addition to the base 'struct ida'.  Use ida_destroy() to release that
      memory at module_exit().
      Reported-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
      Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      b354aba0
    • Dan Williams's avatar
      Revert "block: enable dax for raw block devices" · acc93d30
      Dan Williams authored
      This reverts commit 5a023cdb.
      
      The functionality is superseded by the new "Device DAX" facility.
      
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Jan Kara <jack@suse.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      acc93d30
    • Dan Williams's avatar
      /dev/dax, core: file operations and dax-mmap · dee41079
      Dan Williams authored
      The "Device DAX" core enables dax mappings of performance / feature
      differentiated memory.  An open mapping or file handle keeps the backing
      struct device live, but new mappings are only possible while the device
      is enabled.   Faults are handled under rcu_read_lock to synchronize
      with the enabled state of the device.
      
      Similar to the filesystem-dax case the backing memory may optionally
      have struct page entries.  However, unlike fs-dax there is no support
      for private mappings, or mappings that are not backed by media (see
      use of zero-page in fs-dax).
      
      Mappings are always guaranteed to match the alignment of the dax_region.
      If the dax_region is configured to have a 2MB alignment, all mappings
      are guaranteed to be backed by a pmd entry.  Contrast this determinism
      with the fs-dax case where pmd mappings are opportunistic.  If userspace
      attempts to force a misaligned mapping, the driver will fail the mmap
      attempt.  See dax_dev_check_vma() for other scenarios that are rejected,
      like MAP_PRIVATE mappings.
      
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Acked-by: default avatar"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      dee41079
    • Dan Williams's avatar
      /dev/dax, pmem: direct access to persistent memory · ab68f262
      Dan Williams authored
      Device DAX is the device-centric analogue of Filesystem DAX
      (CONFIG_FS_DAX).  It allows memory ranges to be allocated and mapped
      without need of an intervening file system.  Device DAX is strict,
      precise and predictable.  Specifically this interface:
      
      1/ Guarantees fault granularity with respect to a given page size (pte,
      pmd, or pud) set at configuration time.
      
      2/ Enforces deterministic behavior by being strict about what fault
      scenarios are supported.
      
      For example, by forcing MADV_DONTFORK semantics and omitting MAP_PRIVATE
      support device-dax guarantees that a mapping always behaves/performs the
      same once established.  It is the "what you see is what you get" access
      mechanism to differentiated memory vs filesystem DAX which has
      filesystem specific implementation semantics.
      
      Persistent memory is the first target, but the mechanism is also
      targeted for exclusive allocations of performance differentiated memory
      ranges.
      
      This commit is limited to the base device driver infrastructure to
      associate a dax device with pmem range.
      
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      ab68f262
  2. 18 May, 2016 1 commit
  3. 09 May, 2016 3 commits
  4. 22 Apr, 2016 14 commits
  5. 18 Apr, 2016 1 commit
  6. 17 Apr, 2016 5 commits
  7. 16 Apr, 2016 7 commits
  8. 15 Apr, 2016 2 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 2e572599
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A few fixes for the current series. This contains:
      
         - Two fixes for NVMe:
      
           One fixes a reset race that can be triggered by repeated
           insert/removal of the module.
      
           The other fixes an issue on some platforms, where we get probe
           timeouts since legacy interrupts isn't working.  This used not to
           be a problem since we had the worker thread poll for completions,
           but since that was killed off, it means those poor souls can't
           successfully probe their NVMe device.  Use a proper IRQ check and
           probe (msi-x -> msi ->legacy), like most other drivers to work
           around this.  Both from Keith.
      
         - A loop corruption issue with offset in iters, from Ming Lei.
      
         - A fix for not having the partition stat per cpu ref count
           initialized before sending out the KOBJ_ADD, which could cause user
           space to access the counter prior to initialization.  Also from
           Ming Lei.
      
         - A fix for using the wrong congestion state, from Kaixu Xia"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        block: loop: fix filesystem corruption in case of aio/dio
        NVMe: Always use MSI/MSI-x interrupts
        NVMe: Fix reset/remove race
        writeback: fix the wrong congested state variable definition
        block: partition: initialize percpuref before sending out KOBJ_ADD
      2e572599
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · f3c9a1ab
      Linus Torvalds authored
      Pull libnvdimm fixes from Ross Zwisler:
       "Two fixes:
      
         - Fix memcpy_from_pmem() to fallback to memcpy() for architectures
           where CONFIG_ARCH_HAS_PMEM_API=n.
      
         - Add a comment explaining why we write data twice when clearing
           poison in pmem_do_bvec().
      
        This has passed a boot test on an X86_32 config, which was the
        architecture where issue #1 above was first noticed"
      
      Dan Williams adds:
       "We're giving this multi-maintainer setup a shot, so expect libnvdimm
        pull requests from either Ross or I going forward"
      
      * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        libnvdimm, pmem: clarify the write+clear_poison+write flow
        pmem: fix BUG() error in pmem.h:48 on X86_32
      f3c9a1ab