[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160406150206.GB24283@dhcp22.suse.cz>
Date: Wed, 6 Apr 2016 17:02:06 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Frank Mehnert <frank.mehnert@...cle.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: PG_reserved and compound pages
[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?
>
> 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
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists