From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Mel Gorman <mgorman@suse.de>
Cc: Pavel Emelyanov <xemul@parallels.com>,
Andrew Morton <akpm@linux-foundation.org>,
gnome@rvzt.net, drawoc@darkrefraction.com,
alan@lxorguk.ukuu.org.uk, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
bugzilla-daemon@bugzilla.kernel.org
Subject: Re: [Bug 67651] Bisected: Lots of fragmented mmaps cause gimp to fail in 3.12 after exceeding vm_max_map_count
Date: Thu, 23 Jan 2014 02:33:25 +0400 [thread overview]
Message-ID: <20140122223325.GA30637@moon> (raw)
In-Reply-To: <20140122191928.GQ1574@moon>
On Wed, Jan 22, 2014 at 11:19:28PM +0400, Cyrill Gorcunov wrote:
> > commit. Test case was simple -- try and open the large file described in
> > the bug. I did not investigate the patch itself as I'm just reporting
> > the results of the bisection. If I had to guess, I'd say that VMA
> > merging has been affected.
>
> Thanks a lot for report, Mel! I'm investigating...
Mel, here is a quick fix for bring merging back (just in case if you
have a minute to test it and confirm the merging were affected). It
seems I've lost setting up vma-softdirty bit somewhere and procedure
which tests vma flags mathcing fails, will continue investigating/testing
tomorrow.
---
mm/mmap.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Index: linux-2.6.git/mm/mmap.c
===================================================================
--- linux-2.6.git.orig/mm/mmap.c
+++ linux-2.6.git/mm/mmap.c
@@ -893,8 +893,18 @@ again: remove_next = 1 + (end > next->
static inline int is_mergeable_vma(struct vm_area_struct *vma,
struct file *file, unsigned long vm_flags)
{
+ /*
+ * VM_SOFTDIRTY should not prevent from VMA merging, if we
+ * match the flags but dirty bit -- just mark merged one as
+ * a dirty then.
+ */
+#ifdef CONFIG_MEM_SOFT_DIRTY
+ if ((vma->vm_flags ^ vm_flags) & ~VM_SOFTDIRTY)
+ return 0;
+#else
if (vma->vm_flags ^ vm_flags)
return 0;
+#endif
if (vma->vm_file != file)
return 0;
if (vma->vm_ops && vma->vm_ops->close)
@@ -1082,7 +1092,11 @@ static int anon_vma_compatible(struct vm
return a->vm_end == b->vm_start &&
mpol_equal(vma_policy(a), vma_policy(b)) &&
a->vm_file == b->vm_file &&
+#ifdef CONFIG_MEM_SOFT_DIRTY
+ !((a->vm_flags ^ b->vm_flags) & ~(VM_READ|VM_WRITE|VM_EXEC|VM_SOFTDIRTY)) &&
+#else
!((a->vm_flags ^ b->vm_flags) & ~(VM_READ|VM_WRITE|VM_EXEC)) &&
+#endif
b->vm_pgoff == a->vm_pgoff + ((b->vm_start - a->vm_start) >> PAGE_SHIFT);
}
--
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>
next prev parent reply other threads:[~2014-01-22 22:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-22 19:08 [Bug 67651] Bisected: Lots of fragmented mmaps cause gimp to fail in 3.12 after exceeding vm_max_map_count Mel Gorman
2014-01-22 19:19 ` Cyrill Gorcunov
2014-01-22 22:33 ` Cyrill Gorcunov [this message]
2014-01-23 9:55 ` Mel Gorman
2014-01-23 10:36 ` Cyrill Gorcunov
2014-01-23 12:15 ` Cyrill Gorcunov
2014-01-23 12:55 ` Cyrill Gorcunov
2014-01-23 15:14 ` [PATCH] mm: Ignore VM_SOFTDIRTY on VMA merging, v2 Cyrill Gorcunov
2014-01-23 18:07 ` Pavel Emelyanov
2014-01-23 21:02 ` Andrew Morton
2014-01-23 21:45 ` Cyrill Gorcunov
2014-01-24 10:14 ` Mel Gorman
2014-01-24 11:56 ` Cyrill Gorcunov
2014-01-24 13:41 ` Mel Gorman
2014-01-24 14:23 ` Cyrill Gorcunov
2014-01-23 10:30 ` [Bug 67651] Bisected: Lots of fragmented mmaps cause gimp to fail in 3.12 after exceeding vm_max_map_count Mel Gorman
2014-01-22 19:52 ` Andrew Morton
2014-01-23 7:28 ` Mel Gorman
2014-01-22 22:45 ` Andy Lutomirski
2014-01-23 5:59 ` Cyrill Gorcunov
2014-01-23 6:09 ` Andrew Morton
2014-01-23 6:27 ` Cyrill Gorcunov
2022-11-21 17:23 ` Muhammad Usama Anjum
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=20140122223325.GA30637@moon \
--to=gorcunov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=drawoc@darkrefraction.com \
--cc=gnome@rvzt.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=xemul@parallels.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;
as well as URLs for NNTP newsgroup(s).