From: David Hildenbrand <david@redhat.com>
To: Alexander Duyck <alexander.duyck@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Cc: Nitesh Narayan Lal <nitesh@redhat.com>,
kvm list <kvm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Paolo Bonzini <pbonzini@redhat.com>,
lcapitulino@redhat.com, pagupta@redhat.com, wei.w.wang@intel.com,
Yang Zhang <yang.zhang.wz@gmail.com>,
Rik van Riel <riel@surriel.com>,
dodgen@google.com, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
dhildenb@redhat.com, Andrea Arcangeli <aarcange@redhat.com>
Subject: Re: Thoughts on simple scanner approach for free page hinting
Date: Mon, 8 Apr 2019 20:58:31 +0200 [thread overview]
Message-ID: <8032d00d-60f3-6d51-7c08-9f0f4b3e9636@redhat.com> (raw)
In-Reply-To: <CAKgT0UekrBHW0LAwGpvJqLFfiw51e=_52858FCr9EW6nirW-QA@mail.gmail.com>
>>> - Define and use counters corresponding to each zone to monitor the
>>> amount of memory freed.
>>> - As soon as the 64MB free memory threshold is hit wake up the kernel
>>> thread which will scan this xbitmap and try to isolate the pages and
>>> clear the corresponding bits. (We still have to acquire zone lock to
>>> protect the respective xbitmap)
>>
>> So that's 32 pages then? I'd say just keep them in an array,
>> list, tree or hash, bitmap is for when you have nots of pages.
>
> The xbitmap I think is for the free page tracking. The problem is this
> could build up to tons of pages while we are waiting on hints to
> complete if we have a thread that is dumping a large amount of free
> pages.
>
>>> - Report the isolated pages back to the host in a synchronous manner.
>>> I still have to work on several details of this idea including xbitmap,
>>> but first would like to hear any suggestions/thoughts.
>
> I'm still not a fan of trying to keep track of the free page metadata
> in real-time. It is going to be far more expensive to have every free
> and alloc have to update the extra piece of data than to just come
> through after the fact and scan the new pages that have been added.
Tracking metadata separately is a very good starting point. While
integration into core mm in some form e.g. like you describe would be
desirable long term, not messing too much with core-mm is the lower
hanging fruit.
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2019-04-08 18:58 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-06 0:09 Thoughts on simple scanner approach for free page hinting Alexander Duyck
2019-04-08 12:24 ` Nitesh Narayan Lal
2019-04-08 15:18 ` Alexander Duyck
2019-04-08 15:41 ` Michael S. Tsirkin
2019-04-08 16:36 ` David Hildenbrand
2019-04-08 18:09 ` Nitesh Narayan Lal
2019-04-08 18:19 ` Michael S. Tsirkin
2019-04-08 18:29 ` Alexander Duyck
2019-04-08 18:58 ` David Hildenbrand [this message]
2019-04-08 18:27 ` David Hildenbrand
2019-04-08 18:18 ` Alexander Duyck
2019-04-08 18:40 ` David Hildenbrand
2019-04-08 20:10 ` Alexander Duyck
2019-04-08 20:47 ` David Hildenbrand
2019-04-08 20:51 ` David Hildenbrand
2019-04-08 21:20 ` David Hildenbrand
2019-04-08 21:56 ` Alexander Duyck
2019-04-09 2:44 ` Michael S. Tsirkin
2019-04-09 7:05 ` David Hildenbrand
2019-04-09 9:20 ` David Hildenbrand
2019-04-09 13:31 ` Michael S. Tsirkin
2019-04-09 13:36 ` David Hildenbrand
2019-04-09 13:37 ` Michael S. Tsirkin
2019-04-09 13:43 ` David Hildenbrand
2019-04-09 14:03 ` Michael S. Tsirkin
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=8032d00d-60f3-6d51-7c08-9f0f4b3e9636@redhat.com \
--to=david@redhat.com \
--cc=aarcange@redhat.com \
--cc=alexander.duyck@gmail.com \
--cc=dhildenb@redhat.com \
--cc=dodgen@google.com \
--cc=konrad.wilk@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=lcapitulino@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mst@redhat.com \
--cc=nitesh@redhat.com \
--cc=pagupta@redhat.com \
--cc=pbonzini@redhat.com \
--cc=riel@surriel.com \
--cc=wei.w.wang@intel.com \
--cc=yang.zhang.wz@gmail.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).