From patchwork Tue Jun 28 13:28:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12898297 Return-Path: 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 EC05DC43334 for ; Tue, 28 Jun 2022 13:28:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B4C448E0009; Tue, 28 Jun 2022 09:28:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A3FEC8E0010; Tue, 28 Jun 2022 09:28:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5599E8E0009; Tue, 28 Jun 2022 09:28:49 -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 02B3E8E000D for ; Tue, 28 Jun 2022 09:28:48 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id CEA7321275 for ; Tue, 28 Jun 2022 13:28:48 +0000 (UTC) X-FDA: 79627724736.05.E80112A Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf24.hostedemail.com (Postfix) with ESMTP id 0C585180037 for ; Tue, 28 Jun 2022 13:28:46 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LXQLv5gJ6zTgJB; Tue, 28 Jun 2022 21:25:11 +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:40 +0800 From: Miaohe Lin To: CC: , , , , , , Subject: [PATCH v2 06/16] mm/huge_memory: rename mmun_start to haddr in remove_migration_pmd Date: Tue, 28 Jun 2022 21:28:25 +0800 Message-ID: <20220628132835.8925-7-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 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=1656422928; a=rsa-sha256; cv=none; b=Rsx5Vf7CIBiJuLpyqYiBIVb+MzMHbmU0xzTOhx1y+CfUfrYMdShT9nnt8CMTys2DNrW9GV 7JsN7qCcPzGXhqQe7aG4kup3ycFJ/XBL6DuLGNbEIsk/6/DpJlTXtteSuGnwKd+O0GaxOS skGJotQcetKCnvw4ZAOTHKTjjr/HBoo= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; spf=pass (imf24.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=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=T6FZyXgxYx8FtNlznGZwc0THV2OcvOr7RZTWjZsM5Y4=; b=PyOR0pPILQAcj+zjk1LR8kcKDDdnlkZ8NCOtgyLetuddiaWzxTSnAmdpl8Xw4B97CLq9s/ IeiSzS4oaACoPMlJK7ktJfndmEeZU6fgm43QjT6yrY84SFh6JiiU0ctBGlH3FdbSMo403O Ad7VoLBuqCG4pukIGLaH7UHL77BEpps= X-Rspam-User: Authentication-Results: imf24.hostedemail.com; dkim=none; spf=pass (imf24.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspamd-Server: rspam02 X-Stat-Signature: 3yg4ok5f17kofcadx8afwxqidfkw7itt X-Rspamd-Queue-Id: 0C585180037 X-HE-Tag: 1656422926-24238 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: mmun_start indicates mmu_notifier start address but there's no mmu_notifier stuff in remove_migration_pmd. This will make it hard to get the meaning of mmun_start. Rename it to haddr to avoid confusing readers and also imporve readability. Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song --- mm/huge_memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index d9fe9b034783..8364b9b25b3a 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -3279,7 +3279,7 @@ void remove_migration_pmd(struct page_vma_mapped_walk *pvmw, struct page *new) struct vm_area_struct *vma = pvmw->vma; struct mm_struct *mm = vma->vm_mm; unsigned long address = pvmw->address; - unsigned long mmun_start = address & HPAGE_PMD_MASK; + unsigned long haddr = address & HPAGE_PMD_MASK; pmd_t pmde; swp_entry_t entry; @@ -3302,12 +3302,12 @@ void remove_migration_pmd(struct page_vma_mapped_walk *pvmw, struct page *new) if (!is_readable_migration_entry(entry)) rmap_flags |= RMAP_EXCLUSIVE; - page_add_anon_rmap(new, vma, mmun_start, rmap_flags); + page_add_anon_rmap(new, vma, haddr, rmap_flags); } else { page_add_file_rmap(new, vma, true); } VM_BUG_ON(pmd_write(pmde) && PageAnon(new) && !PageAnonExclusive(new)); - set_pmd_at(mm, mmun_start, pvmw->pmd, pmde); + set_pmd_at(mm, haddr, pvmw->pmd, pmde); /* No need to invalidate - it was non-present before */ update_mmu_cache_pmd(vma, address, pvmw->pmd);