Message ID | 20220704132201.14611-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 15131CCA479 for <linux-mm@archiver.kernel.org>; Mon, 4 Jul 2022 13:22:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9F2796B0080; Mon, 4 Jul 2022 09:22:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 978BC6B0081; Mon, 4 Jul 2022 09:22:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 818C96B0082; Mon, 4 Jul 2022 09:22:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 6E0F26B0080 for <linux-mm@kvack.org>; Mon, 4 Jul 2022 09:22:19 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id EE6AB209FA for <linux-mm@kvack.org>; Mon, 4 Jul 2022 13:22:18 +0000 (UTC) X-FDA: 79649481156.03.D9FE830 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf10.hostedemail.com (Postfix) with ESMTP id 20776C0066 for <linux-mm@kvack.org>; Mon, 4 Jul 2022 13:22:17 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Lc5y01qKjz1L8jZ; Mon, 4 Jul 2022 21:19:52 +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; Mon, 4 Jul 2022 21:22:14 +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 v3 10/16] mm/huge_memory: check pmd_present first in is_huge_zero_pmd Date: Mon, 4 Jul 2022 21:21:55 +0800 Message-ID: <20220704132201.14611-11-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220704132201.14611-1-linmiaohe@huawei.com> References: <20220704132201.14611-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-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf10.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=1656940938; 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=ZInuJWNvWhXZaiHbzG0InZUxpzZxVE6ZdhvgxL+++9VI9gfv7AsKMb81T4sMhKO5wQunkg JyM+58VdeuwdrAwQGPV/NcD79aOC7kkgqK04RmPTekDALu0P5PdNh0a9KHVDTt299Q6pVA PXbWrLAA2B5+4j+tN4g/E0U6L1oryiQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656940938; a=rsa-sha256; cv=none; b=Hl0F/suR8rzoMzMmK85HZ1+nTZjKedpRfbModEO9fG1/hhMLUDlUruxCSfazQU/c9FJw/q XK19OcInGybUQA/Esi0WiZcflmJJLt1Iw9LzJoj8up9Bos1pgzq5hBLjrahr1qrzu3VeKi pr4FBjyA8RYP9wuUtX0dY/KDTNe5yeE= X-Stat-Signature: 4qn4eh9pftnjjy5w8puofmnp3drzr4wu X-Rspamd-Queue-Id: 20776C0066 Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf10.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspamd-Server: rspam03 X-Rspam-User: X-HE-Tag: 1656940937-176638 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)