linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH] thp: fix deadlock in split_huge_pmd()
Date: Fri, 11 Mar 2016 00:21:57 +0300	[thread overview]
Message-ID: <20160310212157.GA27497@node.shutemov.name> (raw)
In-Reply-To: <20160310115254.fe35ab2beca9690d4ee9989e@linux-foundation.org>

On Thu, Mar 10, 2016 at 11:52:54AM -0800, Andrew Morton wrote:
> On Thu, 10 Mar 2016 17:54:06 +0300 "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> wrote:
> 
> > split_huge_pmd() tries to munlock page with munlock_vma_page(). That
> > requires the page to locked.
> > 
> > If the is locked by caller, we would get a deadlock:
> > 
> > ...
> >
> > I don't think the deadlock is triggerable without split_huge_page()
> > simplifilcation patchset.
> > 
> > But munlock_vma_page() here is wrong: we want to munlock the page
> > unconditionally, no need in rmap lookup, that munlock_vma_page() does.
> > 
> > Let's use clear_page_mlock() instead. It can be called under ptl.
> > 
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> > Fixes: ee0b79212791 ("thp: allow mlocked THP again")
> 
> This is the incorrect hash (or something weird happened at my end). 
> I'm seeing
> 
> commit e90309c9f7722db4ff5bce3b9e6e04d1460f2553
> Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Date:   Fri Jan 15 16:54:33 2016 -0800
> 
>     thp: allow mlocked THP again
> 
> That's the second time this has happened this week so please
> double-check whatever you're doing here?

Ouch. Sorry. It's hash from mhocko/mm.git since-4.4, not mainline.

> The patch itself doesn't apply to mainline, which is a bit strange
> given that it "Fixes" a bug in an already-mainlined patch.  The patch
> as-sent depends upon
> thp-rewrite-freeze_page-unfreeze_page-with-generic-rmap-walkers.patch,
> so I have queued it after that patch.

I think that's fine.

-- 
 Kirill A. Shutemov

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

  reply	other threads:[~2016-03-10 21:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 14:54 [PATCH] thp: fix deadlock in split_huge_pmd() Kirill A. Shutemov
2016-03-10 19:52 ` Andrew Morton
2016-03-10 21:21   ` Kirill A. Shutemov [this message]
2016-03-10 21:54   ` Kirill A. Shutemov

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=20160310212157.GA27497@node.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-mm@kvack.org \
    /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;
as well as URLs for NNTP newsgroup(s).