From patchwork Fri Jul 7 08:51:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 13304601 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8E33EB64D9 for ; Fri, 7 Jul 2023 08:51:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4C7AD8D0002; Fri, 7 Jul 2023 04:51:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 477408D0001; Fri, 7 Jul 2023 04:51:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 365CE8D0002; Fri, 7 Jul 2023 04:51:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 2280D8D0001 for ; Fri, 7 Jul 2023 04:51:57 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id EAF1D160656 for ; Fri, 7 Jul 2023 08:51:56 +0000 (UTC) X-FDA: 80984198232.05.E8DB924 Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) by imf13.hostedemail.com (Postfix) with ESMTP id 6696B20005 for ; Fri, 7 Jul 2023 08:51:53 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf13.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.110 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688719915; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=AOxPq48FtdM+DmsA8kY++8wzQAkMRTzYKQYl15WQD/E=; b=2tLAGHVM8effcBUENq6eEYctMiTdisunoY+Yxr4W4rKyP1LdnTRoxR+/dURrKVfWeyl+eh uR9VMZBjEwx3vRqZlJ10vfAqgw+7tBm108dhxEucuapfnPsguFdjl7YhYKuafkbjCDvbNE pfnApdYeV5quZgiQbd6GbHHuTb33sic= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf13.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.110 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688719915; a=rsa-sha256; cv=none; b=f6NTL54usUzcZmcgToNL3EvGRGdrgd2OUydl8KRkCUusj3xGFOak6Pz/QwSELvLyZLmLFS co4Z+KzWBQ8p1SNqeTtwKHaxH7hUSH0q0kysIUnKZcnwBowtWCZpaEvO2SfAaLcAlFH7yR cf+3z2q+WQQrRWa5g2936gLTMAmaXZs= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R431e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VmnvSa9_1688719909; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VmnvSa9_1688719909) by smtp.aliyun-inc.com; Fri, 07 Jul 2023 16:51:50 +0800 From: Baolin Wang To: akpm@linux-foundation.org Cc: mgorman@techsingularity.net, vbabka@suse.cz, david@redhat.com, ying.huang@intel.com, baolin.wang@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] mm: compaction: use the correct type of list for free pages Date: Fri, 7 Jul 2023 16:51:46 +0800 Message-Id: X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-Rspamd-Queue-Id: 6696B20005 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 698jsgfjj8obxm5jj4swp7bh8i6pcimh X-HE-Tag: 1688719913-255702 X-HE-Meta: U2FsdGVkX1+1GVRp/PO2G5Islh6QnFjsr/F0BUlgHGjafznwviVl+O53igz8iPHktznQpbliJwvU1UPIT+u8JfnPbn9AAPAWNPZZT22RPz4ARzIjj2sbXEeK/LcpuEa2W+jIGasEwmr9vSn3ta6fKx53wKj3Oz83PNNn2fLtkHyDOSv0Xi5iosEeyIuUoVDT1OmK+W2gWAMW0WwYxU9n+Lg7or/S1QZynVKs+GpUmZUlvCIzc8pLgMCRassX3n1EUVTTXxmBsoFbTeO3DQXipPh5xiCWqCnoaqkYh4QVojo6bqRCEVAeSVhCxQm/YYu1tZTFpeo7HNBOk5ICqHXHWlUd/oT3Ax0d77uVap7O8nRJJ/TTmpvU6e4/9Y+kxKQGdkj9pt8dhwTPBx+8lM5qWVNjGXTm0/C4c9hWhSy0T0xBWno5QnUaizjAJVsA3ekoXP+SeC998IgDiI50wskuQwSywIEQXXPbOdHVyVNP/kaZ8pVEABfWanbddm7LJBG9TIxITfO/GlmbEjA404WUjCrNhSU2Xxf6Wa2Waihi+qX7k65H6+vMoPjRs/OLGCfiDzVwGh4rxqRoqg4vtBpB+GNrzvcpscWLEmzX3A9PskUaVpqLES8PP3/aZLCod7P8dEmCPAfwPCK0bgMhdJoI/wUgDITDUMNuFUwrqhONp4tqPTI/Rc8//P1GGY3eWLm38+o6Vy+LQxdtETXQ96YT45oYpMkJURkgWUoxvghWi4lmyX31h/m4H/665bQw2vwiVGMfhopBEZJv/6VmPp5wcaWvsdWOZDLrapKy42SOnbop9Ssajeu2gOvAwlwFoXMu7XPqLVJwnv579ReruqRXc32Bob+nvu4M6BMKLhE3ExxMtqlTwngVppiTvy3zaPmT73da2WCXifoBDXhlBlCKL9fhYO0OwsR1rUFQboA0elTwaP6L6UW9Aojk+9/T4p8/U3saFUQPBLpXJV5psFp uSU0DWzq g+0XRtfGCQ9sie/csBdtFu6eTDzDcdHyJmVgWpRkjBgJNvzu5tiwzUth1r0WhupDG3x7T+bXnvhlT5ypZPf2a4KZxbTVh3Uj/RkbUJQIkoJuHrK2BPpODN0UBQ9gxk9AHuZOb 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: Use the page->buddy_list instead of page->lru to clarify the correct type of list for free pages. Signed-off-by: Baolin Wang Reviewed-by: David Hildenbrand --- mm/compaction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index dbc9f86b1934..43358efdbdc2 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1500,7 +1500,7 @@ static void fast_isolate_freepages(struct compact_control *cc) spin_lock_irqsave(&cc->zone->lock, flags); freelist = &area->free_list[MIGRATE_MOVABLE]; - list_for_each_entry_reverse(freepage, freelist, lru) { + list_for_each_entry_reverse(freepage, freelist, buddy_list) { unsigned long pfn; order_scanned++; @@ -1883,7 +1883,7 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc) spin_lock_irqsave(&cc->zone->lock, flags); freelist = &area->free_list[MIGRATE_MOVABLE]; - list_for_each_entry(freepage, freelist, lru) { + list_for_each_entry(freepage, freelist, buddy_list) { unsigned long free_pfn; if (nr_scanned++ >= limit) {