Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp820262ybt; Tue, 7 Jul 2020 00:45:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKqpw/gTTclD3I4O7PsNlKqAQBmzZIAlZAo0bxm5E3kEg2Ur04+7YhWnNNF0Trz4Inbz9z X-Received: by 2002:a50:931e:: with SMTP id m30mr62308260eda.341.1594107947846; Tue, 07 Jul 2020 00:45:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594107947; cv=none; d=google.com; s=arc-20160816; b=HBiI2Fdw9C08ptgsdcJPsnJFpRs+vLSXFzF/Iua2aoIldyjLx7eBsqJFXv2mYXha7b skW5u/Fq8FHSpMGdUvpeC5TsG0nuk5r+uu8ljpB9eUW7CNHbOWl/bf3rtQmwMwUbGxsl q/ckw6sPKu/ElUQ+cxQeMg3DVJJVo5ur2ievVpRugL8NQwAdHhV8dhXgPkOZ377xp+YV jCtx7bDLi4S8M6DkPTKh/m9vMHmgiOZh75ExMC3YjG5ClHUHkLDjoCTXZDOBh3YwE/7z 8BAe4hbgUYD7sB88ameUsGUo6LX/GM/8CHPQwdujst9VlJyw3hp76ddpArILIKZc9LPL b0sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=dUYmHO3l6du1f9FFjttJ6TgJ0e7C+7Hg2PXGcNYn718=; b=Z16eiivuL6lGLnQ9sFNjJwxNfkhlyKYSHl1tZaS2HAy/DGR6CpcDhSLKsgGtJvlqES o24o30lFdrtkxW5vh7rqDnSQdKC/h6ksA5MnTpWV/IcruKNPY/JcctIwxIGJPjv/1jSQ zF+uMVVbrEqITLp+ggtJnsPP6uSIcD9YLMJfv+02YBirw1SgG6dQz5RxXDAM8PJyPsYh zq+L789XlgCWXKQfogVzlz4QH50rILNOMs9XI0PG8dK/y1bN5eygJDkBI+01dVXzwnfQ OWD/N3GdKkhvX4p13NUNHpXBGZGxvY1FeDKatK4sBviKbsb60Fla0I2qnm7QNo5mG24Z eNsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tpvOOssE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k20si13786967ejq.621.2020.07.07.00.45.23; Tue, 07 Jul 2020 00:45:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tpvOOssE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727834AbgGGHpL (ORCPT + 99 others); Tue, 7 Jul 2020 03:45:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgGGHpL (ORCPT ); Tue, 7 Jul 2020 03:45:11 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36E52C061755 for ; Tue, 7 Jul 2020 00:45:11 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id z5so19619049pgb.6 for ; Tue, 07 Jul 2020 00:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=dUYmHO3l6du1f9FFjttJ6TgJ0e7C+7Hg2PXGcNYn718=; b=tpvOOssExX/L5tReYEOnayLhzrOqLhiBf21JB+Il0QLrCjYENTxDY71ob23denpAg9 DeGuaDEAUjf2J2YjArk30Smyu1juNDm8RL2tDJgXp5yBUMPMZ1zk+UegFKhJKnBEu35m uMiREppcHMabiRYS1itPwzO0TTE5zmNEC0moeH4XNO3qn/y+c3rU+3AFfwcgXZky+0GT wAP4ahXIlor1atKM7LzYuP2a8CxL7zvEJJ9h9Fpi31ncHUAUq02f/pkKsdi1NEM4ht/+ Yc4Dkh9Y08H3EnkHxFaZ70A4gzEw6zMWCc5IVCnS0Ncw/KF2j4CSajhOzcduaaUnMRTW hYqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dUYmHO3l6du1f9FFjttJ6TgJ0e7C+7Hg2PXGcNYn718=; b=n+zMRnga6WT868vUeVkR9TQS8fWaNKrV76ojHQrOiE68DmEzQBM8V/9S3u2AqDOfVR fqJ/xpx+PLLH6tnwtcN0xWWgMv01IzHoDog0XF3oELptKiWi3QsVeWCKagI1cJufF2cv a08MPsQ96nC3v6jbH/BrjEwR1Lmpx0eq1VHDzy1HBK4hSGzbBfBCp1ZpPXh54R2FjNyP xS29vpZnlGzqJwLC9VIwieXIEal+f2ipqsYNyi4m0qIpWi4ddS0SSdAqYSOTV8SJKFFS cpAENerm1LCMbY2kGLn6TymBQO/NpesVamr1uGDuO7kFkZkhNkK4cKizIjqXvbN/NBgh ZTxg== X-Gm-Message-State: AOAM530MyjxLBPjMBORAOV0O79blI9x2FVsNX/5fjepIxHVFeKxcELWe Um2HWbMLzZOYB5Z2nBha/UE= X-Received: by 2002:a62:8688:: with SMTP id x130mr48229390pfd.280.1594107910659; Tue, 07 Jul 2020 00:45:10 -0700 (PDT) Received: from localhost.localdomain ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id 191sm21330151pfw.150.2020.07.07.00.45.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jul 2020 00:45:10 -0700 (PDT) From: js1304@gmail.com X-Google-Original-From: iamjoonsoo.kim@lge.com To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, Vlastimil Babka , Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi , Michal Hocko , Joonsoo Kim Subject: [PATCH v4 00/11] clean-up the migration target allocation functions Date: Tue, 7 Jul 2020 16:44:38 +0900 Message-Id: <1594107889-32228-1-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joonsoo Kim This patchset clean-up the migration target allocation functions. * Changes on v4 - use full gfp_mask - use memalloc_nocma_{save,restore} to exclude CMA memory - separate __GFP_RECLAIM handling for THP allocation - remove more wrapper functions * Changes on v3 - As Vlastimil suggested, do not introduce alloc_control for hugetlb functions - do not change the signature of migrate_pages() - rename alloc_control to migration_target_control * Changes on v2 - add acked-by tags - fix missing compound_head() call for patch #3 - remove thisnode field on alloc_control and use __GFP_THISNODE directly - fix missing __gfp_mask setup for patch "mm/hugetlb: do not modify user provided gfp_mask" * Cover-letter Contributions of this patchset are: 1. unify two hugetlb alloc functions. As a result, one is remained. 2. make one external hugetlb alloc function to internal one. 3. unify three functions for migration target allocation. The patchset is based on next-20200703 + revert v3 of this patchset. git revert ddc017c727e429488cccd401a7794c8152e50a5b~1..583c2617fd3244fff79ba3b445964884c5cd7780 The patchset is available on: https://github.com/JoonsooKim/linux/tree/cleanup-migration-target-allocation-v4.00-next-20200703 Thanks. Joonsoo Kim (11): mm/page_isolation: prefer the node of the source page mm/migrate: move migration helper from .h to .c mm/hugetlb: unify migration callbacks mm/hugetlb: make hugetlb migration callback CMA aware mm/migrate: clear __GFP_RECLAIM for THP allocation for migration mm/migrate: make a standard migration target allocation function mm/gup: use a standard migration target allocation callback mm/mempolicy: use a standard migration target allocation callback mm/page_alloc: remove a wrapper for alloc_migration_target() mm/memory-failure: remove a wrapper for alloc_migration_target() mm/memory_hotplug: remove a wrapper for alloc_migration_target() include/linux/hugetlb.h | 28 ++++++++++++------- include/linux/migrate.h | 34 +++++------------------ mm/gup.c | 60 +++++------------------------------------ mm/hugetlb.c | 71 +++++++++++++++++++------------------------------ mm/internal.h | 9 ++++++- mm/memory-failure.c | 15 +++++------ mm/memory_hotplug.c | 42 +++++++++++++++-------------- mm/mempolicy.c | 29 +++++--------------- mm/migrate.c | 59 ++++++++++++++++++++++++++++++++++++++-- mm/page_alloc.c | 8 ++++-- mm/page_isolation.c | 5 ---- 11 files changed, 163 insertions(+), 197 deletions(-) -- 2.7.4