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 X-Spam-Level: X-Spam-Status: No, score=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A23D4C433DB for ; Tue, 26 Jan 2021 11:23:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2B26722795 for ; Tue, 26 Jan 2021 11:23:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B26722795 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 49BC16B0022; Tue, 26 Jan 2021 06:23:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 44BEC8D00C4; Tue, 26 Jan 2021 06:23:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33BCC8D00B0; Tue, 26 Jan 2021 06:23:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id 1E2246B0022 for ; Tue, 26 Jan 2021 06:23:39 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D9C80181AEF39 for ; Tue, 26 Jan 2021 11:23:38 +0000 (UTC) X-FDA: 77747690916.30.shape80_470b8882758e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 9D7EF180B3C83 for ; Tue, 26 Jan 2021 11:23:38 +0000 (UTC) X-HE-Tag: shape80_470b8882758e X-Filterd-Recvd-Size: 3602 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Tue, 26 Jan 2021 11:23:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611660217; h=from:from: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=CiONnZ1ymNvkzwHvQA22Owl9Y/QjdZQ6wIbCWQAKdh8=; b=EZ+/GJ/4qvfv/mYT+71kfn4at5pi3pICr6NRKsY7qvjleHGv19IcUkfXHQyxDeHtPMr6zE 5VYRvNwX/aSKatUOqmwwRNdeKcD3LLECNQZ/h5AwBmkXsmV10sCArXBk16wpbmCsYY71ZH ozaJEnu9I9kKiHuQiM8m0ly1ymKiI2M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-221-ynpxj2G4NXunwoVC9Wy3RQ-1; Tue, 26 Jan 2021 06:23:35 -0500 X-MC-Unique: ynpxj2G4NXunwoVC9Wy3RQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DA6E6802B42; Tue, 26 Jan 2021 11:23:33 +0000 (UTC) Received: from [10.36.114.192] (ovpn-114-192.ams2.redhat.com [10.36.114.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA229100239F; Tue, 26 Jan 2021 11:23:32 +0000 (UTC) Subject: Re: [PATCH] mm/page_owner: Use helper function zone_end_pfn() to get end_pfn To: Miaohe Lin , akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210123070538.5861-1-linmiaohe@huawei.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <25c538a0-8d10-7c2c-6562-52a91ac158a6@redhat.com> Date: Tue, 26 Jan 2021 12:23:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20210123070538.5861-1-linmiaohe@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 23.01.21 08:05, Miaohe Lin wrote: > Commit 108bcc96ef70 ("mm: add & use zone_end_pfn() and zone_spans_pfn()") > introduced the helper zone_end_pfn() to calculate the zone end pfn. But > pagetypeinfo_showmixedcount_print forgot to use it. And the initialization > of local variable pfn is duplicated, remove one. > > Signed-off-by: Miaohe Lin > --- > mm/page_owner.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/page_owner.c b/mm/page_owner.c > index af464bb7fbe7..d15c7c4994f5 100644 > --- a/mm/page_owner.c > +++ b/mm/page_owner.c > @@ -263,8 +263,8 @@ void pagetypeinfo_showmixedcount_print(struct seq_file *m, > struct page *page; > struct page_ext *page_ext; > struct page_owner *page_owner; > - unsigned long pfn = zone->zone_start_pfn, block_end_pfn; > - unsigned long end_pfn = pfn + zone->spanned_pages; > + unsigned long pfn, block_end_pfn; > + unsigned long end_pfn = zone_end_pfn(zone); > unsigned long count[MIGRATE_TYPES] = { 0, }; > int pageblock_mt, page_mt; > int i; > Looks a little weird that we initialize "end_pfn" directly and "pfn" not. I'd make this consistent. Anyhow Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb