Message ID | cover.1708507022.git.baolin.wang@linux.alibaba.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-74402-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp926541dyc; Wed, 21 Feb 2024 01:29:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVKrrTpdCNwveFZCzpKjfYi901MoKzCDqY1F0nKhIVcy54KnbD5FVulEttkVD1YQfrU81UzeM3Grj8o3b7qzq+Dw9ka2w== X-Google-Smtp-Source: AGHT+IGlDGuCr4t773KcGLt3IsjP500+fCOmqDFDIGC7T2OFDaDYZtQOxy6pGjkkNA1VI7g0TCXZ X-Received: by 2002:a05:622a:54e:b0:42d:d95d:5d3 with SMTP id m14-20020a05622a054e00b0042dd95d05d3mr21455124qtx.13.1708507793958; Wed, 21 Feb 2024 01:29:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708507793; cv=pass; d=google.com; s=arc-20160816; b=a/F73Kc2ZF5iHBdfCUCPr9CtBPwtX3lYQ4lch19+m6XwkNDSGuCWGLQPV0gr1jONOi 2BlEKNRynApART0ByoZBFimK8IAUjRdLvMg65MG8pcyaj44TlbxPqenXGhmTcZuXXSSV qSiSCViaQ0ZIlhDuh3MmYRhf3KfYOttsAtzDxkqYwhYkKn9rK3lCgYJzPb3KhM6w1KyA tlBS9c7MrFENLBoDxWfi1DYEpOPzyhkd5WivRQcmLYSABKlFh29PeQ2JJWw3CUK6S9R2 YEE+F2hRHA9TSmO+2VEGNBosjawOXBdf0Uvkbx1HCne/7acpY0tENZ4qXAadXis9jIk5 93kg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=R/jDsBhNjN3BwyEA1BOhHb8+crI49fZWr9saM6bffNI=; fh=Eg1bbkMBB2FpJxkcjuowRNwwz/msSkRTpuEVSvFESpg=; b=X/cbP1IURyE/LIDccuFU+cFazG9R4IAUMcYhJt4W+JDBS5PNUZAoOaAYtrML0OV1ja G2aHj0fd+HIcXHYycCGdQJLU7tRcdk9F0vJBHbziDEAy+F/Uh63Zj2rw0WYSPOQm1rjR YUfWkyEQWZEwvsHI4vj0XA4X3tALIaTMI49MqbZVKDSSa/T5HuG8VqfbSi68CMud5Oba wQisUIBGE1CQyYJbvkZiwRlw4Wcz0hw+urx8dtlkRO/Igg+1DJKiBetgdswqvQdgxLfw s8iV9+d57zMK0bgHepd3aYbobFAEFDuZa+d9px5c4L55x1owmnnnebQjyp/t/nQv1I0Z F6Pg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=iP6DBYRf; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-74402-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74402-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p1-20020ac84601000000b0042c5c7dd314si2553506qtn.272.2024.02.21.01.29.53 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 01:29:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74402-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=iP6DBYRf; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-74402-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74402-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A73CC1C21334 for <ouuuleilei@gmail.com>; Wed, 21 Feb 2024 09:29:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C13A3F8FE; Wed, 21 Feb 2024 09:28:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="iP6DBYRf" Received: from out30-119.freemail.mail.aliyun.com (out30-119.freemail.mail.aliyun.com [115.124.30.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E68D23D995 for <linux-kernel@vger.kernel.org>; Wed, 21 Feb 2024 09:28:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.119 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708507694; cv=none; b=p8bXm41CZrGg8wSdxWBL4y5679y/Y3Lvd8bQUhhZSkrShntnOW7jg8dyqAe95mO84TqsbdXRVca860KVNa1lERxAXn8B4IgS8qxwe87GvjXOOBWInHWli8cS5IYXL1UiNILkhoMVaCiGtr6LSUXtFZFjLKTCIR87TBNfiPwFrfM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708507694; c=relaxed/simple; bh=xGOSTdXDYUi+SjIBZYAGjzSV7++NmcYSboolnpaIb6U=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=NCnWG7Vh395Xx/iMER4M3MUMFz0/Jp7l+tF+uSbB+CM0B1RtgxwW6v5Wgl7eEYWKPbVpVnEinSeZ531DFg7Hi/UYlIcmQ9YsGBbnd+zXPN2YDFnB7X5TinfpvZMcPNkXcR4/ENf96TuIYFQgdVwXmzXz7vS1/XjL7L0gIRNxTkc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=iP6DBYRf; arc=none smtp.client-ip=115.124.30.119 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1708507684; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=R/jDsBhNjN3BwyEA1BOhHb8+crI49fZWr9saM6bffNI=; b=iP6DBYRfHSg1l+PmxlHF3+SSdn3JZBG+7VApp8GGkLd1rj2W9PpGpZZrT2E9AhOzrKbPUq/4iDxtaW+h7qJeuOMGxqcu/6uAun7vUij+8QPnK4lRJydUkdgHzr3lOhndL7lJgWa0/WFU4evMlGtWLc4mm6H2V0we3MWovOTF8Og= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0W0zUu5Y_1708507682; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0W0zUu5Y_1708507682) by smtp.aliyun-inc.com; Wed, 21 Feb 2024 17:28:03 +0800 From: Baolin Wang <baolin.wang@linux.alibaba.com> To: akpm@linux-foundation.org Cc: muchun.song@linux.dev, osalvador@suse.de, david@redhat.com, linmiaohe@huawei.com, naoya.horiguchi@nec.com, mhocko@kernel.org, baolin.wang@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/3] make the hugetlb migration strategy consistent Date: Wed, 21 Feb 2024 17:27:52 +0800 Message-Id: <cover.1708507022.git.baolin.wang@linux.alibaba.com> X-Mailer: git-send-email 2.39.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791500269030652009 X-GMAIL-MSGID: 1791500269030652009 |
Series |
make the hugetlb migration strategy consistent
|
|
Message
Baolin Wang
Feb. 21, 2024, 9:27 a.m. UTC
Hi, As discussed in previous thread [1], there is an inconsistency when handling hugetlb migration. When handling the migration of freed hugetlb, it prevents fallback to other NUMA nodes in alloc_and_dissolve_hugetlb_folio(). However, when dealing with in-use hugetlb, it allows fallback to other NUMA nodes in alloc_hugetlb_folio_nodemask(), which can break the per-node hugetlb pool and might result in unexpected failures when node bound workloads doesn't get what is asssumed available. This patch set tries to make the hugetlb migration strategy more clear and consistent. Please find details in each patch. [1] https://lore.kernel.org/all/6f26ce22d2fcd523418a085f2c588fe0776d46e7.1706794035.git.baolin.wang@linux.alibaba.com/ Baolin Wang (3): mm: record the migration reason for struct migration_target_control mm: hugetlb: make the hugetlb migration strategy consistent docs: hugetlbpage.rst: add hugetlb migration description Documentation/admin-guide/mm/hugetlbpage.rst | 7 +++++ include/linux/hugetlb.h | 4 +-- mm/gup.c | 1 + mm/hugetlb.c | 28 ++++++++++++++++++-- mm/internal.h | 1 + mm/memory-failure.c | 1 + mm/memory_hotplug.c | 1 + mm/mempolicy.c | 3 ++- mm/migrate.c | 3 ++- mm/page_alloc.c | 1 + mm/vmscan.c | 3 ++- 11 files changed, 46 insertions(+), 7 deletions(-)