From mboxrd@z Thu Jan 1 00:00:00 1970 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 7A54CC433EF for ; Thu, 23 Jun 2022 06:46:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1B57B8E0131; Thu, 23 Jun 2022 02:46:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 164878E0115; Thu, 23 Jun 2022 02:46:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 053AD8E0131; Thu, 23 Jun 2022 02:46:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id EBB468E0115 for ; Thu, 23 Jun 2022 02:46:33 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C75FF21560 for ; Thu, 23 Jun 2022 06:46:33 +0000 (UTC) X-FDA: 79608567066.08.2E5C6A4 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by imf18.hostedemail.com (Postfix) with ESMTP id 4F0FD1C008D for ; Thu, 23 Jun 2022 06:46:33 +0000 (UTC) Received: by mail-pl1-f174.google.com with SMTP id m2so10082809plx.3 for ; Wed, 22 Jun 2022 23:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=x32DqBuUceR8iFLYxI8kSYRj/UC1qePRIp+pYEx+MqI=; b=EFvtJkZ/s4HpynzIewEfGe96kqJfJM6rQt8ODyjrXOisdHE5f6Hk6tXlwRNzWPM3ei RlBSYgqWIvRPkKpRne3XKfFKsZG25MbstwCvVWH0GOOj4QdYVXd7qJpR0f4jRMGXNdeH VtZkm/mgcb6EITsedWykN4KOZ8Ck2MLDdIpsUk9hDyKyd3SD7uBijNYB7w+MICqy42Gh 3Sc5GWNg3NRy/OR3Fvnduea968hwmNiqOitOojSjlAlnFkdLU4RNDd4ctQqsCuRm1Lh1 a294dHAoS3yWLrOfH8JS3VJYpivbOcjBWtxPINCsJqys/QnLCyf1enXkgX2+hO2xQmeG 3FPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=x32DqBuUceR8iFLYxI8kSYRj/UC1qePRIp+pYEx+MqI=; b=rEXPqWoXIWP44ivB4BYv0p2u5nMesxY39XqZ/9H2dkQuhjbaRpcw0cJlUTUfQ62Fiq t2zd0JgOQMFkOJlkQbOxUNzop+ZsfA1N9u+ruBsqD7b/hcPY8+EDtCQiIMGPPhqIjmEe eZikcU6XXeUlYMTRAmuUtQcM2jiyN0TC0wuF5lnbhgqqedeqDUBlhTc7oH+ou1FFZyGu AGe80S8wkoxKw2X9i2BhM/vNs9GxvyZvR8p3wzGiLyl6otBQi6Q/rL3Llb3NNpNIv9Tu HU96DPjU4nBk/Jhkjyb6XlnkQdc/us/mhrhmNoMP7QlfjybgwDDoDQC4HZdyp0CrXzhJ xj/w== X-Gm-Message-State: AJIora/bBXi3XoulMKhzPlBwUyWEHcK/bZvii1E5ifyuRPNfE2EaPZPu IJetzKehy2xLUrEg+XuxpXxie740zyWHmls8 X-Google-Smtp-Source: AGRyM1t69oBgD2t12Wc9w/KrrhJUuVoP29N3cBu+zMN6kludrJXg5XyShxODkhRS7PzeUJu4aDEdnA== X-Received: by 2002:a17:90b:3b4c:b0:1e8:5e53:2796 with SMTP id ot12-20020a17090b3b4c00b001e85e532796mr2396743pjb.184.1655966792405; Wed, 22 Jun 2022 23:46:32 -0700 (PDT) Received: from localhost ([139.177.225.231]) by smtp.gmail.com with ESMTPSA id v1-20020a62c301000000b0052090076426sm15301519pfg.19.2022.06.22.23.46.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 23:46:32 -0700 (PDT) Date: Thu, 23 Jun 2022 14:46:28 +0800 From: Muchun Song To: Miaohe Lin Cc: akpm@linux-foundation.org, shy828301@gmail.com, willy@infradead.org, zokeefe@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/16] mm/huge_memory: rename mmun_start to haddr in remove_migration_pmd Message-ID: References: <20220622170627.19786-1-linmiaohe@huawei.com> <20220622170627.19786-7-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220622170627.19786-7-linmiaohe@huawei.com> ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b="EFvtJkZ/"; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf18.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.214.174 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655966793; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=x32DqBuUceR8iFLYxI8kSYRj/UC1qePRIp+pYEx+MqI=; b=HOEqsyKk3SbOQeBelf4esCW5BwLXu7dFCSG/+i6vESlFhfVmWuv4iKIg0cPSsJP0W546+d ZXDl8wMFDJaRfQHleHhK7TyYOR6ZBvojdOeI0Y5PkYBiHDd6oF+35itQufSF2UqBwRD+il 6kR4M5ZRf+zNS2gL5RsFF/9ZPriO2Z4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655966793; a=rsa-sha256; cv=none; b=o/78gdBt6f4iFh30YNB7nGbi/LoAK4+ioZ0spiBPV70LBVSm23N/L7SkuyCg2DnIR/kBQI JF357bOoOXHgxQrC1LdNWDMHwmcm0F8swBQsPIxp0Z5CRfdK7FHIWhxT5m/MzC4CJGZz1p LIYL6gtvWR+atL2G65fSrkF1XjtKm9c= X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 4F0FD1C008D X-Rspam-User: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b="EFvtJkZ/"; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf18.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.214.174 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com X-Stat-Signature: 1izcs74ap1ad9kiqobe4zqja3scz3zj4 X-HE-Tag: 1655966793-261444 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: On Thu, Jun 23, 2022 at 01:06:17AM +0800, Miaohe Lin wrote: > mmun_start indicates mmu_notifier start address but there's no mmu_notifier Actually I don't know what "mmun" prefix means. But this change looks good to me. Reviewed-by: Muchun Song > 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 > --- > 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 c6302fe6704b..fb5c484dfa39 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -3181,7 +3181,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; > > @@ -3204,12 +3204,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); > -- > 2.23.0 > >