mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Mehnert <frank.mehnert@oracle.com>
To: linux-kernel@vger.kernel.org
Subject: PG_reserved and compound pages
Date: Wed, 06 Apr 2016 13:28:37 +0200	[thread overview]
Message-ID: <4482994.u2S3pScRyb@noys2> (raw)

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

             reply	other threads:[~2016-04-06 11:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06 11:28 Frank Mehnert [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4482994.u2S3pScRyb@noys2 \
    --to=frank.mehnert@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome