| To: | NeilBrown <neilb@xxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 16/19] VFS: use GFP_NOFS rather than GFP_KERNEL in __d_alloc. |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Wed, 16 Apr 2014 16:25:20 +1000 |
| Cc: | linux-mm@xxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20140416040337.10604.61837.stgit@xxxxxxxxxxxxxx> |
| References: | <20140416033623.10604.69237.stgit@xxxxxxxxxxxxxx> <20140416040337.10604.61837.stgit@xxxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Wed, Apr 16, 2014 at 02:03:37PM +1000, NeilBrown wrote: > __d_alloc can be called with i_mutex held, so it is safer to > use GFP_NOFS. > > lockdep reports this can deadlock when loop-back NFS is in use, > as nfsd may be required to write out for reclaim, and nfsd certainly > takes i_mutex. But not the same i_mutex as is currently held. To me, this seems like a false positive? If you are holding the i_mutex on an inode, then you have a reference to the inode and hence memory reclaim won't ever take the i_mutex on that inode. FWIW, this sort of false positive was a long stabding problem for XFS - we managed to get rid of most of the false positives like this by ensuring that only the ilock is taken within memory reclaim and memory reclaim can't be entered while we hold the ilock. You can't do that with the i_mutex, though.... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx |
| Previous by Date: | Re: [PATCH 13/19] MM: set PF_FSTRANS while allocating per-cpu memory to avoid deadlock., NeilBrown |
|---|---|
| Next by Date: | Re: [PATCH 09/19] XFS: ensure xfs_file_*_read cannot deadlock in memory allocation., NeilBrown |
| Previous by Thread: | [PATCH 16/19] VFS: use GFP_NOFS rather than GFP_KERNEL in __d_alloc., NeilBrown |
| Next by Thread: | Re: [PATCH 16/19] VFS: use GFP_NOFS rather than GFP_KERNEL in __d_alloc., NeilBrown |
| Indexes: | [Date] [Thread] [Top] [All Lists] |