linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PG_reserved and compound pages
@ 2016-04-06 11:28 Frank Mehnert
  2016-04-06 15:02 ` Michal Hocko
  0 siblings, 1 reply; 7+ messages in thread
From: Frank Mehnert @ 2016-04-06 11:28 UTC (permalink / raw)
  To: linux-kernel

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.

  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?

Thanks,

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-19 10:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-06 11:28 PG_reserved and compound pages Frank Mehnert
2016-04-06 15:02 ` Michal Hocko
2016-04-06 15:12   ` Frank Mehnert
2016-04-06 15:33     ` Michal Hocko
2016-04-07 13:45       ` Frank Mehnert
2016-04-07 15:22         ` Michal Hocko
2016-04-19 10:34           ` Frank Mehnert

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).