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]
Date:   Mon, 10 Oct 2016 08:40:14 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Xishi Qiu <qiuxishi@...wei.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Michal Hocko <mhocko@...e.com>,
        Minchan Kim <minchan@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Yisheng Xie <xieyisheng1@...wei.com>
Cc:     Linux MM <linux-mm@...ck.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: init gfp mask in kcompactd_do_work()

On 10/10/2016 05:35 AM, Xishi Qiu wrote:
> We will use gfp_mask in the following path, but it's not init.
>
> kcompactd_do_work
> 	compact_zone
> 		gfpflags_to_migratetype
>
> However if not init, gfp_mask is always 0, and the result of
> gfpflags_to_migratetype(0) and gfpflags_to_migratetype(GFP_KERNEL)
> are the same, but it's a little confusion, so init it first.

Michal already did this as part of his patch, as it was needed to avoid 
wrongly restricting kcompactd to anonymous pages:

http://lkml.kernel.org/r/<20161007065019.GA18439@...p22.suse.cz>

> Signed-off-by: Xishi Qiu <qiuxishi@...wei.com>
> ---
>  mm/compaction.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 9affb29..4b9a9d1 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -1895,10 +1895,10 @@ static void kcompactd_do_work(pg_data_t *pgdat)
>  	struct zone *zone;
>  	struct compact_control cc = {
>  		.order = pgdat->kcompactd_max_order,
> +		.gfp_mask = GFP_KERNEL,
>  		.classzone_idx = pgdat->kcompactd_classzone_idx,
>  		.mode = MIGRATE_SYNC_LIGHT,
>  		.ignore_skip_hint = true,
> -
>  	};
>  	bool success = false;
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ