[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3877205.TjDYue2aah@noys2>
Date: Wed, 06 Apr 2016 17:12:43 +0200
From: Frank Mehnert <frank.mehnert@...cle.com>
To: Michal Hocko <mhocko@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: Re: PG_reserved and compound pages
Hi Michal,
On Wednesday 06 April 2016 17:02:06 Michal Hocko wrote:
> [CCing linux-mm mailing list]
>
> On Wed 06-04-16 13:28:37, Frank Mehnert wrote:
> > Hi,
> >
> > Linux 4.5 introduced additional checks to ensure that compound pages are
> > never marked as reserved. In our code we use PG_reserved to ensure that
> > the kernel does never swap out such pages, e.g.
>
> Are you putting your pages on the LRU list? If not how they could get
> swapped out?
No, we do nothing like that. It was my understanding that at least with
older kernels it was possible that pages allocated with alloc_pages()
could be swapped out or otherwise manipulated, I might be wrong. For
instance, it's also necessary that the physical address of the page
is known and that it does never change. I know, there might be problems
with automatic NUMA page migration but that's another story.
> > int i;
> > struct page *pages = alloc_pages(GFP_HIGHUSER | __GFP_COMP, 4);
> > for (i = 0; i < 16; i++)
> >
> > SetPageReserved(&pages[i]);
> >
> > The purpose of setting PG_reserved is to prevent the kernel from swapping
> > this memory out. This worked with older kernel but not with Linux 4.5 as
> > setting PG_reserved to compound pages is not allowed any more.
> >
> > Can somebody explain how we can achieve the same result in accordance to
> > the new Linux 4.5 rules?
Frank
--
Dr.-Ing. Frank Mehnert | Software Development Director, VirtualBox
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt, Germany
ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
Powered by blists - more mailing lists