From: Hugh Dickins <hughd@google.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Sasha Levin <sasha.levin@oracle.com>,
Hugh Dickins <hughd@google.com>,
akpm@linux-foundation.org, davej@redhat.com, koct9i@gmail.com,
lczerner@redhat.com, stable@vger.kernel.org,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: + shmem-fix-faulting-into-a-hole-while-its-punched-take-2.patch added to -mm tree
Date: Wed, 9 Jul 2014 10:05:35 -0700 (PDT) [thread overview]
Message-ID: <alpine.LSU.2.11.1407091000410.11705@eggly.anvils> (raw)
In-Reply-To: <53BD6F4E.6030003@suse.cz>
On Wed, 9 Jul 2014, Vlastimil Babka wrote:
> On 07/09/2014 06:03 PM, Sasha Levin wrote:
> >
> > We can see that it's not blocked since it's in the middle of a spinlock
> > unlock
> > call, and we can guess it's been in that function for a while because of
> > the hung
> > task timer, and other processes waiting on that i_mmap_mutex:
>
> Hm, zap_pte_range has potentially an endless loop due to the 'goto again'
> path. Could it be a somewhat similar situation to the fallocate problem, but
> where parallel faulters on shared memory are preventing a process from
> exiting? Although they don't fault the pages into the same address space,
> they could maybe somehow interact through the TLB flushing code? And only
> after fixing the original problem we can observe this one?
That's a good thought. It ought to make forward progress nonetheless,
but I believe (please check, I'm rushing) that there's an off-by-one in
that path which could leave us hanging - but only when __tlb_remove_page()
repeatedly fails, which would only happen if exceptionally low on memory??
Does this patch look good, and does it make any difference to the hang?
--- mmotm/mm/memory.c 2014-07-02 15:32:22.212311544 -0700
+++ linux/mm/memory.c 2014-07-09 09:56:33.724159443 -0700
@@ -1145,6 +1145,7 @@ again:
if (unlikely(page_mapcount(page) < 0))
print_bad_pte(vma, addr, ptent, page);
if (unlikely(!__tlb_remove_page(tlb, page))) {
+ addr += PAGE_SIZE;
force_flush = 1;
break;
}
next prev parent reply other threads:[~2014-07-09 17:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <53b45c9b.2rlA0uGYBLzlXEeS%akpm@linux-foundation.org>
2014-07-09 4:03 ` + shmem-fix-faulting-into-a-hole-while-its-punched-take-2.patch added to -mm tree Sasha Levin
2014-07-09 6:35 ` Hugh Dickins
2014-07-09 9:50 ` Vlastimil Babka
2014-07-09 12:47 ` Sasha Levin
[not found] ` <53BD67DC.9040700@oracle.com>
2014-07-09 16:35 ` Vlastimil Babka
2014-07-09 17:05 ` Hugh Dickins [this message]
2014-07-10 1:04 ` Hugh Dickins
2014-07-10 7:37 ` Hugh Dickins
2014-07-10 12:46 ` Sasha Levin
2014-07-10 17:21 ` Sasha Levin
2014-07-10 17:55 ` Hugh Dickins
2014-07-10 18:14 ` Sasha Levin
2014-07-10 18:52 ` Hugh Dickins
2014-07-10 19:02 ` Sasha Levin
2014-07-10 19:06 ` Hugh Dickins
2014-07-10 19:09 ` Sasha Levin
2014-07-10 19:56 ` Hugh Dickins
2014-07-11 8:25 ` Peter Zijlstra
2014-07-11 8:33 ` Vlastimil Babka
2014-07-11 8:38 ` Peter Zijlstra
2014-07-11 8:51 ` Vlastimil Babka
2014-07-11 12:22 ` Sasha Levin
2014-07-11 14:55 ` Hugh Dickins
2014-07-11 15:59 ` Peter Zijlstra
2014-07-13 21:43 ` Sasha Levin
2014-07-14 10:10 ` Peter Zijlstra
2014-07-10 20:06 ` Hugh Dickins
2014-07-11 6:59 ` Hugh Dickins
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=alpine.LSU.2.11.1407091000410.11705@eggly.anvils \
--to=hughd@google.com \
--cc=akpm@linux-foundation.org \
--cc=davej@redhat.com \
--cc=koct9i@gmail.com \
--cc=lczerner@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sasha.levin@oracle.com \
--cc=stable@vger.kernel.org \
--cc=vbabka@suse.cz \
/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