Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1372590

Re: PG_reserved and compound pages

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: PG_reserved and compound pages
Date 2016-04-06 17:10 +0200
Message-ID <rkXfI-5Ne-17@gated-at.bofh.it> (permalink)
References <rkTOP-33a-49@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

PG_reserved and compound pages Frank Mehnert <frank.mehnert@oracle.com> - 2016-04-06 13:30 +0200
  Re: PG_reserved and compound pages Michal Hocko <mhocko@kernel.org> - 2016-04-06 17:10 +0200
    Re: Re: PG_reserved and compound pages Frank Mehnert <frank.mehnert@oracle.com> - 2016-04-06 17:20 +0200
      Re: Re: PG_reserved and compound pages Michal Hocko <mhocko@kernel.org> - 2016-04-06 17:40 +0200
        Re: Re: Re: PG_reserved and compound pages Frank Mehnert <frank.mehnert@oracle.com> - 2016-04-07 15:50 +0200
          Re: Re: Re: PG_reserved and compound pages Michal Hocko <mhocko@kernel.org> - 2016-04-07 17:30 +0200

csiph-web