linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
	Alexander Duyck <alexander.duyck@gmail.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: Tue, 9 Apr 2019 09:05:16 +0200	[thread overview]
Message-ID: <ba84ec1f-79f2-e15b-e225-7d2e2885a4c6@redhat.com> (raw)
In-Reply-To: <20190408203541-mutt-send-email-mst@kernel.org>

On 09.04.19 04:44, Michael S. Tsirkin wrote:
> On Fri, Apr 05, 2019 at 05:09:45PM -0700, Alexander Duyck wrote:
>> In addition we will need some way to identify which pages have been
>> hinted on and which have not. The way I believe easiest to do this
>> would be to overload the PageType value so that we could essentially
>> have two values for "Buddy" pages. We would have our standard "Buddy"
>> pages, and "Buddy" pages that also have the "Offline" value set in the
>> PageType field. Tracking the Online vs Offline pages this way would
>> actually allow us to do this with almost no overhead as the mapcount
>> value is already being reset to clear the "Buddy" flag so adding a
>> "Offline" flag to this clearing should come at no additional cost.
> 
> It bothers me a bit that this doesn't scale to multiple hint types
> if we ever need them. Would it be better to have two
> free lists: hinted and non-hinted one?

That would imply having to change all places trying to allocate memory
to have a look at both lists? I think that could be factored out. I
assume keeping track of the amount of pages would feel more naturally
than having split counters for the existing lists.

I think I'd actually prefer something like that, avoiding mixing page
types and working with different types per list.

-- 

Thanks,

David / dhildenb

  reply	other threads:[~2019-04-09  7:05 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
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 [this message]
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=ba84ec1f-79f2-e15b-e225-7d2e2885a4c6@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).