linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yang Shi" <yang.s@alibaba-inc.com>
To: Christopher Lameter <cl@linux.com>
Cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com,
	akpm@linux-foundation.org, mhocko@kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mm: extract common code for calculating total memory size
Date: Wed, 01 Nov 2017 00:45:03 +0800	[thread overview]
Message-ID: <038f781e-e96b-f122-2455-8a41d3a981a7@alibaba-inc.com> (raw)
In-Reply-To: <180e8cff-b0e9-bed7-2283-3a96d97fdf62@alibaba-inc.com>



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

  reply	other threads:[~2017-10-31 16:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25 22:48 [PATCH 0/2 -mmotm] oom: show single slab cache in oom whose size > 10% of total system memory Yang Shi
2017-10-25 22:48 ` [PATCH 1/2] mm: extract common code for calculating total memory size Yang Shi
2017-10-27 10:00   ` Christopher Lameter
2017-10-27 16:51     ` Yang Shi
2017-10-31 16:45       ` Yang Shi [this message]
2017-10-25 22:49 ` [PATCH 2/2] mm: oom: dump single excessive slab cache when oom Yang Shi
2017-10-26 14:53   ` Michal Hocko
2017-10-26 16:15     ` Yang Shi
2017-10-26 16:27       ` Michal Hocko
2017-10-26 17:14         ` Michal Hocko
2017-10-31 16:47           ` Yang Shi

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=038f781e-e96b-f122-2455-8a41d3a981a7@alibaba-inc.com \
    --to=yang.s@alibaba-inc.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.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;
as well as URLs for NNTP newsgroup(s).