On Tue, 2019-09-10 at 20:00 +0200, Michal Hocko wrote: > On Tue 10-09-19 19:52:13, Michal Hocko wrote: > > On Tue 10-09-19 09:05:43, Alexander Duyck wrote: > [...] > > > All this is providing is just a report and it is optional if the > > > hypervisor will act on it or not. If the hypervisor takes some sort of > > > action on the page, then the expectation is that the hypervisor will > > > use some sort of mechanism such as a page fault to discover when the > > > page is used again. > > > > OK so the baloon driver is in charge of this metadata and the allocator > > has to live with that. Isn't that a layer violation? > > Another thing that is not clear to me is how these marked pages are > different from any other free pages. All of them are unused and you are > losing your metadata as soon as the page gets allocated because the page > changes its owner and the struct page belongs to it. Really they aren't any different then other free pages other than they are marked. Us losing the metadata as soon as the page is allocated is fine as we will need to re-report it when it is returned so we no longer need the metadata once it is allocated.