From: Miklos Szeredi <miklos@szeredi.hu>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: dave@linux.vnet.ibm.com, miklos@szeredi.hu,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, shenlinf@cn.ibm.com,
volobuev@us.ibm.com, mel@linux.vnet.ibm.com, dingc@cn.ibm.com,
lnxninja@us.ibm.com
Subject: Re: Deadlocks with transparent huge pages and userspace fs daemons
Date: Thu, 04 Nov 2010 20:53:28 +0100 [thread overview]
Message-ID: <E1PE5sG-0005Em-Qb@pomaz-ex.szeredi.hu> (raw)
In-Reply-To: <20101104164144.GI11602@random.random> (message from Andrea Arcangeli on Thu, 4 Nov 2010 17:41:44 +0100)
On Thu, 4 Nov 2010, Andrea Arcangeli wrote:
> On Wed, Nov 03, 2010 at 01:43:25PM -0700, Dave Hansen wrote:
> > some IBM testers ran into some deadlocks. It appears that the
> > khugepaged process is trying to migrate one of a filesystem daemon's
> > pages while khugepaged holds the daemon's mmap_sem for write.
>
> Correct. So now I'm wondering what happens if some library of this
> daemon happens to execute a munmap that calls split_vma and allocates
> memory while holding the mmap_sem, and the memory allocation triggers
> I/O that will have to be executed by the daemon.
mmap_sem is not really relevant here(*), page lock is. And in vmscan.c,
there's not a single blocking lock_page().
Also, as I mentioned, fuse does writeback in a special way: it copies dirty
pages to non-page cache pages which don't interact in any way with
reclaim. Fuse writeback is instantaneous from the reclaim PoV.
> I think this could be fixed in userland, this applies to openvpn too
> if used as nfs backend.
How?
Thanks,
Miklos
(*) In the original gpfs trace it is relevant but only because the
page migration is triggered by khugepaged. In the reproduced example
the page migration is triggered directly by an allocation. Since page
migration does blocking lock_page(), there's really no way to avoid a
deadlock in that case.
--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-11-04 19:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-03 20:43 Dave Hansen
2010-11-03 21:46 ` Miklos Szeredi
2010-11-04 16:41 ` Andrea Arcangeli
2010-11-04 19:53 ` Miklos Szeredi [this message]
2010-12-14 17:46 ` Andrea Arcangeli
2010-12-14 21:03 ` Miklos Szeredi
2010-12-15 5:24 ` Andrea Arcangeli
2010-12-15 14:54 ` Miklos Szeredi
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=E1PE5sG-0005Em-Qb@pomaz-ex.szeredi.hu \
--to=miklos@szeredi.hu \
--cc=aarcange@redhat.com \
--cc=dave@linux.vnet.ibm.com \
--cc=dingc@cn.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lnxninja@us.ibm.com \
--cc=mel@linux.vnet.ibm.com \
--cc=shenlinf@cn.ibm.com \
--cc=volobuev@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox