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


Groups > linux.kernel > #1244940

Re: [PATCH 2/2] ext2: Add locking for DAX faults

From Ross Zwisler <ross.zwisler@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] ext2: Add locking for DAX faults
Date 2015-10-12 19:30 +0200
Message-ID <qiP57-5HG-1@gated-at.bofh.it> (permalink)
References <qhO1r-6GT-13@gated-at.bofh.it> <qhO1s-6GT-19@gated-at.bofh.it> <qiy4h-6cW-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Oct 12, 2015 at 10:14:43AM +1100, Dave Chinner wrote:
> [Nit: please send all patches of the series to the same list of
> recipients. Otherwise people with list based filters end up with the
> series spread across different mailboxes and people not subscribed
> to all lists don't get the full series and so are lacking in context
> for proper review. ]

Okay, will do.

> On Fri, Oct 09, 2015 at 04:02:08PM -0600, Ross Zwisler wrote:
<>
> > +/*
> > + * The lock ordering for ext2 DAX fault paths is:
> > + *
> > + * mmap_sem (MM)
> > + *   ext2_inode_info->dax_sem
> > + *     sb_start_pagefault (vfs, freeze - taken in DAX)
> > + *       address_space->i_mmap_rwsem or page_lock (mutually exclusive in DAX)
> > + *         ext2_inode_info->truncate_mutex
> 
> This is a different lock order to XFS - it puts the i_mmaplock
> inside sb_start_pagefault(), not outside it. This ordering means the
> timestamp updates during the page fault are also under
> ext2_inode_info->dax_sem...

Yep - I was trying not not open code dax_fault() yet again, but it looks like
both XFS and ext4 both open-code dax_fault() and call __dax_fault() directly.

I assume that when we get an analogous lock to i_mmaplock in the ext4 fault
path we'll end up with the same locking order that is found in XFS.

I'll do the same for v2 of this patch and I'll kill the then-unused
dax_fault().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH 0/2] Add updated DAX locking to ext2 Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-10 00:10 +0200
  [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-10 00:10 +0200
    Re: [PATCH 2/2] ext2: Add locking for DAX faults Dan Williams <dan.j.williams@intel.com> - 2015-10-10 00:20 +0200
      Re: [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-10 00:40 +0200
    Re: [PATCH 2/2] ext2: Add locking for DAX faults Dave Chinner <david@fromorbit.com> - 2015-10-12 01:20 +0200
      Re: [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-12 19:30 +0200
        Re: [PATCH 2/2] ext2: Add locking for DAX faults Dave Chinner <david@fromorbit.com> - 2015-10-13 01:10 +0200
      Re: [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-12 23:50 +0200
        Re: [PATCH 2/2] ext2: Add locking for DAX faults Dave Chinner <david@fromorbit.com> - 2015-10-13 01:30 +0200
          Re: [PATCH 2/2] ext2: Add locking for DAX faults Eric Curtin <ericcurtin17@gmail.com> - 2015-10-13 01:40 +0200
            Re: [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-14 00:20 +0200
          Re: [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-13 17:10 +0200
        Re: [PATCH 2/2] ext2: Add locking for DAX faults Jan Kara <jack@suse.cz> - 2015-10-13 10:10 +0200
          Re: [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-13 19:40 +0200
            Re: [PATCH 2/2] ext2: Add locking for DAX faults Jan Kara <jack@suse.cz> - 2015-10-13 19:50 +0200

csiph-web