Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1496973

Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support

From Ross Zwisler <ross.zwisler@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support
Date 2016-10-07 05:00 +0200
Message-ID <sptya-1OK-3@gated-at.bofh.it> (permalink)
References <smSjo-1SH-1@gated-at.bofh.it> <smSt4-1Wd-23@gated-at.bofh.it> <so9ia-48W-15@gated-at.bofh.it> <soiEO-1DF-17@gated-at.bofh.it> <spoyt-6y4-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Oct 06, 2016 at 03:34:24PM -0600, Ross Zwisler wrote:
> Interesting - adding iomap_end() calls to the DAX PTE fault handler causes an
> AA deadlock because we try and retake ei->dax_sem.  We take dax_sem in
> ext2_dax_fault() before calling into the DAX code, then if we end up going
> through the error path in ext2_iomap_end(), we call 
>   ext2_write_failed()
>     ext2_truncate_blocks()
>       dax_sem_down_write()
> 
> Where we try and take dax_sem again.  This error path is really only valid for
> I/O operations, but we happen to call it for page faults because 'written' in
> ext2_iomap_end() is just 0.
> 
> So...how should we handle this?  A few ideas:
> 
> 1) Just continue to omit the calls to iomap_end() in the DAX page fault
> handlers for now, and add them when there is useful work to be done in one of
> the filesystems.
> 
> 2) Add an IOMAP_FAULT flag to the flags passed into iomap_begin() and
> iomap_end() so make it explicit that we are calling as part of a fault handler
> and not an I/O operation, and use this to adjust the error handling in
> ext2_iomap_end().
> 
> 3) Just work around the existing error handling in ext2_iomap_end() by either
> unsetting IOMAP_WRITE or by setting 'written' to the size of the fault.
> 
> For #2 or #3, probably add a comment explaining the deadlock and why we need
> to never call ext2_write_failed() while handling a page fault.
> 
> Thoughts?

Never mind, #3 it is, I think it was just a plain bug to call iomap_end() with
'length' != 'written'.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 00/12] re-enable DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 00:50 +0200
  [PATCH v4 06/12] dax: consistent variable naming for DAX entries Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 06/12] dax: consistent variable naming for DAX entries Jan Kara <jack@suse.cz> - 2016-10-03 11:40 +0200
  [PATCH v4 02/12] ext4: tell DAX the size of allocation holes Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
  [PATCH v4 05/12] dax: make 'wait_table' global variable static Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 05/12] dax: make 'wait_table' global variable static Jan Kara <jack@suse.cz> - 2016-10-03 11:40 +0200
  [PATCH v4 12/12] dax: remove "depends on BROKEN" from FS_DAX_PMD Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
  [PATCH v4 09/12] dax: correct dax iomap code namespace Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 09/12] dax: correct dax iomap code namespace Christoph Hellwig <hch@lst.de> - 2016-09-30 11:00 +0200
    Re: [PATCH v4 09/12] dax: correct dax iomap code namespace Jan Kara <jack@suse.cz> - 2016-10-03 12:00 +0200
  [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range Christoph Hellwig <hch@infradead.org> - 2016-09-30 11:50 +0200
    Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range Jan Kara <jack@suse.cz> - 2016-10-03 12:00 +0200
      Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-03 20:50 +0200
  [PATCH v4 01/12] ext4: allow DAX writeback for hole punch Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
  [PATCH v4 04/12] ext2: remove support for DAX PMD faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 04/12] ext2: remove support for DAX PMD faults Jan Kara <jack@suse.cz> - 2016-10-03 11:40 +0200
  [PATCH v4 03/12] dax: remove buffer_size_valid() Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 03/12] dax: remove buffer_size_valid() Christoph Hellwig <hch@lst.de> - 2016-09-30 10:50 +0200
  [PATCH v4 11/12] xfs: use struct iomap based DAX PMD fault path Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
  [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Christoph Hellwig <hch@infradead.org> - 2016-09-30 12:00 +0200
      Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-03 23:20 +0200
    Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Jan Kara <jack@suse.cz> - 2016-10-03 13:10 +0200
      Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Christoph Hellwig <hch@lst.de> - 2016-10-03 18:40 +0200
      Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-03 23:10 +0200
        Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Jan Kara <jack@suse.cz> - 2016-10-04 08:00 +0200
          Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-04 17:40 +0200
            Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Jan Kara <jack@suse.cz> - 2016-10-05 08:00 +0200
        Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-06 23:40 +0200
          Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-07 05:00 +0200
            Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support Jan Kara <jack@suse.cz> - 2016-10-07 09:50 +0200
  [PATCH v4 08/12] dax: remove dax_pmd_fault() Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 01:00 +0200
    Re: [PATCH v4 08/12] dax: remove dax_pmd_fault() Jan Kara <jack@suse.cz> - 2016-10-03 12:00 +0200
  Re: [PATCH v4 00/12] re-enable DAX PMD support Dave Chinner <david@fromorbit.com> - 2016-09-30 01:50 +0200
    Re: [PATCH v4 00/12] re-enable DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-09-30 05:10 +0200
      Re: [PATCH v4 00/12] re-enable DAX PMD support "Darrick J. Wong" <darrick.wong@oracle.com> - 2016-09-30 06:10 +0200
        Re: [PATCH v4 00/12] re-enable DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-03 21:00 +0200
      Re: [PATCH v4 00/12] re-enable DAX PMD support Dave Chinner <david@fromorbit.com> - 2016-09-30 08:50 +0200
        Re: [PATCH v4 00/12] re-enable DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-03 23:20 +0200
    Re: [PATCH v4 00/12] re-enable DAX PMD support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-10-04 01:10 +0200
  Re: [PATCH v4 00/12] re-enable DAX PMD support Christoph Hellwig <hch@infradead.org> - 2016-09-30 13:50 +0200

csiph-web