From patchwork Tue Feb 9 17:50:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minchan Kim X-Patchwork-Id: 12078691 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58E31C433DB for ; Tue, 9 Feb 2021 17:50:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E54E764E37 for ; Tue, 9 Feb 2021 17:50:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E54E764E37 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6A4A26B0005; Tue, 9 Feb 2021 12:50:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6544A6B006C; Tue, 9 Feb 2021 12:50:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56ABD6B006E; Tue, 9 Feb 2021 12:50:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0183.hostedemail.com [216.40.44.183]) by kanga.kvack.org (Postfix) with ESMTP id 402C46B0005 for ; Tue, 9 Feb 2021 12:50:54 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D708F1802C52D for ; Tue, 9 Feb 2021 17:50:53 +0000 (UTC) X-FDA: 77799469986.26.story96_5a04c1c27609 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id B59731811641E for ; Tue, 9 Feb 2021 17:50:53 +0000 (UTC) X-HE-Tag: story96_5a04c1c27609 X-Filterd-Recvd-Size: 3779 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Feb 2021 17:50:53 +0000 (UTC) Received: by mail-pl1-f169.google.com with SMTP id e12so10163285pls.4 for ; Tue, 09 Feb 2021 09:50:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CTX9nI+l+jTlvtYfuIUJpxjytbyTmwWmiGbUoX39kz0=; b=jYp7erzkLHqd8ALqIUysIbs3Gm4bfwLk0NXzv1S/m+caSlmR9lanUASyGzSkRSqdEG 2YjR9tv13CZ8gw/Wo3ttkw8x9BBe9aZ4/gU+9nBWrnWctQzQ13/bJLrIjtybpNnt3JwN NO2w4TMPcZhlbPXpTwySQMeB/DmaGJtW0btUtwKFwpCZzX5HlaDhU7aSVzqoG0lNjD5X 78/G1QxtN/C62uCsLOSUAVVotGiJYyh8mqfURqIZep83NrzsdWcbTLcMZSIdgY39IKFj NQdbjUyHpULjTu0LJseTtQvhGC8rVNT4G9ysiasQKzPFJHdpFql70ag5n5Yr9151Y6Ur /19Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=CTX9nI+l+jTlvtYfuIUJpxjytbyTmwWmiGbUoX39kz0=; b=cZzV/1AB/7HQtL3ykRn06Mtbj+9DClvhy2oGKmi8AmsLpWB2FULRgDJPSuqcZf0Yx5 WbI5maUwboH0X2ke0JIvoVzeg4y8qWxGkKLi6q/I02n6W4C/3JRskElwd274rfpaOOB6 fFgTk4U/elnm5IWdHOG6IXAxuYhVfOoFckZpLjJFtvAy/1reEdBC3Sjlx/3nAcL0ZFj7 pdjvyWbSh2zXaJby3qRlGVzSSGkyiEQlhVrTdxEdCsqP4OnLcQ3C18IWSNtMsknjEH97 ooW6iFFEWBe2zMSp9KRcQcfEHhPEyc4ReUufvYcr4mM9loCwJV0IpsZ4wcdjL5iHE+Ay jAEA== X-Gm-Message-State: AOAM532hFmZg/Gemhx09pLhmpKuy7oTmLM67f31VdbOb554gXL+4fK7a 9S7hWqXvTzBnhcG9FBCGjyk= X-Google-Smtp-Source: ABdhPJyUlnvVMLsH86gqTbh26uwn9gMrsGYQqPwCZV23qJXAdQl8W5Hp0cr6OIK2CoZnZ04U5DN0hw== X-Received: by 2002:a17:90a:4083:: with SMTP id l3mr5155505pjg.109.1612893052380; Tue, 09 Feb 2021 09:50:52 -0800 (PST) Received: from bbox-1.mtv.corp.google.com ([2620:15c:211:201:d107:fbfb:a7c8:913e]) by smtp.gmail.com with ESMTPSA id c188sm7625194pfa.98.2021.02.09.09.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 09:50:51 -0800 (PST) From: Minchan Kim To: Andrew Morton Cc: linux-mm , LKML , Michal Hocko , David Hildenbrand , Minchan Kim Subject: [PATCH] mm: remove lru_add_drain_all in alloc_contig_range Date: Tue, 9 Feb 2021 09:50:48 -0800 Message-Id: <20210209175048.361638-1-minchan@kernel.org> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog MIME-Version: 1.0 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: __alloc_contig_migrate_range already has lru_add_drain_all call via migrate_prep. It's necessary to move LRU taget pages into LRU list to be able to isolated. However, lru_add_drain_all call after __alloc_contig_migrate_range is called is pointless. This patch removes it. Signed-off-by: Minchan Kim Acked-by: Vlastimil Babka Acked-by: Michal Hocko Reviewed-by: Oscar Salvador --- mm/page_alloc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 6446778cbc6b..f8fbee73dd6d 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -8603,8 +8603,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, * isolated thus they won't get removed from buddy. */ - lru_add_drain_all(); - order = 0; outer_start = start; while (!PageBuddy(pfn_to_page(outer_start))) {