Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1189956
| From | Jerome Marchand <jmarchan@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH] nfs: avoid swap-over-NFS deadlock |
| Date | 2015-07-22 15:50 +0200 |
| Message-ID | <pP2zg-8rx-15@gated-at.bofh.it> (permalink) |
| References | <pOXpT-1bI-11@gated-at.bofh.it> <pP1jR-6Jj-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On 07/22/2015 02:23 PM, Trond Myklebust wrote:
> On Wed, Jul 22, 2015 at 4:10 AM, Jerome Marchand <jmarchan@redhat.com> wrote:
>>
>> Lockdep warns about a inconsistent {RECLAIM_FS-ON-W} ->
>> {IN-RECLAIM_FS-W} usage. The culpritt is the inode->i_mutex taken in
>> nfs_file_direct_write(). This code was introduced by commit a9ab5e840669
>> ("nfs: page cache invalidation for dio").
>> This naive test patch avoid to take the mutex on a swapfile and makes
>> lockdep happy again. However I don't know much about NFS code and I
>> assume it's probably not the proper solution. Any thought?
>>
>> Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
>
> NFS is not the only O_DIRECT implementation to set the inode->i_mutex.
> Why can't this be fixed in the generic swap code instead of adding
> yet-another-exception-for-IS_SWAPFILE?
I meant to cc Mel. Just added him.
AFAIK NFS is the only filesystem that uses swap_activate. Other
swapfiles are handled more or less like block device (divided in a set
of contiguous ranges of disk block called swap extents), so there are
not affected by this possible deadlock.
Also nfs_direct_IO() is special in that it is called only from swap,
nfs_file_direct_write() however has other users.
Jerome
>
> Cheers
> Trond
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH] nfs: avoid swap-over-NFS deadlock "Jerome Marchand" <jmarchan@redhat.com> - 2015-07-22 10:20 +0200
Re: [RFC PATCH] nfs: avoid swap-over-NFS deadlock Trond Myklebust <trond.myklebust@primarydata.com> - 2015-07-22 14:30 +0200
Re: [RFC PATCH] nfs: avoid swap-over-NFS deadlock Jerome Marchand <jmarchan@redhat.com> - 2015-07-22 15:50 +0200
Re: [RFC PATCH] nfs: avoid swap-over-NFS deadlock Mel Gorman <mgorman@techsingularity.net> - 2015-07-27 13:00 +0200
csiph-web