Message ID | 20220628132835.8925-11-linmiaohe@huawei.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 9BC9ECCA479 for <linux-mm@archiver.kernel.org>; Tue, 28 Jun 2022 13:28:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9EE8B8E000A; Tue, 28 Jun 2022 09:28:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 92CFC8E0009; Tue, 28 Jun 2022 09:28:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 61D178E000A; Tue, 28 Jun 2022 09:28:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 446DD8E0007 for <linux-mm@kvack.org>; Tue, 28 Jun 2022 09:28:48 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 25E2F352C7 for <linux-mm@kvack.org>; Tue, 28 Jun 2022 13:28:48 +0000 (UTC) X-FDA: 79627724736.30.6479083 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf27.hostedemail.com (Postfix) with ESMTP id 1DD3840030 for <linux-mm@kvack.org>; Tue, 28 Jun 2022 13:28:46 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4LXQNN1VVjz1L8Vy; Tue, 28 Jun 2022 21:26:28 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 28 Jun 2022 21:28:42 +0800 From: Miaohe Lin <linmiaohe@huawei.com> To: <akpm@linux-foundation.org> CC: <shy828301@gmail.com>, <willy@infradead.org>, <zokeefe@google.com>, <songmuchun@bytedance.com>, <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <linmiaohe@huawei.com> Subject: [PATCH v2 10/16] mm/huge_memory: check pmd_present first in is_huge_zero_pmd Date: Tue, 28 Jun 2022 21:28:29 +0800 Message-ID: <20220628132835.8925-11-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220628132835.8925-1-linmiaohe@huawei.com> References: <20220628132835.8925-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656422927; a=rsa-sha256; cv=none; b=UNiWtWpATJ9FQ7YHpNzW1jqcqeMCFuaM3xVTTjsp477kv29pwolJ4Z3XryQDAmQxgnVYwy MLlSqVujckoKVVKKg3uTVU5nZojuk2MX482vf0Ux7paxHgPrpe148jwtUyd6Lnsdt5GY4m hmZHAy+FchGl0XoWuX6wCac2NqNZq80= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf27.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656422927; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ov5V1IijnivfSbRK2t3YxqwmWEWJ/UmjMAfIm/UGGqY=; b=zqNCXDZn/3PzXT+tK2C76ZP+QCJkZbR5cQAaOlCKO8u594CLJeKi+yIwQQ/d6807Gtv+cW s/mjq2sIN8Wrl75F3y++6zxtkDwyn7gXzbdWuA1rsXLAGaVTWCDdZseVwa3mEWbNOXGTZT 55UQ5ZO7ELTMC0INTmWJZCoARfdllJc= X-Stat-Signature: gk8dr8aga434c5cs7etrpo8c6z489gao X-Rspam-User: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 1DD3840030 Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf27.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-HE-Tag: 1656422926-231500 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 |
A few cleanup patches for huge_memory
|
expand
|
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index ae3d8e2fd9e2..12b297f9951d 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h @@ -273,7 +273,7 @@ static inline bool is_huge_zero_page(struct page *page) static inline bool is_huge_zero_pmd(pmd_t pmd) { - return READ_ONCE(huge_zero_pfn) == pmd_pfn(pmd) && pmd_present(pmd); + return pmd_present(pmd) && READ_ONCE(huge_zero_pfn) == pmd_pfn(pmd); } static inline bool is_huge_zero_pud(pud_t pud)