Re: [PATCH v11 4/6] mm: function to offer a page block on the free list
From: Dave Hansen
Date: Mon Jun 12 2017 - 10:10:18 EST
Please stop cc'ing me on things also sent to closed mailing lists
(virtio-dev@xxxxxxxxxxxxxxxxxxxx). I'm happy to review things on open
lists, but I'm not fond of the closed lists bouncing things at me.
On 06/09/2017 03:41 AM, Wei Wang wrote:
> Add a function to find a page block on the free list specified by the
> caller. Pages from the page block may be used immediately after the
> function returns. The caller is responsible for detecting or preventing
> the use of such pages.
This description doesn't tell me very much about what's going on here.
Neither does the comment.
"Pages from the page block may be used immediately after the
function returns".
Used by who? Does the "may" here mean that it is OK, or is it a warning
that the contents will be thrown away immediately?
The hypervisor is going to throw away the contents of these pages,
right? As soon as the spinlock is released, someone can allocate a
page, and put good data in it. What keeps the hypervisor from throwing
away good data?