Message ID | 20220714042420.1847125-2-naoya.horiguchi@linux.dev (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 11C15C43334 for <linux-mm@archiver.kernel.org>; Thu, 14 Jul 2022 04:24:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 78B27940170; Thu, 14 Jul 2022 00:24:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 712D4940134; Thu, 14 Jul 2022 00:24:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B3D7940170; Thu, 14 Jul 2022 00:24:37 -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 47569940134 for <linux-mm@kvack.org>; Thu, 14 Jul 2022 00:24:37 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 1EB04602D3 for <linux-mm@kvack.org>; Thu, 14 Jul 2022 04:24:37 +0000 (UTC) X-FDA: 79684414194.23.D1EF731 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf14.hostedemail.com (Postfix) with ESMTP id AD72810006A for <linux-mm@kvack.org>; Thu, 14 Jul 2022 04:24:36 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1657772675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CM1fnHF5+SZu84iYIKJ8/xtAtt5Of29zh4flgmzpzHg=; b=BwviJmTV1NrutOKVW7t2ZR6/VQYai6/hAH0p6/moeb7eViAcHkhWJ74cRMf/BH6aWMBfOt JTXER4Pykc+d0ZrjjBIFmZ9MbvYJR0obkimJH7iVtGyJTVv3Re+3nv86VDVzq29/4mFDg3 m+chYuz91PWa0PJiptIsKIaUEdj78/w= From: Naoya Horiguchi <naoya.horiguchi@linux.dev> To: linux-mm@kvack.org Cc: Andrew Morton <akpm@linux-foundation.org>, David Hildenbrand <david@redhat.com>, Mike Kravetz <mike.kravetz@oracle.com>, Miaohe Lin <linmiaohe@huawei.com>, Liu Shixin <liushixin2@huawei.com>, Yang Shi <shy828301@gmail.com>, Oscar Salvador <osalvador@suse.de>, Muchun Song <songmuchun@bytedance.com>, Naoya Horiguchi <naoya.horiguchi@nec.com>, linux-kernel@vger.kernel.org Subject: [mm-unstable PATCH v7 1/8] mm/hugetlb: check gigantic_page_runtime_supported() in return_unused_surplus_pages() Date: Thu, 14 Jul 2022 13:24:13 +0900 Message-Id: <20220714042420.1847125-2-naoya.horiguchi@linux.dev> In-Reply-To: <20220714042420.1847125-1-naoya.horiguchi@linux.dev> References: <20220714042420.1847125-1-naoya.horiguchi@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657772676; a=rsa-sha256; cv=none; b=Q00T8LcCnHt9KJgg920OZ0G3Gx4OvxnSvr8J0vI0WRuMQ0oEi7Zlzo0o+EApJoL/8C5FVc L4gK48jQL/nNEp8cOhp7iD9QioPyl8rHt9i3zwEK8imKq/VuL1xcJ8GixPniWkP+BuC9fy PpAI8r64EuUDoQazmukC7qhtYp9Tkts= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=BwviJmTV; spf=pass (imf14.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657772676; 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=CM1fnHF5+SZu84iYIKJ8/xtAtt5Of29zh4flgmzpzHg=; b=fPhCxuwm7tsD7krjfx8Ai6PIvoDbloSH/NEobUpJ/XkXgSdSSSI1PiOs9CiVGhm9CQ5nt0 FQx7jtELKEqyWuNWfH5KG6gJXek4qeGtBKc0PPrcNkGl3yqQfquJzT3Cnm6zy1+jD39Vk+ kd76V1v9OwGe5LHIGjYIpX5FQLtrBBI= X-Rspamd-Queue-Id: AD72810006A Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=BwviJmTV; spf=pass (imf14.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Rspamd-Server: rspam02 X-Rspam-User: X-Stat-Signature: zyb7hf7mjkr8ib4wumx7u94fo4c5re36 X-HE-Tag: 1657772676-991871 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, 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, hwpoison: enable 1GB hugepage support (v7)
|
expand
|
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index a4506ed1f1db..cf8ccee7654c 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2432,8 +2432,7 @@ static void return_unused_surplus_pages(struct hstate *h, /* Uncommit the reservation */ h->resv_huge_pages -= unused_resv_pages; - /* Cannot return gigantic pages currently */ - if (hstate_is_gigantic(h)) + if (hstate_is_gigantic(h) && !gigantic_page_runtime_supported()) goto out; /*