Message ID | 20230730151606.2871391-3-usama.arif@bytedance.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68F7AC001DF for <linux-mm@archiver.kernel.org>; Sun, 30 Jul 2023 15:16:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 45FBF8D000B; Sun, 30 Jul 2023 11:16:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3E8958D000A; Sun, 30 Jul 2023 11:16:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2B0338D000B; Sun, 30 Jul 2023 11:16:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 1C2178D000A for <linux-mm@kvack.org>; Sun, 30 Jul 2023 11:16:15 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id C7914808EE for <linux-mm@kvack.org>; Sun, 30 Jul 2023 15:16:14 +0000 (UTC) X-FDA: 81068629068.19.2EA58FD Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by imf06.hostedemail.com (Postfix) with ESMTP id E5358180011 for <linux-mm@kvack.org>; Sun, 30 Jul 2023 15:16:12 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=JoxH10l1; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf06.hostedemail.com: domain of usama.arif@bytedance.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=usama.arif@bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690730173; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=VUFHsk/m/GY1eTNfZx8Py//rj4lEwu1OMjpML8i4XiA=; b=DozR6oP40928HxzVgP8STcpRbnP1ChauFL2drFdgvJ55mUx6x7bNl8fvJB+Pt/IS3DuOoJ fnGYXCsvM8rO8QvtmjBk5E3MbgsJdgwGrT56ReMttFH5nDTJUZjJG/6Mv4a8jnVQLyFBmk 977E/sAaiv0Ovkrk3smN+TPVwJm1t+I= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=JoxH10l1; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf06.hostedemail.com: domain of usama.arif@bytedance.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=usama.arif@bytedance.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690730173; a=rsa-sha256; cv=none; b=S02FZK3Yivh9/gY1/MRsI/3fL0/AJaUBnRiZnKoxaLc8Ln9xST7H/Rq/vTDezRnpzRlZf8 vieoMkH1EV9uM+ja5kgdtZON265RgVvffUYLJ4PhBufrPOP/SQqDJFuTdtHfstjBedt54f 6eVKN2uOiCkHjEpoCDY+PC52+OxIMqc= Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-3fbc5d5742bso41888805e9.2 for <linux-mm@kvack.org>; Sun, 30 Jul 2023 08:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1690730171; x=1691334971; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VUFHsk/m/GY1eTNfZx8Py//rj4lEwu1OMjpML8i4XiA=; b=JoxH10l13AhAr8ISmwB2i1gOf6hMfDgdag1NYZGf8eqVGmEdh4R3IE2D1prI5+wzm7 vu1QD7xvEBstHjEIbxAMlgCCO00ONBH3G5zPFMoDk4Drvk6SzML5WNLP4tfo6lnQh865 TX13dZrkIeWswvkw6xN/xmei3GAwgiUombSwNiUwcW22Vp57PvkxefJyTKdVVA+u+gzP VbGxb9p/bzQfa6R6GWeFqN5krmkkMZbJxyXakbPqdmWiMydGR5JelRYvQMAxOrQf62pU o4lWtSXohDF8KsxmkSED8zQCamat1slkfvH7Xda+Eyuy3MLasON3KHOua9umK5WY8Nob wW5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690730171; x=1691334971; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VUFHsk/m/GY1eTNfZx8Py//rj4lEwu1OMjpML8i4XiA=; b=gA9xHRxSuJ6L+703jJn9+b7PH+cPo/AGprTAAiU660DAS5JUjNvQRVgavL709zSxPT NAmxYk6B0S0Y7KBAFr7llDQqZyMy/RZcf7AA2h4YQC6ZWX8mv/hyxTb0Q5hmvGXdha2q 8ONe/H9YOkth+qbAWgaTu/omOamumwCLoPKpxTmJlNu+CwnWZE6frtbdbuIlfOa8szXN ykOqBzuElsnp8315dMITRwc+FkN9O14qVMUd2KoIH9yIL9YlJ9XR5pH1M32kPorY7a4A lU1YJkRH8P+hjesj/uy0BCqhuMvN80s3l2At+YxdDmLpheKyDGO3MS3GVWUekzZZk451 gZSw== X-Gm-Message-State: ABy/qLZW91LrRXJzJUZznk+hxJxxMatmLNa9/+ihjbq/kUFvT7vvSqOf aeEBeJbIuh83JoTdqXwh+AF88T1t15dV6SSEZIk= X-Google-Smtp-Source: APBJJlFtcqfY902vGXRLqPZchnNVVitcnCdU3eEgHgB4d1amxrHvfEkxn/i1iktNVcoW6QdeU+DsCA== X-Received: by 2002:a7b:cbd5:0:b0:3fe:1db2:5168 with SMTP id n21-20020a7bcbd5000000b003fe1db25168mr1370994wmi.11.1690730171283; Sun, 30 Jul 2023 08:16:11 -0700 (PDT) Received: from localhost.localdomain ([2a02:6b6a:b465:0:eda5:aa63:ce24:dac2]) by smtp.gmail.com with ESMTPSA id f17-20020a7bcc11000000b003fd2d33ea53sm9123027wmh.14.2023.07.30.08.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jul 2023 08:16:10 -0700 (PDT) From: Usama Arif <usama.arif@bytedance.com> To: linux-mm@kvack.org, muchun.song@linux.dev, mike.kravetz@oracle.com, rppt@kernel.org Cc: linux-kernel@vger.kernel.org, fam.zheng@bytedance.com, liangma@liangbit.com, simon.evans@bytedance.com, punit.agrawal@bytedance.com, Usama Arif <usama.arif@bytedance.com> Subject: [v2 2/6] mm: hugetlb_vmemmap: Use nid of the head page to reallocate it Date: Sun, 30 Jul 2023 16:16:02 +0100 Message-Id: <20230730151606.2871391-3-usama.arif@bytedance.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230730151606.2871391-1-usama.arif@bytedance.com> References: <20230730151606.2871391-1-usama.arif@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E5358180011 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: tcxapm14ia7695nib6xqrxmbzxcomnrc X-HE-Tag: 1690730172-424853 X-HE-Meta: U2FsdGVkX19dTkGuUUDvwLcLLZ5HkRKs15po3fO6ogQOzoLUTItcn+ZZaKxSBtSp3nmx7Roy4omryXiD0UHKCIirzMX3WWWYkRs2VOGjGuN+YroMM/CXgZCYsTblH00K5AhpN2mg9vkb8xo+kEtBHk9ChU3kNx1aUHNY2YvusC6fbGY671/v/uFgFrAake8Wy1r4EHAibprpIHDYJpo+hMVlE+iyMzfIa7ExWXK+IsCOgLV+ggJboiaCzIOPG+KVv54CZT1cv2sKZ6nvQ8TPgYIEcB2C27STOwvd9YBr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R1n8whfflX55yj4PI/xXA48jsSzrrRGyvH0nAPVM1nAnybscmAvqN+oci3BkoYDnPKQBf6FbCsMhkaaog9hF1g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.004784, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
mm/memblock: Skip prep and initialization of struct pages freed later by HVO
|
expand
|
diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c index b721e87de2b3..bdf750a4786b 100644 --- a/mm/hugetlb_vmemmap.c +++ b/mm/hugetlb_vmemmap.c @@ -324,7 +324,7 @@ static int vmemmap_remap_free(unsigned long start, unsigned long end, .reuse_addr = reuse, .vmemmap_pages = &vmemmap_pages, }; - int nid = page_to_nid((struct page *)start); + int nid = page_to_nid((struct page *)reuse); gfp_t gfp_mask = GFP_KERNEL | __GFP_THISNODE | __GFP_NORETRY | __GFP_NOWARN;
If tail page prep and initialization is skipped, then the "start" page will not contain the correct nid. Use the nid from first vmemap page. Signed-off-by: Usama Arif <usama.arif@bytedance.com> --- mm/hugetlb_vmemmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)