linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
Cc: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
	linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org
Subject: Re: [PATCH v3 1/3] mm/hugetlb: Allow arch to override and call the weak function
Date: Thu, 27 Jul 2017 21:42:04 +0530	[thread overview]
Message-ID: <da6a497b-e65c-b0db-3dab-83aa300a75ca@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170727152556.s4uw5cuvdf36hodl@oracle.com>



On 07/27/2017 08:55 PM, Liam R. Howlett wrote:
> * Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> [170727 02:18]:
>> For ppc64, we want to call this function when we are not running as guest.
>> Also, if we failed to allocate hugepages, let the user know.
>>
> [...]
>> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>> index bc48ee783dd9..a3a7a7e6339e 100644
>> --- a/mm/hugetlb.c
>> +++ b/mm/hugetlb.c
>> @@ -2083,7 +2083,9 @@ struct page *alloc_huge_page_noerr(struct vm_area_struct *vma,
>>   	return page;
>>   }
>>   
>> -int __weak alloc_bootmem_huge_page(struct hstate *h)
>> +int alloc_bootmem_huge_page(struct hstate *h)
>> +	__attribute__ ((weak, alias("__alloc_bootmem_huge_page")));
>> +int __alloc_bootmem_huge_page(struct hstate *h)
>>   {
>>   	struct huge_bootmem_page *m;
>>   	int nr_nodes, node;
>> @@ -2104,6 +2106,7 @@ int __weak alloc_bootmem_huge_page(struct hstate *h)
>>   			goto found;
>>   		}
>>   	}
>> +	pr_info("Failed to allocate hugepage of size %ld\n", huge_page_size(h));
>>   	return 0;
>>   
>>   found:
> 
> There is already a call to warn the user in the
> hugetlb_hstate_alloc_pages function.  If you look there, you will see
> that the huge_page_size was translated into a more user friendly format
> and the count prior to the failure is included.  What call path are you
> trying to cover?  Also, you may want your print to be a pr_warn since it
> is a failure?
> 

Sorry I missed that in the recent kernel. I wrote the above before the 
mentioned changes was done. I will drop the pr_info from the patch.

Thanks
-aneesh

--
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>

  reply	other threads:[~2017-07-27 16:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-27  6:18 [PATCH v3 1/3] mm/hugetlb: Allow arch to override and call the weak function Aneesh Kumar K.V
2017-07-27  6:18 ` [PATCH v3 2/3] powerpc/mm/hugetlb: Add support for reserving gigantic huge pages via kernel command line Aneesh Kumar K.V
2017-07-27  6:18 ` [PATCH v3 3/3] powerpc/mm/hugetlb: Allow runtime allocation of 16G Aneesh Kumar K.V
2017-07-27 13:01 ` [PATCH v3 1/3] mm/hugetlb: Allow arch to override and call the weak function Michal Hocko
2017-07-27 16:20   ` Aneesh Kumar K.V
2017-07-28  7:06     ` Michal Hocko
2017-07-27 15:25 ` Liam R. Howlett
2017-07-27 16:12   ` Aneesh Kumar K.V [this message]
2017-07-27 17:38     ` Liam R. Howlett

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=da6a497b-e65c-b0db-3dab-83aa300a75ca@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=Liam.Howlett@Oracle.com \
    --cc=benh@kernel.crashing.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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).