From patchwork Wed Jan 25 13:44:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 13115649 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 75B06C27C76 for ; Wed, 25 Jan 2023 13:44:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 094DE6B0071; Wed, 25 Jan 2023 08:44:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 045426B0072; Wed, 25 Jan 2023 08:44:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E4EF36B0075; Wed, 25 Jan 2023 08:44:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id D5A926B0071 for ; Wed, 25 Jan 2023 08:44:50 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id AF06CAB1C9 for ; Wed, 25 Jan 2023 13:44:50 +0000 (UTC) X-FDA: 80393441940.25.D22CBF9 Received: from outbound-smtp25.blacknight.com (outbound-smtp25.blacknight.com [81.17.249.193]) by imf01.hostedemail.com (Postfix) with ESMTP id C3AA940027 for ; Wed, 25 Jan 2023 13:44:48 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.193 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674654289; 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=BmLjJO2uoBSxYX86MDyzJmXxr+MIP0GQG8t5O7HLi1Q=; b=b4vQmMJV2kJAWdhH1fX/1+6Qw5qAF6wwICPnpOY9nhgm67p8ZsxpQ3wXiUrHY7/r/ExNi1 LPDYdKmpnSvd4avX3yFqSnt7Wegz7SoG1dQWXnz1YpHKBpaLkejpN0+17VhpMvL5LTOTrY rJgJv6zdDGud+crGrEFhq1/8Dus8LCE= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.193 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674654289; a=rsa-sha256; cv=none; b=R7dalYQ1rbNj63KmIf3eQDdvJyq/qCxVj5b8ZwHtD2o+i3ht3KjggjCXvl9NInTHTRNaT2 si0883EA1fSmCqKu8XXX7KcxbVpHaQMjZuaA4O2mjdRndGynRJ+WEmNJ1v0E/d3Scpcj9n kQ7gieueClO/VFOyQ81hLjPnQnm2+bA= Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp25.blacknight.com (Postfix) with ESMTPS id 282704205A for ; Wed, 25 Jan 2023 13:44:47 +0000 (GMT) Received: (qmail 20032 invoked from network); 25 Jan 2023 13:44:46 -0000 Received: from unknown (HELO morpheus.112glenside.lan) (mgorman@techsingularity.net@[84.203.198.246]) by 81.17.254.9 with ESMTPA; 25 Jan 2023 13:44:46 -0000 From: Mel Gorman To: Vlastimil Babka Cc: Andrew Morton , Jiri Slaby , Maxim Levitsky , Michal Hocko , Pedro Falcato , Paolo Bonzini , Chuyi Zhou , Linux-MM , LKML , Mel Gorman Subject: [RFC PATCH 0/4] Fix excessive CPU usage during compaction Date: Wed, 25 Jan 2023 13:44:30 +0000 Message-Id: <20230125134434.18017-1-mgorman@techsingularity.net> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: owpbzpr958crp56ns5wjs44scwb1bapy X-Rspamd-Queue-Id: C3AA940027 X-HE-Tag: 1674654288-957524 X-HE-Meta: U2FsdGVkX18B3utN9FihNYliYxh9Sw8ycY0ZLcBJcZe4lQKLlbATa7oIKJAQEcTNAdzcNCcQ7ygF/9jzTnDpkmy0wb+CX8nM9BEuoBNKD8KrcKlP+4MLcE4QAg3FRHN17i7HEKk6EgxZr2psr50cDYELcgoytQLMs3s8epiAxmQXMC2Jwjx+yDd8XOe0hwouQGEqTi/wnKhPWy0Q9nwfd2lk6Q14oPolQj+Sn8KxB1OaYemtK7ynOZGds97CL30tgu7rzjVV0doD/3ky+qsXDWQJj/VFKYykuQKcxtMyagS6gRPueqV9W/4DqSbs682lcMijgPCeGe7L8SHRdWiwz/Pq1VuUsQ8lUevd1KT6gntGtoT95IxxyS1vE8epY753XEO7TLkStZC7JM+cl3lyKg5GCMMbtsMf6YR9eMd3jHhKb9z8YA290Bash1w5JP3ANAM7ZxO/EYxXw32wgvK+yBuAouI45wA1NVN0BWd61HVy0QY0iSmRDpLL4oJ+mQyqOby/CQ5ktnPmtUe91Nx8Pc9cQo66T6LaboBMDqk9esQhpAkYQk1duG2ZZpOYeNMxnthq6bWYlan5Ogz3G9umUYJymTP53r472lm4jCJ/C0Xsb5i8VX3GgNB/GFZeBpphjQQm9sjJa10p4GZtx7SgEG6nv9KvfZKThxpmzvH8LDO6beAMSCxKCYKzufSXxZ05AY0lXtg3F+Sv+yWuze/9EXWqy1Xe0Dlu9gqmHKSBnjvICaQ1oclV6nWriYORq6cY8FTwpFRvVTxWuuNH1kCA3CAfyK2gE/PnkhEbdUkacqMOndGK1taUAg+MQPja5UVeLu5fsxC8nHZL4MemU46GpyI+am/Q8o7zcxGaGQ7f3T9m52zdIPwQfwGSOt2fJ8H9p8rX9TSLZpzbxUVIQ9vE6mnrnOs1dOI+2wve6noBChSZvW5JNz5YziYwAoOzalzVq1Ng/xxvdpbOfJyFFwI YSQRAiK7 liJqbYiTxwIqb8Fuili76xS/CzbFX4BWHbIHsAyLo7k4Ny67UBIDe9QIbyRQzd0Uv5jhtNq0fVQYnZE/PkQ94jQRcPjTR1sLfk2JYOeL1FYEUdbSkB77fSumroVXQO541viV+07lTvMIeuYLizpcEwLjEXktFNSXeMhBEBuSJpNs/Fgtvf5N5ufy+ruhkhCl3a1FMJQiS3TzKXXxAI32y2rWlWdumqQuBRBDmxIpKW4MsLKlAPpWHapaAiQiG6FktJqJnSS0ot9EJTmEbpryi3Y3c8Q4z+KqN3bnvjb91BJlGCufhnagjY8j+Gg== 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: Commit 7efc3b726103 ("mm/compaction: fix set skip in fast_find_migrateblock") fixed a problem where pageblocks found by fast_find_migrateblock() were ignored. Unfortunately there were numerous bug reports complaining about high CPU usage and massive stalls once 6.1 was released. Due to the severity, the patch was reverted by Vlastimil as a short-term fix[1] to -stable and is currently sitting in the Andrew's git branch mm/mm-hotfixes-unstable. The underlying problem for each of the bugs is suspected to be the repeated scanning of the same pageblocks. This series should guarantee forward progress even with commit 7efc3b726103. More information is in the changelog for patch 4. If this series is accepted and merged after the revert of 7efc3b726103 then a "revert of the revert" will be needed. [1] http://lore.kernel.org/r/20230113173345.9692-1-vbabka@suse.cz mm/compaction.c | 73 +++++++++++++++++++++++++++++++------------------ mm/internal.h | 6 +++- 2 files changed, 52 insertions(+), 27 deletions(-)