linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
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: Tue, 14 Dec 2010 22:03:33 +0100	[thread overview]
Message-ID: <E1PSc21-0004ob-M6@pomaz-ex.szeredi.hu> (raw)
In-Reply-To: <20101214174626.GN5638@random.random> (message from Andrea Arcangeli on Tue, 14 Dec 2010 18:46:26 +0100)

On Tue, 14 Dec 2010, Andrea Arcangeli wrote:
> Hello Dave and everyone,
> 
> On Wed, Nov 03, 2010 at 01:43:25PM -0700, Dave Hansen wrote:
> > Hey Miklos,
> > 
> > When testing with a transparent huge page kernel:
> > 
> > 	http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/andrea/aa.git;a=summary
> > 
> > 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.
> 
> The allocation under mmap_sem write mode in khugepaged bug should be
> fixed in current aa.git based on 37-rc5:
> 
> http://git.kernel.org/?p=linux/kernel/git/andrea/aa.git;a=shortlog
> http://git.kernel.org/?p=linux/kernel/git/andrea/aa.git;a=commit;h=83e4d55d0014b3eeb982005d73f55ffcf2813504
> 
> Let me know how it goes, it's not very well tested yet (which is why I
> didn't make a new submit yet).
> 
> I stick to my idea this is bug in userland and may trigger if your
> daemon does mmap/munmap and the vma allocation under mmap_sem waits
> for the I/O, but I don't want to show it with THP enabled, and this is
> more scalable so it's definitely good idea and no downside whatsoever.

This is all fine and dandy, but please let's not forget about the
other thing that Dave's test uncovered.  Namely that page migration
triggered by transparent hugepages takes the page lock on arbitrary
filesystems.  This is also deadlocky on fuse, but also not a good idea
for any filesystem where page reading time is not bounded (think NFS
with network down).

Thanks,
Miklos

--
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>

  reply	other threads:[~2010-12-14 21:03 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
2010-12-14 17:46 ` Andrea Arcangeli
2010-12-14 21:03   ` Miklos Szeredi [this message]
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=E1PSc21-0004ob-M6@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