Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1066182ybg; Wed, 10 Jun 2020 23:22:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrnEP2RoVqvMrgxW0VWAMIKeMhRN+8TyXbVr7g9HbC9zsnrwssdQ+SYEN6mSC9Wiatlj+p X-Received: by 2002:a17:906:fcae:: with SMTP id qw14mr7295119ejb.166.1591856530004; Wed, 10 Jun 2020 23:22:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591856529; cv=none; d=google.com; s=arc-20160816; b=bXmzkdicMYAYljth1TgDi+0lB5Yk0y2gtPGWhZyXkQGjSQehofFrx4HLit5kvaZKr0 SGftTNp8yR1uvASSEnTfZzGkCw0Vt2nqRHYYV1MoDX5gFsX5cfXW3jLHjIhKk2x1p5xF m0WkRzB+2ktcGWjfTPjwT7lCzvvJuLdfAd/PFOj7y9fQRVfhoE1L/nsKoANQjziC8t5u C+LQjt+eErtFItnwXTKOUe81lHrpDC2gqHcnR1zdMhg0XZZAaWpkfsWMQMWABdbDR4zA 3cXNJ/0NXWI4FbBBJoj34duZVAczFWp9FeAtqnU6UXgxXQy68XWy2OKbQs8zcJsEXxaj 3hZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from; bh=osBKd1GR+/K7MYK2oZ7rmpjYyR8lHLhyeTUV8lx4Iwg=; b=SWYO57BNWWiLU1zKhmu9qGnRbk3JKhbU90EodaolTye+3TuIJm2Wu5MLZgqJAnKBlV j08L7YzQTU0YSKf5IhSx383JJQ5zq4EVaCrp34sOIbIyx+g+uBpWXLBE4VQj42LAsuhQ WYNxY/VZZjg5gKSlxhQlTaCMiT5EUpx4sRepPphVCg36ptukCLVMF9oyax8cuvrUf/YO sFG5dMOFRhpHqKrNT1NxXhAaMTVe9ZpamG1KNgwauaMlKnkIILSA/jPDEMHKeEiTWyRP bifj3jqTVst6+MT0g3VEszLZIygmlydMmPdbqQZEtge01ngrYdaGekcu/ogYadXYTuni vPyg== 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 q26si1457909eji.128.2020.06.10.23.21.47; Wed, 10 Jun 2020 23:22:09 -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 S1726856AbgFKGR6 (ORCPT + 99 others); Thu, 11 Jun 2020 02:17:58 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:38442 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726578AbgFKGRM (ORCPT ); Thu, 11 Jun 2020 02:17:12 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01358;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0U.EpUdH_1591856227; Received: from localhost(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U.EpUdH_1591856227) by smtp.aliyun-inc.com(127.0.0.1); Thu, 11 Jun 2020 14:17:07 +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, yang.shi@linux.alibaba.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 Subject: [PATCH v12 06/16] mm/thp: clean up lru_add_page_tail Date: Thu, 11 Jun 2020 14:16:39 +0800 Message-Id: <1591856209-166869-7-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1591856209-166869-1-git-send-email-alex.shi@linux.alibaba.com> References: <1591856209-166869-1-git-send-email-alex.shi@linux.alibaba.com> Sender: linux-kernel-owner@vger.kernel.org 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 stright. Signed-off-by: Alex Shi 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 09f910bc7429..1cd81a9a4f80 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2340,19 +2340,19 @@ static void remap_page(struct page *page) } } -void lru_add_page_tail(struct page *page, struct page *page_tail, +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