From: Lin Feng <linfeng@cn.fujitsu.com>
To: Yinghai Lu <yinghai@kernel.org>, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, x86@kernel.org, linux-kernel@vger.kernel.org,
tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
penberg@kernel.org, jacob.shin@amd.com
Subject: Re: [PATCH] x86: mm: add_pfn_range_mapped: use meaningful index to teach clean_sort_range()
Date: Mon, 25 Mar 2013 17:13:02 +0800 [thread overview]
Message-ID: <5150151E.7070206@cn.fujitsu.com> (raw)
In-Reply-To: <CAE9FiQUHtM_Nuz4ak+HeNGV6a-HTtfMkxc+zBZuow47Vj70CKQ@mail.gmail.com>
Hi Andrew,
On 03/19/2013 02:52 AM, Yinghai Lu wrote:
> On Mon, Mar 18, 2013 at 3:21 AM, Lin Feng <linfeng@cn.fujitsu.com> wrote:
>> Since add_range_with_merge() return the max none zero element of the array, it's
>> suffice to use it to instruct clean_sort_range() to do the sort. Or the former
>> assignment by add_range_with_merge() is nonsense because clean_sort_range()
>> will produce a accurate number of the sorted array and it never depends on
>> nr_pfn_mapped.
>>
>> Cc: Jacob Shin <jacob.shin@amd.com>
>> Cc: Yinghai Lu <yinghai@kernel.org>
>> Signed-off-by: Lin Feng <linfeng@cn.fujitsu.com>
>> ---
>> arch/x86/mm/init.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
>> index 59b7fc4..55ae904 100644
>> --- a/arch/x86/mm/init.c
>> +++ b/arch/x86/mm/init.c
>> @@ -310,7 +310,7 @@ static void add_pfn_range_mapped(unsigned long start_pfn, unsigned long end_pfn)
>> {
>> nr_pfn_mapped = add_range_with_merge(pfn_mapped, E820_X_MAX,
>> nr_pfn_mapped, start_pfn, end_pfn);
>> - nr_pfn_mapped = clean_sort_range(pfn_mapped, E820_X_MAX);
>> + nr_pfn_mapped = clean_sort_range(pfn_mapped, nr_pfn_mapped);
>>
>> max_pfn_mapped = max(max_pfn_mapped, end_pfn);>
>
> Acked-by: Yinghai Lu <yinghai@kernel.org>
Do we need to pick up this patch?
thanks,
linfeng
--
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>
prev parent reply other threads:[~2013-03-25 9:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 10:21 [PATCH] x86: mm: add_pfn_range_mapped: use meaningful index to teach clean_sort_range() Lin Feng
2013-03-18 18:52 ` Yinghai Lu
2013-03-25 9:13 ` Lin Feng [this message]
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=5150151E.7070206@cn.fujitsu.com \
--to=linfeng@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=jacob.shin@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=penberg@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yinghai@kernel.org \
/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).