[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180626045118-mutt-send-email-mst@kernel.org>
Date: Tue, 26 Jun 2018 04:55:26 +0300
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: wei.w.wang@...el.com, virtio-dev@...ts.oasis-open.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
virtualization <virtualization@...ts.linux-foundation.org>,
KVM list <kvm@...r.kernel.org>, linux-mm <linux-mm@...ck.org>,
Michal Hocko <mhocko@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Paolo Bonzini <pbonzini@...hat.com>,
liliang.opensource@...il.com, yang.zhang.wz@...il.com,
quan.xu0@...il.com, nilal@...hat.com,
Rik van Riel <riel@...hat.com>, peterx@...hat.com
Subject: Re: [PATCH v33 1/4] mm: add a function to get free page blocks
On Sat, Jun 16, 2018 at 08:08:53AM +0900, Linus Torvalds wrote:
> On Fri, Jun 15, 2018 at 2:08 PM Wei Wang <wei.w.wang@...el.com> wrote:
> >
> > This patch adds a function to get free pages blocks from a free page
> > list. The obtained free page blocks are hints about free pages, because
> > there is no guarantee that they are still on the free page list after
> > the function returns.
...
> > +uint32_t get_from_free_page_list(int order, __le64 buf[], uint32_t size)
...
>
> Ack. This is the kind of simple interface where I don't need to worry
> about the MM code calling out to random drivers or subsystems.
>
> I think that "order" should be checked for validity, but from a MM
> standpoint I think this is fine.
>
> Linus
The only issue seems to be getting hold of buf that's large enough -
and we don't really know what the size is, or whether one
buf would be enough.
Linus, do you think it would be ok to have get_from_free_page_list
actually pop entries from the free list and use them as the buffer
to store PAs?
Caller would be responsible for freeing the returned entries.
--
MST
Powered by blists - more mailing lists