From: Andrea Arcangeli <aarcange@redhat.com>
To: linux-mm@kvack.org
Cc: Mel Gorman <mel@csn.ul.ie>, Johannes Weiner <jweiner@redhat.com>,
Rik van Riel <riel@redhat.com>, Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH] THP: mremap support and TLB optimization #2
Date: Thu, 4 Aug 2011 17:32:05 +0200 [thread overview]
Message-ID: <20110804153204.GP9770@redhat.com> (raw)
In-Reply-To: <20110728142631.GI3087@redhat.com>
Hello everyone,
On Thu, Jul 28, 2011 at 04:26:31PM +0200, Andrea Arcangeli wrote:
> Hello,
>
> this is the latest version of the mremap THP native implementation
> plus optimizations.
>
> So first question is: am I right, the "- 1" that I am removing below
> was buggy? It's harmless because these old_end/next are page aligned,
> but if PAGE_SIZE would be 1, it'd break, right? It's really confusing
> to read even if it happens to work. Please let me know because that "-
> 1" ironically it's the thing I'm less comfortable about in this patch.
> diff --git a/mm/mremap.c b/mm/mremap.c
*snip*
> --- a/mm/mremap.c
> +++ b/mm/mremap.c
> @@ -134,14 +126,17 @@ unsigned long move_page_tables(struct vm
> for (; old_addr < old_end; old_addr += extent, new_addr += extent) {
> cond_resched();
> next = (old_addr + PMD_SIZE) & PMD_MASK;
> - if (next - 1 > old_end)
> + if (next > old_end)
> next = old_end;
> extent = next - old_addr;
> old_pmd = get_old_pmd(vma->vm_mm, old_addr);
Could somebody comment on the "- 1" removal, the rest is less
urgent. That above change is indipendent of the mremap optimizations
and could be split off. For whatever reason it makes me uncomfortable
and I'd appreciate at least one positive or negative comment on it
from another two eyes ;). No need to review the rest for now if you're
busy.
Andrea
--
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 internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-08-04 15:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 14:26 [PATCH] THP: mremap support and TLB optimization #2 Andrea Arcangeli
2011-08-04 15:32 ` Andrea Arcangeli [this message]
2011-08-05 10:50 ` Johannes Weiner
2011-08-05 15:52 ` Andrea Arcangeli
2011-08-05 15:25 ` Mel Gorman
2011-08-05 16:21 ` Andrea Arcangeli
2011-08-05 17:11 ` Mel Gorman
2011-08-05 18:18 ` Andrea Arcangeli
2011-08-06 16:31 ` Andrea Arcangeli
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=20110804153204.GP9770@redhat.com \
--to=aarcange@redhat.com \
--cc=hughd@google.com \
--cc=jweiner@redhat.com \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=riel@redhat.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).