linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Charan Teja Kalla <charante@codeaurora.org>,
	akpm@linux-foundation.org, linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, vinmenon@codeaurora.org
Subject: Re: [PATCH] mm, memory_hotplug: update pcp lists everytime onlining a memory block
Date: Mon, 3 Aug 2020 16:00:08 +0200	[thread overview]
Message-ID: <ecf75fb9-10e6-5959-7e74-f1219b231305@redhat.com> (raw)
In-Reply-To: <f7913d7d-9fd9-97a5-eae8-3a5bb2683e19@codeaurora.org>

On 03.08.20 15:28, Charan Teja Kalla wrote:
> Thanks David for the comments.
> 
> On 8/3/2020 1:35 PM, David Hildenbrand wrote:
>> On 02.08.20 14:54, Charan Teja Reddy wrote:
>>> When onlining a first memory block in a zone, pcp lists are not updated
>>> thus pcp struct will have the default setting of ->high = 0,->batch = 1.
>>> This means till the second memory block in a zone(if it have) is onlined
>>> the pcp lists of this zone will not contain any pages because pcp's
>>> ->count is always greater than ->high thus free_pcppages_bulk() is
>>> called to free batch size(=1) pages every time system wants to add a
>>> page to the pcp list through free_unref_page(). To put this in a word,
>>> system is not using benefits offered by the pcp lists when there is a
>>> single onlineable memory block in a zone. Correct this by always
>>> updating the pcp lists when memory block is onlined.
>>
>> I guess such setups are rare ... but I can imagine it being the case
>> with virtio-mem in the future ... not 100% if this performance
>> optimization is really relevant in practice ... how did you identify this?
> 
> Even the Snapdragon hardware that I had tested on contain multiple
> onlineable memory blocks. But we have the use case in which we online
> single memory block and once it is filled then online the next block. In
> the step where single block is onlined, we observed the below pageset

Out of interest, why? Is it to optimize energy consumption?

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2020-08-03 14:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02 12:54 [PATCH] mm, memory_hotplug: update pcp lists everytime onlining a memory block Charan Teja Reddy
2020-08-03  8:05 ` David Hildenbrand
2020-08-03 13:28   ` Charan Teja Kalla
2020-08-03 14:00     ` David Hildenbrand [this message]
2020-08-03 13:55 ` Vlastimil Babka
2020-08-03 15:46 ` Michal Hocko

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=ecf75fb9-10e6-5959-7e74-f1219b231305@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=charante@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=vinmenon@codeaurora.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).