Message ID | 20220712032858.170414-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 E703FC433EF for <linux-mm@archiver.kernel.org>; Tue, 12 Jul 2022 03:29:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6930594003B; Mon, 11 Jul 2022 23:29:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 63ECF940033; Mon, 11 Jul 2022 23:29:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5091494003B; Mon, 11 Jul 2022 23:29:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4109C940033 for <linux-mm@kvack.org>; Mon, 11 Jul 2022 23:29:16 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 165C7DF1 for <linux-mm@kvack.org>; Tue, 12 Jul 2022 03:29:16 +0000 (UTC) X-FDA: 79677017112.12.46D29D9 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf21.hostedemail.com (Postfix) with ESMTP id 9680A1C006E for <linux-mm@kvack.org>; Tue, 12 Jul 2022 03:29:15 +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=1657596554; 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=Qw9Kx75SK2sQqCQw3LJVjuJtWxB8ovDXqDoTSOtRndir1tn516UMQMG3nU/8e/Dm505R7I HhMD/Y3cmAF7i62a5ndRv46w9ykSpU8ob6frxX+RO35ASevCNRQhY9+BenacoXSS8qybxf JcBsVok4+syc8HsdzY/6NcGXpF3jIGE= 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 v6 1/8] mm/hugetlb: check gigantic_page_runtime_supported() in return_unused_surplus_pages() Date: Tue, 12 Jul 2022 12:28:51 +0900 Message-Id: <20220712032858.170414-2-naoya.horiguchi@linux.dev> In-Reply-To: <20220712032858.170414-1-naoya.horiguchi@linux.dev> References: <20220712032858.170414-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-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Qw9Kx75S; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf21.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657596555; 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=1jOawdWt2D9pa/kdlClOPutYibYO2q8b4g0bOuyPxdmcxBW/z4Biv1Wu4yXz+rU7k12FU7 8YnE+Qo5yKlySzk5BMH7kpK6FJQZHKWprbJvrUfArhD4M0Ez0pBvoXIQ5nCTvZCDcDBndi bajJWxeGIvpObSsukftOsIpAgdZX7RU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657596555; a=rsa-sha256; cv=none; b=VRriz21wwuZLO/DVvcdOJzK4iMBQS9NrdlKz48lBjBmubw+P8U8jHePfDFxwQcrAoCkdW0 dm++j89r7OTm3sCFcWzowZ0orEg/tY+u30++RigozkKqhrvcbR1RqYjJ8z9mLK6qVEa4iu Ib1jLVPOfCxFABxfw9bv17w7Kg02NiI= Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Qw9Kx75S; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf21.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev X-Rspamd-Server: rspam06 X-Rspam-User: X-Stat-Signature: aixonog8wfyip14mzo7tmos98ax4g14z X-Rspamd-Queue-Id: 9680A1C006E X-HE-Tag: 1657596555-46423 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 (v6)
|
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; /*