1. 22 11月, 2016 1 次提交
  2. 21 11月, 2016 10 次提交
  3. 19 11月, 2016 4 次提交
  4. 15 11月, 2016 5 次提交
  5. 14 11月, 2016 12 次提交
  6. 10 11月, 2016 1 次提交
  7. 08 11月, 2016 7 次提交
    • R
      dax: remove "depends on BROKEN" from FS_DAX_PMD · 190b5caa
      Ross Zwisler 提交于
      Now that DAX PMD faults are once again working and are now participating in
      DAX's radix tree locking scheme, allow their config option to be enabled.
      Signed-off-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      190b5caa
    • R
      xfs: use struct iomap based DAX PMD fault path · 862f1b9d
      Ross Zwisler 提交于
      Switch xfs_filemap_pmd_fault() from using dax_pmd_fault() to the new and
      improved dax_iomap_pmd_fault().  Also, now that it has no more users,
      remove xfs_get_blocks_dax_fault().
      Signed-off-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      862f1b9d
    • R
      dax: add struct iomap based DAX PMD support · 642261ac
      Ross Zwisler 提交于
      DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based
      locking.  This patch allows DAX PMDs to participate in the DAX radix tree
      based locking scheme so that they can be re-enabled using the new struct
      iomap based fault handlers.
      
      There are currently three types of DAX 4k entries: 4k zero pages, 4k DAX
      mappings that have an associated block allocation, and 4k DAX empty
      entries.  The empty entries exist to provide locking for the duration of a
      given page fault.
      
      This patch adds three equivalent 2MiB DAX entries: Huge Zero Page (HZP)
      entries, PMD DAX entries that have associated block allocations, and 2 MiB
      DAX empty entries.
      
      Unlike the 4k case where we insert a struct page* into the radix tree for
      4k zero pages, for HZP we insert a DAX exceptional entry with the new
      RADIX_DAX_HZP flag set.  This is because we use a single 2 MiB zero page in
      every 2MiB hole mapping, and it doesn't make sense to have that same struct
      page* with multiple entries in multiple trees.  This would cause contention
      on the single page lock for the one Huge Zero Page, and it would break the
      page->index and page->mapping associations that are assumed to be valid in
      many other places in the kernel.
      
      One difficult use case is when one thread is trying to use 4k entries in
      radix tree for a given offset, and another thread is using 2 MiB entries
      for that same offset.  The current code handles this by making the 2 MiB
      user fall back to 4k entries for most cases.  This was done because it is
      the simplest solution, and because the use of 2MiB pages is already
      opportunistic.
      
      If we were to try to upgrade from 4k pages to 2MiB pages for a given range,
      we run into the problem of how we lock out 4k page faults for the entire
      2MiB range while we clean out the radix tree so we can insert the 2MiB
      entry.  We can solve this problem if we need to, but I think that the cases
      where both 2MiB entries and 4K entries are being used for the same range
      will be rare enough and the gain small enough that it probably won't be
      worth the complexity.
      Signed-off-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      642261ac
    • R
      dax: move put_(un)locked_mapping_entry() in dax.c · 422476c4
      Ross Zwisler 提交于
      No functional change.
      
      The static functions put_locked_mapping_entry() and
      put_unlocked_mapping_entry() will soon be used in error cases in
      grab_mapping_entry(), so move their definitions above this function.
      Signed-off-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      422476c4
    • R
      dax: move RADIX_DAX_* defines to dax.h · fa28f729
      Ross Zwisler 提交于
      The RADIX_DAX_* defines currently mostly live in fs/dax.c, with just
      RADIX_DAX_ENTRY_LOCK being in include/linux/dax.h so it can be used in
      mm/filemap.c.  When we add PMD support, though, mm/filemap.c will also need
      access to the RADIX_DAX_PTE type so it can properly construct a 4k sized
      empty entry.
      
      Instead of shifting the defines between dax.c and dax.h as they are
      individually used in other code, just move them wholesale to dax.h so
      they'll be available when we need them.
      Signed-off-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      fa28f729
    • R
      dax: dax_iomap_fault() needs to call iomap_end() · 1550290b
      Ross Zwisler 提交于
      Currently iomap_end() doesn't do anything for DAX page faults for both ext2
      and XFS.  ext2_iomap_end() just checks for a write underrun, and
      xfs_file_iomap_end() checks to see if it needs to finish a delayed
      allocation.  However, in the future iomap_end() calls might be needed to
      make sure we have balanced allocations, locks, etc.  So, add calls to
      iomap_end() with appropriate error handling to dax_iomap_fault().
      Signed-off-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
      Suggested-by: NJan Kara <jack@suse.cz>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      1550290b
    • R
      dax: add dax_iomap_sector() helper function · 333ccc97
      Ross Zwisler 提交于
      To be able to correctly calculate the sector from a file position and a
      struct iomap there is a complex little bit of logic that currently happens
      in both dax_iomap_actor() and dax_iomap_fault().  This will need to be
      repeated yet again in the DAX PMD fault handler when it is added, so break
      it out into a helper function.
      Signed-off-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      333ccc97