All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Jan Kara <jack@suse.cz>,
	linux-nvdimm@lists.01.org, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [RFC v3] [PATCH 0/18] DAX page fault locking
Date: Mon, 9 May 2016 11:38:28 +0200	[thread overview]
Message-ID: <20160509093828.GF11897@quack2.suse.cz> (raw)
In-Reply-To: <20160506203308.GA12506@linux.intel.com>

On Fri 06-05-16 14:33:08, Ross Zwisler wrote:
> On Mon, Apr 18, 2016 at 11:35:23PM +0200, Jan Kara wrote:
> > Hello,
> > 
> > this is my third attempt at DAX page fault locking rewrite. The patch set has
> > passed xfstests both with and without DAX mount option on ext4 and xfs for
> > me and also additional page fault beating using the new page fault stress
> > tests I have added to xfstests. So I'd be grateful if you guys could have a
> > closer look at the patches so that they can be merged. Thanks.
> > 
> > Changes since v2:
> > - lot of additional ext4 fixes and cleanups
> > - make PMD page faults depend on CONFIG_BROKEN instead of #if 0
> > - fixed page reference leak when replacing hole page with a pfn
> > - added some reviewed-by tags
> > - rebased on top of current Linus' tree
> > 
> > Changes since v1:
> > - handle wakeups of exclusive waiters properly
> > - fix cow fault races
> > - other minor stuff
> > 
> > General description
> > 
> > The basic idea is that we use a bit in an exceptional radix tree entry as
> > a lock bit and use it similarly to how page lock is used for normal faults.
> > That way we fix races between hole instantiation and read faults of the
> > same index. For now I have disabled PMD faults since there the issues with
> > page fault locking are even worse. Now that Matthew's multi-order radix tree
> > has landed, I can have a look into using that for proper locking of PMD faults
> > but first I want normal pages sorted out.
> > 
> > In the end I have decided to implement the bit locking directly in the DAX
> > code. Originally I was thinking we could provide something generic directly
> > in the radix tree code but the functions DAX needs are rather specific.
> > Maybe someone else will have a good idea how to distill some generally useful
> > functions out of what I've implemented for DAX but for now I didn't bother
> > with that.
> > 
> > 								Honza
> 
> Hey Jan,
> 
> Another hit in testing, which may or may not be related to the last one.  The
> BUG is a few lines off from the previous report:
> 	kernel BUG at mm/workingset.c:423!
> vs
> 	kernel BUG at mm/workingset.c:435!
> 
> I've been able to consistently hit this one using DAX + ext4 with generic/086.
> For some reason generic/086 always passes when run by itself, but fails
> consistently if you run it after a set of other tests.  Here is a relatively
> fast set that reproduces it:

Thanks for reports! It is strange that I didn't see this happening but I've
been testing against somewhat older base so maybe something has changed.
Anyway the culprit seems to be that workingset tracking code messes with
radix tree which is managed by DAX and these two were never meant to
coexist so assertions naturally trip. In particular we should not add radix
tree node to working-set list of nodes for eviction in
page_cache_tree_delete() for DAX inodes. However that seems to happen in
your case and so far I don't quite understand why...

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: Jan Kara <jack@suse.cz>
To: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	linux-mm@kvack.org, Dan Williams <dan.j.williams@intel.com>,
	linux-nvdimm@lists.01.org, Matthew Wilcox <willy@linux.intel.com>
Subject: Re: [RFC v3] [PATCH 0/18] DAX page fault locking
Date: Mon, 9 May 2016 11:38:28 +0200	[thread overview]
Message-ID: <20160509093828.GF11897@quack2.suse.cz> (raw)
In-Reply-To: <20160506203308.GA12506@linux.intel.com>

On Fri 06-05-16 14:33:08, Ross Zwisler wrote:
> On Mon, Apr 18, 2016 at 11:35:23PM +0200, Jan Kara wrote:
> > Hello,
> > 
> > this is my third attempt at DAX page fault locking rewrite. The patch set has
> > passed xfstests both with and without DAX mount option on ext4 and xfs for
> > me and also additional page fault beating using the new page fault stress
> > tests I have added to xfstests. So I'd be grateful if you guys could have a
> > closer look at the patches so that they can be merged. Thanks.
> > 
> > Changes since v2:
> > - lot of additional ext4 fixes and cleanups
> > - make PMD page faults depend on CONFIG_BROKEN instead of #if 0
> > - fixed page reference leak when replacing hole page with a pfn
> > - added some reviewed-by tags
> > - rebased on top of current Linus' tree
> > 
> > Changes since v1:
> > - handle wakeups of exclusive waiters properly
> > - fix cow fault races
> > - other minor stuff
> > 
> > General description
> > 
> > The basic idea is that we use a bit in an exceptional radix tree entry as
> > a lock bit and use it similarly to how page lock is used for normal faults.
> > That way we fix races between hole instantiation and read faults of the
> > same index. For now I have disabled PMD faults since there the issues with
> > page fault locking are even worse. Now that Matthew's multi-order radix tree
> > has landed, I can have a look into using that for proper locking of PMD faults
> > but first I want normal pages sorted out.
> > 
> > In the end I have decided to implement the bit locking directly in the DAX
> > code. Originally I was thinking we could provide something generic directly
> > in the radix tree code but the functions DAX needs are rather specific.
> > Maybe someone else will have a good idea how to distill some generally useful
> > functions out of what I've implemented for DAX but for now I didn't bother
> > with that.
> > 
> > 								Honza
> 
> Hey Jan,
> 
> Another hit in testing, which may or may not be related to the last one.  The
> BUG is a few lines off from the previous report:
> 	kernel BUG at mm/workingset.c:423!
> vs
> 	kernel BUG at mm/workingset.c:435!
> 
> I've been able to consistently hit this one using DAX + ext4 with generic/086.
> For some reason generic/086 always passes when run by itself, but fails
> consistently if you run it after a set of other tests.  Here is a relatively
> fast set that reproduces it:

Thanks for reports! It is strange that I didn't see this happening but I've
been testing against somewhat older base so maybe something has changed.
Anyway the culprit seems to be that workingset tracking code messes with
radix tree which is managed by DAX and these two were never meant to
coexist so assertions naturally trip. In particular we should not add radix
tree node to working-set list of nodes for eviction in
page_cache_tree_delete() for DAX inodes. However that seems to happen in
your case and so far I don't quite understand why...

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Jan Kara <jack@suse.cz>
To: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	linux-mm@kvack.org, Dan Williams <dan.j.williams@intel.com>,
	linux-nvdimm@lists.01.org, Matthew Wilcox <willy@linux.intel.com>
Subject: Re: [RFC v3] [PATCH 0/18] DAX page fault locking
Date: Mon, 9 May 2016 11:38:28 +0200	[thread overview]
Message-ID: <20160509093828.GF11897@quack2.suse.cz> (raw)
In-Reply-To: <20160506203308.GA12506@linux.intel.com>

On Fri 06-05-16 14:33:08, Ross Zwisler wrote:
> On Mon, Apr 18, 2016 at 11:35:23PM +0200, Jan Kara wrote:
> > Hello,
> > 
> > this is my third attempt at DAX page fault locking rewrite. The patch set has
> > passed xfstests both with and without DAX mount option on ext4 and xfs for
> > me and also additional page fault beating using the new page fault stress
> > tests I have added to xfstests. So I'd be grateful if you guys could have a
> > closer look at the patches so that they can be merged. Thanks.
> > 
> > Changes since v2:
> > - lot of additional ext4 fixes and cleanups
> > - make PMD page faults depend on CONFIG_BROKEN instead of #if 0
> > - fixed page reference leak when replacing hole page with a pfn
> > - added some reviewed-by tags
> > - rebased on top of current Linus' tree
> > 
> > Changes since v1:
> > - handle wakeups of exclusive waiters properly
> > - fix cow fault races
> > - other minor stuff
> > 
> > General description
> > 
> > The basic idea is that we use a bit in an exceptional radix tree entry as
> > a lock bit and use it similarly to how page lock is used for normal faults.
> > That way we fix races between hole instantiation and read faults of the
> > same index. For now I have disabled PMD faults since there the issues with
> > page fault locking are even worse. Now that Matthew's multi-order radix tree
> > has landed, I can have a look into using that for proper locking of PMD faults
> > but first I want normal pages sorted out.
> > 
> > In the end I have decided to implement the bit locking directly in the DAX
> > code. Originally I was thinking we could provide something generic directly
> > in the radix tree code but the functions DAX needs are rather specific.
> > Maybe someone else will have a good idea how to distill some generally useful
> > functions out of what I've implemented for DAX but for now I didn't bother
> > with that.
> > 
> > 								Honza
> 
> Hey Jan,
> 
> Another hit in testing, which may or may not be related to the last one.  The
> BUG is a few lines off from the previous report:
> 	kernel BUG at mm/workingset.c:423!
> vs
> 	kernel BUG at mm/workingset.c:435!
> 
> I've been able to consistently hit this one using DAX + ext4 with generic/086.
> For some reason generic/086 always passes when run by itself, but fails
> consistently if you run it after a set of other tests.  Here is a relatively
> fast set that reproduces it:

Thanks for reports! It is strange that I didn't see this happening but I've
been testing against somewhat older base so maybe something has changed.
Anyway the culprit seems to be that workingset tracking code messes with
radix tree which is managed by DAX and these two were never meant to
coexist so assertions naturally trip. In particular we should not add radix
tree node to working-set list of nodes for eviction in
page_cache_tree_delete() for DAX inodes. However that seems to happen in
your case and so far I don't quite understand why...

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2016-05-09  9:38 UTC|newest]

Thread overview: 122+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18 21:35 [RFC v3] [PATCH 0/18] DAX page fault locking Jan Kara
2016-04-18 21:35 ` Jan Kara
2016-04-18 21:35 ` [PATCH 01/18] ext4: Handle transient ENOSPC properly for DAX Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35 ` [PATCH 02/18] ext4: Fix race in transient ENOSPC detection Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35 ` [PATCH 03/18] DAX: move RADIX_DAX_ definitions to dax.c Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35 ` [PATCH 04/18] dax: Remove complete_unwritten argument Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35 ` [PATCH 05/18] ext2: Avoid DAX zeroing to corrupt data Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-29 16:30   ` Ross Zwisler
2016-04-29 16:30     ` Ross Zwisler
2016-04-29 16:30     ` Ross Zwisler
2016-04-18 21:35 ` [PATCH 06/18] dax: Remove dead zeroing code from fault handlers Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-29 16:48   ` Ross Zwisler
2016-04-18 21:35 ` [PATCH 07/18] ext4: Refactor direct IO code Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35 ` [PATCH 08/18] ext4: Pre-zero allocated blocks for DAX IO Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-29 18:01   ` Ross Zwisler
2016-04-29 18:01     ` Ross Zwisler
2016-04-29 18:01     ` Ross Zwisler
2016-05-02 13:09     ` Jan Kara
2016-05-02 13:09       ` Jan Kara
2016-04-18 21:35 ` [PATCH 09/18] dax: Remove zeroing from dax_io() Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-29 18:56   ` Ross Zwisler
2016-04-29 18:56     ` Ross Zwisler
2016-04-18 21:35 ` [PATCH 10/18] dax: Remove pointless writeback from dax_do_io() Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-29 19:00   ` Ross Zwisler
2016-04-29 19:00     ` Ross Zwisler
2016-04-29 19:00     ` Ross Zwisler
2016-04-18 21:35 ` [PATCH 11/18] dax: Fix condition for filling of PMD holes Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-29 19:08   ` Ross Zwisler
2016-04-29 19:08     ` Ross Zwisler
2016-04-29 19:08     ` Ross Zwisler
2016-05-02 13:16     ` Jan Kara
2016-05-02 13:16       ` Jan Kara
2016-04-18 21:35 ` [PATCH 12/18] dax: Remove redundant inode size checks Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35 ` [PATCH 13/18] dax: Make huge page handling depend of CONFIG_BROKEN Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-29 19:53   ` Ross Zwisler
2016-04-29 19:53     ` Ross Zwisler
2016-05-02 13:19     ` Jan Kara
2016-05-02 13:19       ` Jan Kara
2016-05-02 13:19       ` Jan Kara
2016-04-18 21:35 ` [PATCH 14/18] dax: Define DAX lock bit for radix tree exceptional entry Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-29 20:03   ` Ross Zwisler
2016-04-29 20:03     ` Ross Zwisler
2016-04-29 20:03     ` Ross Zwisler
2016-04-18 21:35 ` [PATCH 15/18] dax: Allow DAX code to replace exceptional entries Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-29 20:29   ` Ross Zwisler
2016-04-29 20:29     ` Ross Zwisler
2016-04-18 21:35 ` [PATCH 16/18] dax: New fault locking Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-27  4:27   ` NeilBrown
2016-04-27  4:27     ` NeilBrown
2016-05-06  4:13   ` Ross Zwisler
2016-05-06  4:13     ` Ross Zwisler
2016-05-06  4:13     ` Ross Zwisler
2016-05-10 12:27     ` Jan Kara
2016-05-10 12:27       ` Jan Kara
2016-05-11 19:26       ` Ross Zwisler
2016-05-11 19:26         ` Ross Zwisler
2016-05-12  7:58         ` Jan Kara
2016-05-12  7:58           ` Jan Kara
2016-04-18 21:35 ` [PATCH 17/18] dax: Use radix tree entry lock to protect cow faults Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-19 11:46   ` Jerome Glisse
2016-04-19 11:46     ` Jerome Glisse
2016-04-19 11:46     ` Jerome Glisse
2016-04-19 14:33     ` Jan Kara
2016-04-19 14:33       ` Jan Kara
2016-04-19 14:33       ` Jan Kara
2016-04-19 15:19       ` Jerome Glisse
2016-04-19 15:19         ` Jerome Glisse
2016-04-19 15:19         ` Jerome Glisse
2016-04-19 15:19         ` Jerome Glisse
2016-04-18 21:35 ` [PATCH 18/18] dax: Remove i_mmap_lock protection Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-04-18 21:35   ` Jan Kara
2016-05-06  3:35 ` [RFC v3] [PATCH 0/18] DAX page fault locking Ross Zwisler
2016-05-06  3:35   ` Ross Zwisler
2016-05-06 20:33 ` Ross Zwisler
2016-05-06 20:33   ` Ross Zwisler
2016-05-09  9:38   ` Jan Kara [this message]
2016-05-09  9:38     ` Jan Kara
2016-05-09  9:38     ` Jan Kara
2016-05-10 15:28     ` Jan Kara
2016-05-10 15:28       ` Jan Kara
2016-05-10 15:28       ` Jan Kara
2016-05-10 20:30       ` Ross Zwisler
2016-05-10 20:30         ` Ross Zwisler
2016-05-10 20:30         ` Ross Zwisler
2016-05-10 22:39         ` Ross Zwisler
2016-05-10 22:39           ` Ross Zwisler
2016-05-11  9:19           ` Jan Kara
2016-05-11  9:19             ` Jan Kara
2016-05-11  9:19             ` Jan Kara
2016-05-11 15:52             ` Ross Zwisler
2016-05-11 15:52               ` Ross Zwisler
2016-05-11 15:52               ` Ross Zwisler
2016-05-09 21:28 ` Verma, Vishal L
2016-05-10 11:52   ` Jan Kara
2016-05-10 11:52     ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160509093828.GF11897@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=ross.zwisler@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.