Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp333848ybm; Thu, 28 May 2020 04:06:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDAmYDY2jrQsFCen89yMtD+yfx2QejOl5rDW6MBBcxM8afOJponXbgTaS9l5T3tA5mLgx8 X-Received: by 2002:a05:6402:1481:: with SMTP id e1mr800220edv.113.1590663997985; Thu, 28 May 2020 04:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590663997; cv=none; d=google.com; s=arc-20160816; b=HHlYqPCzPSAWOTjyYMOiwRkftX+SZgHGN93LrRjSw0NPH6j9NQ6IlnxJmCozJaFAku ePTLZeXTm8o3hctxP4lXA7sP23KER/1ELT1dYcVVsE7kv2I78t+il79PtaySQgm7bYya OjV6HlBSZD/PJeDVv3SFTyponTyi82pSKXmlh8z5JJDxKYxac/lmSg6t3mNwDAFfLlse dEI7fK46e5wRuoL5ODJRM1rZZEY4H5+WSVleeDukDqL4u3wBWn3jkLTm97dBM5AVBrl9 R0nP8MkyI7/6AmcSV1BZvTaSpx29jKCOJ5RgS4gGsdTJjnkGVfvYVIA7lP4iSlA1XsOD q4og== 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:cc:to:from; bh=aE2Kbj1UxFPqVLpAE0cWd1lyrLPpJKqfpG3jh/ncEYk=; b=h8h9j5vX88LmIZfBoMC/DwUW9KE8L90TsQjCYzGq+iMppWUbroRqpcMOzDoSouPgjB /45uBMKYYsJpEbmojKzuz8VGhD5HkX+we0U2tFfn/VTqsX2k/MK8cQ+hGrSd7qlG5hPc x4HzZ32oqL9aSWIWAkYj0JR08M19uWIAtM3McVg/+LGLBxD1m3HgIkwzXzI9DJ1eUcFi LWRNpMyUvLXTCYOCXvzYqEM/PTNhD7MFD9b/PbKXjfyJOnsPvl07Bg/BaRJLITL8lyxj 5YzW9NEnB/FTpZ/JFY0IyahrWVkcp7x0t9WtpZxezQbtWtB5CEgYcSKTvTbTpflxG7Oy +1Ow== 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 z15si3480527eda.482.2020.05.28.04.06.12; Thu, 28 May 2020 04:06:37 -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 S2388261AbgE1LCz (ORCPT + 99 others); Thu, 28 May 2020 07:02:55 -0400 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:33038 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388099AbgE1LCq (ORCPT ); Thu, 28 May 2020 07:02:46 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R681e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07488;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0TztM4bt_1590663687; Received: from localhost(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0TztM4bt_1590663687) by smtp.aliyun-inc.com(127.0.0.1); Thu, 28 May 2020 19:01:27 +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 Cc: Alex Shi Subject: [PATCH v11 06/16] mm/thp: clean up lru_add_page_tail Date: Thu, 28 May 2020 19:00:48 +0800 Message-Id: <1590663658-184131-7-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1590663658-184131-1-git-send-email-alex.shi@linux.alibaba.com> References: <1590663658-184131-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 4c3990ba29cb..a4ba75e143b3 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2316,19 +2316,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