Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp758776ybh; Sun, 12 Jul 2020 23:43:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV8u0Za0a2wVTgZZXX7GhrzyMhlZPD7d14xGqMpindzoDuBfqVGCB2JdZNk+FyZnYOcszQ X-Received: by 2002:a17:906:95d6:: with SMTP id n22mr72477770ejy.138.1594622582180; Sun, 12 Jul 2020 23:43:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594622582; cv=none; d=google.com; s=arc-20160816; b=dwaRTCFNbzUh4G8YaQyoYJbRRvWIZn/EdEQfVGsZhbv4wOOPrZZJ2gqjFhb/0DryEe 8qR0gTMh/1OILE88Fu/xDSvilXjL+RDnS3Vm7LZILvyku65ex1FrPDSGvtU2/epuV6YY tzuhkTbxhkD/UQ6l29+QacVxVr6n0817C8OkACXlKN0MH12R/nSsj4djdZ9zMC+h8Uhl hDwVXY+MW1TRvG4CPqe7FUArMqll+Q4m4IzNyVfGW9tFI+4InC/iCPV0zGC42MtUICai t0HxQ6Dqk1c/HPzr793pEK9JbyoNCZnzUCXZMVjdQXH3e4sxfvO/rXMIgoMwKwn+c50d BMHg== 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=xZcJpPVurLpF2R6ERLd9Bv0+pjW0oNaNoGLeOeK6As0=; b=bXWEB1qwAg2dGmGF7Cx1w0HsbA7aCWcycUQMlC/yeL7x81clg3lAMEOew1c3Somlkd N6/4dRMZJ5FeDheW2qQmJEMp1SpSAnhuU1Fw/4rtEQyp1eHW/dqU573WGlYG0aH6jqvB d/WQ5s5R80kTkBgcPYV6FHaFrMroaz+RHDgqc4zLZhjr2vnjBUH9PJ4mHxWfJX7JaeY0 B6a8D9drqTD9CzvRTB0aMdpTeSdZhIvY2kqaaFY/YekGQnQUPtbxZvolTj1OyQGEvgdh 6CHwSjd7oud4x9VVPt5rBL6x5J8ySJXPHFb6pgU0Fx+LDqJL6//iSirDxphnsOMnDyx0 GnmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hUq0akRx; 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 u17si9006158edy.254.2020.07.12.23.42.39; Sun, 12 Jul 2020 23:43:02 -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=hUq0akRx; 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 S1727035AbgGMGmR (ORCPT + 99 others); Mon, 13 Jul 2020 02:42:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbgGMGmR (ORCPT ); Mon, 13 Jul 2020 02:42:17 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07FD0C061794 for ; Sun, 12 Jul 2020 23:42:16 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id o13so5629775pgf.0 for ; Sun, 12 Jul 2020 23:42:16 -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=xZcJpPVurLpF2R6ERLd9Bv0+pjW0oNaNoGLeOeK6As0=; b=hUq0akRxK+b1u+RVUmJQqCczhkyfN73GCfrkypfbNaCa4Gk5cTtoEeVhZCesNkboGV j432akK6NnI8/tr8zgYn+1eKTb2lrT2fkAFO4y91K1jXKidR2oaDookctgCYz1CyoEvC cDo82JqQYerphv21fk1Ph96Ct1LLw0heBrN41PMUI3D6Rc3KfAPY7/YPgaJCQBli77Wm BLLnWynd5yebQS8mUsRp7h9MMeCOh1fhmGCFi12gCBpRb30ccEIvaM3PjeIqGS7FYuCp JHbFnd4lhBPgftC3ZscphoNV/sWui/zJ18BJYm9xx4q/5lwpl6zW2dn7q0VrbJOuC5ia J66Q== 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=xZcJpPVurLpF2R6ERLd9Bv0+pjW0oNaNoGLeOeK6As0=; b=JXazoDA/GzZ+vh9Ea27RKqfUCKCqeZVY4fc5yT17mnzlo/otXAMdl49brmxqWzGxhh liBc+GaBose6mdwG5Iq5ynToUQST4mmgRuNPzODOQGTF28O54hr176lz32vu1UKTodf/ ELemsud9QpMeP/wBL8Kw/rpP2YkZh3nkyVZXJMMUpMt15XXucWX9DcLyQfQa/BgYx8WN pq3nzp/ohDuA7+5CGsNgHyyNgLmOwF8qYUVOOB/Y8s5WycQB3mWCJNs6MM62xTiEQ+53 aAIXHHWRZqBr60/RZRguUfxKIPuSErAgpPRnQWAvMsBAQ9JA3IdUCt8su4q1wNqOqr4R QBLA== X-Gm-Message-State: AOAM532zl2h7iXLSxYDfFYhoqC4LAMPTTVysVbKW5ZYZB/cF2TnnK73k /I3DEQMFMure6ysCe3uowFUzCFUv X-Received: by 2002:a63:2b93:: with SMTP id r141mr67293886pgr.171.1594622536338; Sun, 12 Jul 2020 23:42:16 -0700 (PDT) Received: from localhost.localdomain ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id l134sm12448695pga.50.2020.07.12.23.42.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Jul 2020 23:42:15 -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 v5 0/9] clean-up the migration target allocation functions Date: Mon, 13 Jul 2020 15:41:48 +0900 Message-Id: <1594622517-20681-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 v5 - remove new_non_cma_page() related patches (implementation for memalloc_nocma_{save,restore} has a critical bug that cannot exclude CMA memory in some cases so cannot use them here. Need to fix them first.) - introduce a wrapper to handle gfp_mask for hugetlb use it * 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. remove one implementation for migration target allocaion 3. remove three wrapper for migration target allocation The patchset is based on next-20200703 + revert following commits. ddc017c727e429488cccd401a7794c8152e50a5b~1..583c2617fd3244fff79ba3b445964884c5cd7780 The patchset is available on: https://github.com/JoonsooKim/linux/tree/cleanup-migration-target-allocation-v5.00-next-20200703 Thanks. Joonsoo Kim (9): 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/migrate: clear __GFP_RECLAIM to make the migration callback consistent with regular THP allocations mm/migrate: make a standard migration target allocation function 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 | 41 +++++++++++++++++++++++++++++++-------- include/linux/migrate.h | 34 ++++++--------------------------- mm/hugetlb.c | 35 ++------------------------------- mm/internal.h | 8 +++++++- mm/memory-failure.c | 15 ++++++--------- mm/memory_hotplug.c | 42 +++++++++++++++++++++------------------- mm/mempolicy.c | 29 ++++++---------------------- mm/migrate.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++-- mm/page_alloc.c | 8 ++++++-- mm/page_isolation.c | 5 ----- 10 files changed, 137 insertions(+), 131 deletions(-) -- 2.7.4