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.8 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 9FE51C433E0 for ; Tue, 2 Feb 2021 10:06:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 26EF164E2A for ; Tue, 2 Feb 2021 10:06:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26EF164E2A 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 7CBAC6B007D; Tue, 2 Feb 2021 05:06:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 77C536B007E; Tue, 2 Feb 2021 05:06:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 61E656B0080; Tue, 2 Feb 2021 05:06:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0226.hostedemail.com [216.40.44.226]) by kanga.kvack.org (Postfix) with ESMTP id 4DD206B007D for ; Tue, 2 Feb 2021 05:06:18 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 148661EF1 for ; Tue, 2 Feb 2021 10:06:18 +0000 (UTC) X-FDA: 77772897636.26.rat23_1311df0275ca Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id DED051804B667 for ; Tue, 2 Feb 2021 10:06:17 +0000 (UTC) X-HE-Tag: rat23_1311df0275ca X-Filterd-Recvd-Size: 3432 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, 2 Feb 2021 10:06:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612260376; 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=DznrvedIFVUd6PchGLao8qCBfJlVvrS8p4p4tPArn88=; b=h61lJqgYyFcp0hUFqXubVzxEM/ZF1nBOfVWd6rXVJjp06xmyZYrBgJRr/TIXEx3O/Fnxj2 +gF3Sfy1xhw8O5XzBqQ/W36zEdiXjUhNSemKNLK/kpGNDBLfZOx5RWGVXmJNkk6vpIq307 b2EBzYnE9v2W0jZ3cMQmzD/Ph6l4r9s= 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-207-oevE_YrLOaCiD8FqNbOscA-1; Tue, 02 Feb 2021 05:06:13 -0500 X-MC-Unique: oevE_YrLOaCiD8FqNbOscA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C403D59; Tue, 2 Feb 2021 10:06:11 +0000 (UTC) Received: from [10.36.114.148] (ovpn-114-148.ams2.redhat.com [10.36.114.148]) by smtp.corp.redhat.com (Postfix) with ESMTP id B07C15D9C6; Tue, 2 Feb 2021 10:06:10 +0000 (UTC) Subject: Re: [PATCH] mm/hugetlb: remove a meaningless if statement in gigantic page initialization To: yanfei.xu@windriver.com, mike.kravetz@oracle.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210202101209.72795-1-yanfei.xu@windriver.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <18d3db7b-da3c-db14-ab99-b2c966c70024@redhat.com> Date: Tue, 2 Feb 2021 11:06:09 +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: <20210202101209.72795-1-yanfei.xu@windriver.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 02.02.21 11:12, yanfei.xu@windriver.com wrote: > From: Yanfei Xu > > Gigantic page is a compound page and its order is more than 1. > Thus it must be available for hpage_pincount. Let's remove this > meaningless if statement. > > Signed-off-by: Yanfei Xu > --- > mm/hugetlb.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index a3e4fa2c5e94..73d602f8c7e2 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -1501,9 +1501,7 @@ static void prep_compound_gigantic_page(struct page *page, unsigned int order) > set_compound_head(p, page); > } > atomic_set(compound_mapcount_ptr(page), -1); > - > - if (hpage_pincount_available(page)) > - atomic_set(compound_pincount_ptr(page), 0); > + atomic_set(compound_pincount_ptr(page), 0); > } > > /* > I can spot similar handling in destroy_compound_gigantic_page(). If this is correct (which I think it is), we should tackle both occurrences at once. -- Thanks, David / dhildenb