Re: [PATCH v2 0/2] Revert locking changes in DAX for v4.3

From: Ross Zwisler
Date: Sun Oct 04 2015 - 01:25:19 EST


On Fri, Oct 02, 2015 at 06:01:32PM -0600, Ross Zwisler wrote:
> This series reverts some recent changes to the locking scheme in DAX introduced
> by these two commits:
>
> commit 843172978bb9 ("dax: fix race between simultaneous faults")
> commit 46c043ede471 ("mm: take i_mmap_lock in unmap_mapping_range() for DAX")
>
> Changes from v1:
> - Squashed patches 1 and 2 from the first series into a single patch to avoid
> adding another spot in the git history where we could end up referencing an
> uninitialized pointer.
>
> Ross Zwisler (2):
> Revert "mm: take i_mmap_lock in unmap_mapping_range() for DAX"
> Revert "dax: fix race between simultaneous faults"
>
> fs/dax.c | 83 +++++++++++++++++++++++++------------------------------------
> mm/memory.c | 2 ++
> 2 files changed, 36 insertions(+), 49 deletions(-)
>
> --
> 2.1.0

*sigh* - even after these reverts we can deadlock on in the DAX PMD code with
its original locking scheme. I can hit them 100% of the time with either
generic/074 or generic/198 using either XFS or ext4. I'll debug exactly
what's going on on Monday.

The quick and easy workaround for this is to do a "return VM_FAULT_FALLBACK;"
at the beginning of __dax_pmd_fault() to just turn off PMD faults while we
rework the locking for v4.4. This saves us reverting and re-adding all the
PMD code, and will let us ship v4.3 without known deadlocks.

Other better ideas?

- Ross
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/