From patchwork Wed Feb 21 09:27:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 204060 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp926405dyc; Wed, 21 Feb 2024 01:29:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXqAwZA/yJ5AOKdzQL/0BPrmAJoVCgj46k4wS1KXV0h6eQzOWuVPvKPfQoisOHEaG53eTnIzvk9CdFWQ4ZoW4o+sdh3tg== X-Google-Smtp-Source: AGHT+IEKaa0VRI41PBaexBqKbx7idUUOJ5SIzBHpy/7a2DfxBFa6HTRy3LAYryQnOpNzSn+jGLRr X-Received: by 2002:a05:6808:1646:b0:3c1:3427:fef3 with SMTP id az6-20020a056808164600b003c13427fef3mr22956818oib.48.1708507767787; Wed, 21 Feb 2024 01:29:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708507767; cv=pass; d=google.com; s=arc-20160816; b=KXPK0X2lKhGe3RxmFUx2kBES4BthcvZ+fJDT/eAbO901h+vUxoJ3jDxuQMBsUwQQ4f k6iEjokar5WwROuOTJEf9DynE5x6Qy33fQNT0ATqI1LaGV9gy7T/shWH9/dB085m9HkR FyZWTR0rDsgOTO5SYwiDaLNoJ97TAhWC8M9Vhzodu2YeBzxXG5yftpFny+QL3vW+yshz TCXLp81groVcmVJDQLmAC6PoLLiKz6tXDUmgTf60vo7GUbuKDr0hqTnwutmeDRgpnhNB W9ValxkY6aZ6TSdWnPY0Od6nRFB5y2T+THaD3OkefL4MxwH56wom+YDDY8h9ANr9HxF6 9wvw== 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=m3nqGI/fMVZjL40459w/MnS9DkbLdhc8HEWPtY+H0PM=; fh=Eg1bbkMBB2FpJxkcjuowRNwwz/msSkRTpuEVSvFESpg=; b=LotWfJLZIePI8kUJwfrhRk80buV6+1C9KBfwflB9JbPzQ8SLDfWIMwt6iuO7oISwz7 FAdALBgfnWTdOon3n8FHGR4ftKpJvWxUxmZxRmWdZz+Knn1H+YpxTx09hcR62hFRrkUl PZZFT5Y+Ffa7BPdZzVvwQ4yO9xbnPK4uHymHhcCzb7T5yhjHo1AeK3h+rL2T6zsrijlL M4vNWWJPZCt+iZUl4I9rsWTPJO2x8afRpP8AlFEO5DYrRE05sr5/G+OBu/OGFP2Itk0e fAnqAd/rDwQEdoFY3G+ft72OBKERG1HJ8EZNjgiigcRluXFF4WeeVTYTx35kVGjZk8Gu CwEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=tbf261B3; 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-74400-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74400-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j3-20020a654283000000b005dccf9a43ccsi7775363pgp.202.2024.02.21.01.29.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 01:29:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74400-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=tbf261B3; 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-74400-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74400-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 946BE28377A for ; Wed, 21 Feb 2024 09:29:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C1EB3EA89; Wed, 21 Feb 2024 09:28:15 +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="tbf261B3" Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) (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 385563D556 for ; Wed, 21 Feb 2024 09:28:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.100 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708507692; cv=none; b=I45oBCvl+XBPXOHK/Vv9n4xd6GwCOC5OB9fv+I4/4fqPTIl11NUZKweSlETKygE+RECljTXSae7p9aO2NRwm3f6yssGivnFHp0AtFJ77Kx8RzaSb5suIe5c9y2XirOF5x9c9nUKAyqhv2fD3OcsJP6zi1tBr/b+bl+Lv3raiqw8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708507692; c=relaxed/simple; bh=x2riKMYmISimOeooDuvtdgn5hEARkXgRbBvuG4j/oVE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=K5njrrUZFu41YuUz+xE7cC411/Y/93OgTuPToE9ZWjvWgq9A+pPuRCo19TTc0+AqzbdMkexDWx5b6JMBbv5pLZnB3/8r2S9dfUUsfvkgQqJcG6EUEMWsjSSa92RTnFYmqTp+tMSREalNU5MsX1Sy3E4WZDkq0eqxfpI8tx2H6ao= 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=tbf261B3; arc=none smtp.client-ip=115.124.30.100 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=1708507687; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=m3nqGI/fMVZjL40459w/MnS9DkbLdhc8HEWPtY+H0PM=; b=tbf261B3zP1aJ8GoO26ZLScrCldl7dzZMaMeJlr4A0bIl/eqetArzNNTiOsFE+fOf/P1yNqrhbc01ou4qQRZMWJoVnjJ3soxij/rRObHr6LyXu5wk8ViEdZ/Bm1Q1GVHnL3JyQopwO4VLGTofhfHTP+Uxm8md5XHJXiDpx/ZCk0= 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=ay29a033018046050;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0W0zShrU_1708507686; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0W0zShrU_1708507686) by smtp.aliyun-inc.com; Wed, 21 Feb 2024 17:28:06 +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: [RFC PATCH 3/3] docs: hugetlbpage.rst: add hugetlb migration description Date: Wed, 21 Feb 2024 17:27:55 +0800 Message-Id: <75b80937a84bd98211cea0607707bfdee8cb5873.1708507022.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: 1791500241131446664 X-GMAIL-MSGID: 1791500241131446664 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..68d7bc2165c9 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, move_pages), alloc_contig_range() and alloc_contig_pages(). Now +only memory offline, memory failure and syscalls allow fallback 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