lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <5110C506.2060209@samsung.com>
Date:	Tue, 05 Feb 2013 09:38:30 +0100
From:	Marek Szyprowski <m.szyprowski@...sung.com>
To:	Minchan Kim <minchan@...nel.org>
Cc:	Kyungmin Park <kmpark@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, mgorman@...e.de
Subject: Re: [PATCH] mm: cma: fix accounting of CMA pages placed in high memory

Hello,

On 2/5/2013 1:40 AM, Minchan Kim wrote:

...

> > Previous time, it's not fully tested and now we checked it with
> > highmem support patches.
>
> I get it. Sigh. then [1] inline attached below wan't good.
> We have to code like this?
>
> [1] 6a6dccba, mm: cma: don't replace lowmem pages with highmem
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index b97cf12..0707e0a 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5671,11 +5671,10 @@ static struct page *
>   __alloc_contig_migrate_alloc(struct page *page, unsigned long private,
>                               int **resultp)
>   {
> -       gfp_t gfp_mask = GFP_USER | __GFP_MOVABLE;
> -
> -       if (PageHighMem(page))
> -               gfp_mask |= __GFP_HIGHMEM;
> -
> +       gfp_t gfp_mask = GFP_HIGHUSER_MOVABLE;
> +       struct address_space *mapping = page_mapping(page);
> +       if (mapping)
> +               gfp_mask = mapping_gfp_mask(mapping);
>          return alloc_page(gfp_mask);
>   }

Am I right that this code will allocate more pages from himem? Old approach
never migrate lowmem page to himem, what is now possible as gfp mask is 
always
taken from mapping_gfp flags. I only wonder if forcing GFP_HIGHUSER_MOVABLE
for pages without the mapping is a correct. Shouldn't we use avoid himem in
such case?

Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ