Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp13261pxk; Wed, 23 Sep 2020 20:34:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrZLh9e8JUVUx0d2l0vJucm/xqo/QZLCG62UY2pmzHNNsPLDSAEyqoz6aaqyJj7Nuvqik/ X-Received: by 2002:a17:906:c0d0:: with SMTP id bn16mr2587369ejb.279.1600918450273; Wed, 23 Sep 2020 20:34:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600918450; cv=none; d=google.com; s=arc-20160816; b=albQMbOsYUNfLc5Wctkf5i71gBDqZZ6SR2jsW0bCN5m02oDElhH9yrsf+UHYinq7Bi JoJu4SxRfRTHjgm2I3yJZw8VDd/Yb97ifhYPFH7DcE33+ZpNmY1St2pLM5c95iQTl32W 6mO0gDmS/youxUl9tfVQ3c2baj5ns4UyhEV6xPFvb+IH6NaimBJ021oeqjaq++J2sLln wlLhkdR5wKD5sxAsAJVArZOy5VyLu8lVCKcCCiLo/d+SQhhx3bZVS3SDrKICmoYB6cmy gdFePKz2HEZ3iU0KNJCKmJV3dpCao2R5eh70fvxrWXIMdakvoKGjct9EodWNwqD4+QIk NL2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :to:from; bh=EzLdMi1uKtTgPDlIvBfTBMAuq8XXKt2CCGwdFCul51U=; b=BOFhcfmdBKYqTOJeXcduzf2QsSSyBQnI6R9yQcd1HLyhuaQ5Q0hfeBgDOYhHflMdBP /NaBdvAurP6hksPbKChU7GwK3l+39sJQzdO/JtuJ6X0RtADtjz1kZfFPdJd/LjBJgxBD DD/uhi99ZI4ZgklG/JMl1jjbIjbTuNET2uu9lc5GvW8ziJH+potSZq7WjFETiTPyzzJC Q/wjE9VV3yPaK4mpI5h0i4iNixCX8fmIamL/4r6ScPW2h6k7JANLoaPQ3VtK5xMtCUij /L8zgQfuwoYPLbfG+H23y/Wz6jMhgLNqgSKm+S9EWqbOJh9X/gCTVoVZYowQncqr9I8e kTzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b29si1305300ejl.385.2020.09.23.20.33.47; Wed, 23 Sep 2020 20:34:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727263AbgIXD3r (ORCPT + 99 others); Wed, 23 Sep 2020 23:29:47 -0400 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:46632 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbgIXD2n (ORCPT ); Wed, 23 Sep 2020 23:28:43 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R891e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=22;SR=0;TI=SMTPD_---0U9w0Ss1_1600918116; Received: from aliy80.localdomain(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U9w0Ss1_1600918116) by smtp.aliyun-inc.com(127.0.0.1); Thu, 24 Sep 2020 11:28:38 +0800 From: Alex Shi To: akpm@linux-foundation.org, mgorman@techsingularity.net, tj@kernel.org, hughd@google.com, khlebnikov@yandex-team.ru, daniel.m.jordan@oracle.com, willy@infradead.org, hannes@cmpxchg.org, lkp@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, shakeelb@google.com, iamjoonsoo.kim@lge.com, richard.weiyang@gmail.com, kirill@shutemov.name, alexander.duyck@gmail.com, rong.a.chen@intel.com, mhocko@suse.com, vdavydov.dev@gmail.com, shy828301@gmail.com, aaron.lwe@gmail.com Subject: [PATCH v19 04/20] mm/thp: use head for head page in lru_add_page_tail Date: Thu, 24 Sep 2020 11:28:19 +0800 Message-Id: <1600918115-22007-5-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600918115-22007-1-git-send-email-alex.shi@linux.alibaba.com> References: <1600918115-22007-1-git-send-email-alex.shi@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the first parameter is only used by head page, it's better to make it explicit. Signed-off-by: Alex Shi Reviewed-by: Kirill A. Shutemov Acked-by: Hugh Dickins Cc: Andrew Morton Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Hugh Dickins Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- mm/huge_memory.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 211d50f09785..fa0753229b52 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2318,19 +2318,19 @@ static void remap_page(struct page *page) } } -static void lru_add_page_tail(struct page *page, struct page *page_tail, +static void lru_add_page_tail(struct page *head, struct page *page_tail, struct lruvec *lruvec, struct list_head *list) { - VM_BUG_ON_PAGE(!PageHead(page), page); - VM_BUG_ON_PAGE(PageCompound(page_tail), page); - VM_BUG_ON_PAGE(PageLRU(page_tail), page); + VM_BUG_ON_PAGE(!PageHead(head), head); + VM_BUG_ON_PAGE(PageCompound(page_tail), head); + VM_BUG_ON_PAGE(PageLRU(page_tail), head); lockdep_assert_held(&lruvec_pgdat(lruvec)->lru_lock); if (!list) SetPageLRU(page_tail); - if (likely(PageLRU(page))) - list_add_tail(&page_tail->lru, &page->lru); + if (likely(PageLRU(head))) + list_add_tail(&page_tail->lru, &head->lru); else if (list) { /* page reclaim is reclaiming a huge page */ get_page(page_tail); -- 1.8.3.1