lkml.org 
[lkml]   [2016]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] mm: init gfp mask in kcompactd_do_work()
    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.

    Signed-off-by: Xishi Qiu <qiuxishi@huawei.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;

    --
    1.8.3.1

    \
     
     \ /
      Last update: 2016-10-10 05:45    [W:2.311 / U:0.524 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site