From: Johannes Weiner <hannes@cmpxchg.org>
To: Christian Ehrhardt <uni@c--e.de>
Cc: Rik van Riel <riel@redhat.com>, Christian Ehrhardt <lk@c--e.de>,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
linux-mm@kvack.org
Subject: Re: [PATCH] rmap: Fix Bugzilla Bug #5493
Date: Sat, 6 Mar 2010 03:00:48 +0100 [thread overview]
Message-ID: <20100306020048.GA16967@cmpxchg.org> (raw)
In-Reply-To: <20100306010212.GH17078@lisa.in-ulm.de>
Hi Christian,
On Sat, Mar 06, 2010 at 02:02:12AM +0100, Christian Ehrhardt wrote:
> diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c
> index c9b97e9..4b8d01f 100644
> --- a/arch/arm/mm/fault-armv.c
> +++ b/arch/arm/mm/fault-armv.c
> @@ -117,7 +117,8 @@ make_coherent(struct address_space *mapping, struct vm_area_struct *vma,
> * cache coherency.
> */
> flush_dcache_mmap_lock(mapping);
> - vma_prio_tree_foreach(mpnt, &iter, &mapping->i_mmap, pgoff, pgoff) {
> + vma_prio_tree_foreach(mpnt, struct vm_area_struct, shared, &iter,
> + &mapping->i_mmap, pgoff, pgoff) {
How about vma_file_tree_foreach() vs. vma_anon_tree_foreach()? I found that
to be more descriptive (and it fits the users into a single line again ;).
> #define INIT_PRIO_TREE_ROOT(ptr) __INIT_PRIO_TREE_ROOT(ptr, 0)
> -#define INIT_RAW_PRIO_TREE_ROOT(ptr) __INIT_PRIO_TREE_ROOT(ptr, 1)
> +#define INIT_SHARED_PRIO_TREE_ROOT(ptr) __INIT_PRIO_TREE_ROOT(ptr, 1)
> +#define INIT_ANON_PRIO_TREE_ROOT(ptr) __INIT_PRIO_TREE_ROOT(ptr, 2)
SHARED vs. PRIVATE?
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -207,7 +207,7 @@ static void __remove_shared_vm_struct(struct vm_area_struct *vma,
> if (unlikely(vma->vm_flags & VM_NONLINEAR))
> list_del_init(&vma->shared.vm_set.list);
> else
> - vma_prio_tree_remove(vma, &mapping->i_mmap);
> + vma_prio_tree_remove(&vma->shared, &mapping->i_mmap);
> flush_dcache_mmap_unlock(mapping);
> }
>
> @@ -430,7 +430,7 @@ static void __vma_link_file(struct vm_area_struct *vma)
> if (unlikely(vma->vm_flags & VM_NONLINEAR))
> vma_nonlinear_insert(vma, &mapping->i_mmap_nonlinear);
> else
> - vma_prio_tree_insert(vma, &mapping->i_mmap);
> + vma_prio_tree_insert(&vma->shared, &mapping->i_mmap);
> flush_dcache_mmap_unlock(mapping);
> }
> }
> @@ -593,9 +593,9 @@ again: remove_next = 1 + (end > next->vm_end);
>
> if (root) {
> flush_dcache_mmap_lock(mapping);
> - vma_prio_tree_remove(vma, root);
> + vma_prio_tree_remove(&vma->shared, root);
> if (adjust_next)
> - vma_prio_tree_remove(next, root);
> + vma_prio_tree_remove(&next->shared, root);
> }
>
> vma->vm_start = start;
> @@ -608,8 +608,8 @@ again: remove_next = 1 + (end > next->vm_end);
>
> if (root) {
> if (adjust_next)
> - vma_prio_tree_insert(next, root);
> - vma_prio_tree_insert(vma, root);
> + vma_prio_tree_insert(&next->shared, root);
> + vma_prio_tree_insert(&vma->shared, root);
> flush_dcache_mmap_unlock(mapping);
> }
What's with expand_stack()? This changes the radix index or the heap
index, depending on the direction in which the stack grows, but it
does not adjust the tree and so its order is violated. Did you make
sure that this is fine?
Hannes
--
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:[~2010-03-06 2:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-05 9:38 [PATCH] rmap: Fix Bugzilla Bug #5493 Christian Ehrhardt
2010-03-05 14:10 ` Rik van Riel
2010-03-06 1:02 ` Christian Ehrhardt
2010-03-06 2:00 ` Johannes Weiner [this message]
2010-03-06 14:44 ` Christian Ehrhardt
2010-03-06 1:35 ` Kyle McMartin
2010-03-06 9:24 ` Mikael Pettersson
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=20100306020048.GA16967@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lk@c--e.de \
--cc=riel@redhat.com \
--cc=uni@c--e.de \
/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).