public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Tejun Heo <tj@kernel.org>, Yinghai Lu <yinghai@kernel.org>,
	Stephen Wilson <wilsons@start.ca>
Subject: Re: [PATCH x86,mm]  fix pgt_buf_end when memory hotplug
Date: Wed, 21 Sep 2011 13:51:17 +0800	[thread overview]
Message-ID: <4E797B55.20102@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1109081616450.12963@kaball-desktop>

On 09/08/2011 11:21 PM, Stefano Stabellini wrote:
> On Thu, 8 Sep 2011, Lai Jiangshan wrote:
>>
>> When I test memory hotplug, such message is always outputted when hot-adding
>> a memory block:
>>
>> initial kernel pagetable allocation wasted ffffffffffffffff pages
> 
> I take you are using tip/x86/mm, because that is the only branch that
> contains that warning.

No,
I was using tip/master.

Thanks,
Lai

> 
> 
>> This message comes from init_memory_mapping(), it shows "pgt_buf_end" is
>> incorrect here, and I found it was caused by alloc_low_page().
>>
>> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
>> ---
>> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
>> index bbaaa00..e138e0a 100644
>> --- a/arch/x86/mm/init_64.c
>> +++ b/arch/x86/mm/init_64.c
>> @@ -317,7 +317,7 @@ void __init cleanup_highmap(void)
>>  
>>  static __ref void *alloc_low_page(unsigned long *phys)
>>  {
>> -	unsigned long pfn = pgt_buf_end++;
>> +	unsigned long pfn;
>>  	void *adr;
>>  
>>  	if (after_bootmem) {
>> @@ -327,6 +327,7 @@ static __ref void *alloc_low_page(unsigned long *phys)
>>  		return adr;
>>  	}
>>  
>> +	pfn = pgt_buf_end++;
>>  	if (pfn >= pgt_buf_top)
>>  		panic("alloc_low_page: ran out of memory");
> 
> 
> This patch makes sense to me. It would also make sense to print the
> "allocation wasted" warning only if (!after_bootmem).
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


      reply	other threads:[~2011-09-21  5:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08  9:33 [PATCH x86,mm] fix pgt_buf_end when memory hotplug Lai Jiangshan
2011-09-08 15:21 ` Stefano Stabellini
2011-09-21  5:51   ` Lai Jiangshan [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=4E797B55.20102@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=wilsons@start.ca \
    --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