From: Michal Hocko <mhocko@suse.cz>
To: Gavin Shan <shangw@linux.vnet.ibm.com>
Cc: Li Haifeng <omycle@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>, Minchan Kim <minchan.kim@gmail.com>,
Johannes Weiner <jweiner@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: Fixup the page of buddy_higher address's calculation
Date: Thu, 23 Aug 2012 15:58:39 +0200 [thread overview]
Message-ID: <20120823135839.GB19968@dhcp22.suse.cz> (raw)
In-Reply-To: <20120823123034.GA3793@shangw.(null)>
On Thu 23-08-12 20:30:34, Gavin Shan wrote:
> On Thu, Aug 23, 2012 at 06:21:06PM +0800, Li Haifeng wrote:
[...]
> >>> From d7cd78f9d71a5c9ddeed02724558096f0bb4508a Mon Sep 17 00:00:00 2001
> >>> From: Haifeng Li <omycle@gmail.com>
> >>> Date: Thu, 23 Aug 2012 16:27:19 +0800
> >>> Subject: [PATCH] Fixup the page of buddy_higher address's calculation
> >>
> >> Some general questions:
> >> Any word about the change? Is it really that obvious? Why do you think the
> >> current state is incorrect? How did you find out?
> >>
> >> And more specific below:
> >>
> >>> Signed-off-by: Haifeng Li <omycle@gmail.com>
> >>> ---
> >>> mm/page_alloc.c | 2 +-
> >>> 1 files changed, 1 insertions(+), 1 deletions(-)
> >>>
> >>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> >>> index ddbc17d..5588f68 100644
> >>> --- a/mm/page_alloc.c
> >>> +++ b/mm/page_alloc.c
> >>> @@ -579,7 +579,7 @@ static inline void __free_one_page(struct page *page,
> >>> combined_idx = buddy_idx & page_idx;
> >>> higher_page = page + (combined_idx - page_idx);
> >>> buddy_idx = __find_buddy_index(combined_idx, order + 1);
> >>> - higher_buddy = page + (buddy_idx - combined_idx);
> >>> + higher_buddy = page + (buddy_idx - page_idx);
>
> Haifeng, Not sure it would be better? At least, the expression
> would be more explicitly meaningful than yours.
>
> higher_buddy = higher_page + (buddy_idx - combined_idx);
Yes, indeed. It would be also good to mention that this is a regression
since 43506fad (mm/page_alloc.c: simplify calculation of combined index
of adjacent buddy lists). IIUC this basically disables the heuristic
because page_is_buddy will fail for order+1, right?
Maybe 2.6.38+ stable candidate, then.
Could you repost with the full changelog, please?
Thanks
--
Michal Hocko
SUSE Labs
--
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:[~2012-08-23 13:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 8:40 Li Haifeng
2012-08-23 9:50 ` Michal Hocko
2012-08-23 10:21 ` Li Haifeng
2012-08-23 12:30 ` Gavin Shan
2012-08-23 12:30 ` Gavin Shan
2012-08-23 13:58 ` Michal Hocko [this message]
2012-08-24 2:08 ` Li Haifeng
2012-08-24 8:06 ` Michal Hocko
2012-08-24 9:08 ` Li Haifeng
2012-08-24 9:44 ` Michal Hocko
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=20120823135839.GB19968@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=jweiner@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=minchan.kim@gmail.com \
--cc=omycle@gmail.com \
--cc=shangw@linux.vnet.ibm.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