lkml.org 
[lkml]   [2017]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] mm: extract common code for calculating total memory size
From
Date


On 10/27/17 9:51 AM, Yang Shi wrote:
>
>
> On 10/27/17 3:00 AM, Christopher Lameter wrote:
>> On Thu, 26 Oct 2017, Yang Shi wrote:
>>
>>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>>> index 935c4d4..e21b81e 100644
>>> --- a/include/linux/mm.h
>>> +++ b/include/linux/mm.h
>>> @@ -2050,6 +2050,31 @@ extern int __meminit
>>> __early_pfn_to_nid(unsigned long pfn,
>>> static inline void zero_resv_unavail(void) {}
>>> #endif
>>>
>>> +static inline void calc_mem_size(unsigned long *total, unsigned long
>>> *reserved,
>>> + unsigned long *highmem)
>>> +{
>>
>> Huge incline function. This needs to go into mm/page_alloc.c or
>> mm/slab_common.c
>
> It is used by lib/show_mem.c too. But since it is definitely on a hot
> patch, I think I can change it to non inline.

I mean it is *not* on the hot path. Sorry for the typo and inconvenience.

Yang

>
> Thanks,
> Yang
>
>>

\
 
 \ /
  Last update: 2017-10-31 17:46    [W:0.062 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site