From patchwork Tue Feb 27 13:52:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 207224 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2707341dyb; Tue, 27 Feb 2024 05:53:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUBpQgwyYl7GNbJseL4vQCXhX+x6RVEKvZHJWtCRFLqSwsWhsDhWsrKqt9stt7IbNw0xzkLS/DfRAdZMjPUY9NF1h9G1g== X-Google-Smtp-Source: AGHT+IHZgCdKVdZCo5Kc5B9khDyY/hGiV4SYYRoZqzXIWmazrDLU4C+1wY8wQFwy06j5tr9pj0Ci X-Received: by 2002:a17:907:b9c7:b0:a3f:da1c:ae4c with SMTP id xa7-20020a170907b9c700b00a3fda1cae4cmr7208413ejc.54.1709042034010; Tue, 27 Feb 2024 05:53:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709042033; cv=pass; d=google.com; s=arc-20160816; b=t8LNeWIzavwDzBLFpijk94W5ES6VcAi8Mak497UE+2edOmPRbfW0UdfiFssXRUyJIJ lruslPv1Gs8LmyUlB5o/DZUonvkoBUlmxPnNPqebpWOhFtOQA96UbPnF/FXKevHlBN+8 3pOqxVVvnSP6UAW+5awtTw9PzZtDRAMooV2Psmx6KB1MINHbmL+CQcOKB+V7twG3NfpD umb33u3V6s8yyiW67uwgjalCDfwPl3SZwB8KG2NYI0okhGfSW6nsAmTK92e77RY7OojY yD8DDmJUWYBJdwlA336oUMPEgN6jDH+8dAqBjoIQDOArQMBFoIGA9sgBPyQphb4d9YjB wOyA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=jQS6ixAjVk0AC8cKYwTBDAm2HkLKEDsUdifzfOmBcs0=; fh=Eg1bbkMBB2FpJxkcjuowRNwwz/msSkRTpuEVSvFESpg=; b=KgeVwS64H69p1QCLwaSt3bpyZ6tkmjGpBEEojh+fuG0Uwp4KUzw6vUBw9Iwy3uATFN 8TWf3vtBZ6oDE8MeLoP0ZMmR11DIh3KzzJPSR+805SgEEwb7Rp5RzcsTbjReBMhRofd2 hMEkNsJ37jPuHkmImgSpfGlibPqckHBh1aNYJ1H/sDpme/IEHmxwLULQsLg/kvILEPdy TBxtCYwZwC0M/A/FbqpGsBiSXuklMAt5HrUlLrzU3Hs2duKscxT6UIZvAEzOICd+QMBv GmSwbKcbSyjZqkgzmK/xOR6HqCVK6WoqOfaOxciwZekGA69h2d/0g9HRwwuiy5aL5mM8 xlxw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=i3R9bWJt; 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-83354-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83354-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e21-20020a1709062c1500b00a43115d5551si745370ejh.678.2024.02.27.05.53.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 05:53:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83354-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=i3R9bWJt; 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-83354-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83354-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9D7F51F227BF for ; Tue, 27 Feb 2024 13:53:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65D58145FFF; Tue, 27 Feb 2024 13:52:45 +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="i3R9bWJt" Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) (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 862601420A6 for ; Tue, 27 Feb 2024 13:52:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.133 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709041962; cv=none; b=DROcn0oUVdUzm0cIhDYShct/P36vURNviLqtPqTM7GX8Rq48sfssUTZWWgmiqRVMJHi9zJIs8iXUo3xlyGJRUbl7v7sg56/jpOOoUcLCIxyCpjDNoN8et6dpl2W2QEg+9voR0ZHnwbNXr4GE0LxEHno6hAgdcG4VWHugDN+iXH0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709041962; c=relaxed/simple; bh=MzCC0AE/rUvpEAo4tb5cVZ7cGsewHKgZszzxyYlWgms=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Mm6ZPQUvEYWEJ7T9IXqE567dVnRCipA6ACoCMHuEqgvT3NPhRb2zP6XLDUetsTUPKjZTElYOwM3qPcCXAg3ZQNrePvxr1RvMmzXDb69CmMd0zlbh02XTkJbtvNSEVNdVkUNQXbYRWxmjfIchXvVrQwm9CP3DFa+MUxYI38fw2BM= 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=i3R9bWJt; arc=none smtp.client-ip=115.124.30.133 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=1709041958; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=jQS6ixAjVk0AC8cKYwTBDAm2HkLKEDsUdifzfOmBcs0=; b=i3R9bWJt363GKWx5GJRWr6i7VTUoUN3mS7947TEsH0hIcPK9mpi1+rMe+1g2owwUwln/HU+E6tUx4cawEmaXKdIRCNoLh0rkLpUPx8UyCcJaDbTe3bEqJXJkY075nXPZqJzsj3GBiw8iLlmJXH9q9l2GzFLDDFezrn+NrbmgHMs= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0W1MvL.r_1709041957; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0W1MvL.r_1709041957) by smtp.aliyun-inc.com; Tue, 27 Feb 2024 21:52:37 +0800 From: Baolin Wang 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: [PATCH 3/3] docs: hugetlbpage.rst: add hugetlb migration description Date: Tue, 27 Feb 2024 21:52:27 +0800 Message-Id: <574e5bfbaa2b6930aad4a64e1c3da25c4ee5c9ee.1709041586.git.baolin.wang@linux.alibaba.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792060459581485126 X-GMAIL-MSGID: 1792060459581485126 Add some description of the hugetlb migration strategy. Signed-off-by: Baolin Wang --- Documentation/admin-guide/mm/hugetlbpage.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/admin-guide/mm/hugetlbpage.rst b/Documentation/admin-guide/mm/hugetlbpage.rst index e4d4b4a8dc97..f34a0d798d5b 100644 --- a/Documentation/admin-guide/mm/hugetlbpage.rst +++ b/Documentation/admin-guide/mm/hugetlbpage.rst @@ -376,6 +376,13 @@ Note that the number of overcommit and reserve pages remain global quantities, as we don't know until fault time, when the faulting task's mempolicy is applied, from which node the huge page allocation will be attempted. +The hugetlb may be migrated between the per-node hugepages pool in the following +scenarios: memory offline, memory failure, longterm pinning, syscalls(mbind, +migrate_pages and move_pages), alloc_contig_range() and alloc_contig_pages(). +Now only memory offline, memory failure and syscalls allow fallbacking to allocate +a new hugetlb on a different node if the current node is unable to allocate during +hugetlb migration, that means these 3 cases can break the per-node hugepages pool. + .. _using_huge_pages: Using Huge Pages