From patchwork Wed Mar 3 20:45:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minchan Kim X-Patchwork-Id: 12114209 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,URIBL_BLOCKED,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 03C4FC433E0 for ; Wed, 3 Mar 2021 20:45:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6A6B864EF8 for ; Wed, 3 Mar 2021 20:45:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A6B864EF8 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 D30A96B0007; Wed, 3 Mar 2021 15:45:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D06FD6B0008; Wed, 3 Mar 2021 15:45:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BCEBB6B000A; Wed, 3 Mar 2021 15:45:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0098.hostedemail.com [216.40.44.98]) by kanga.kvack.org (Postfix) with ESMTP id 9CA2D6B0007 for ; Wed, 3 Mar 2021 15:45:38 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 462122659 for ; Wed, 3 Mar 2021 20:45:36 +0000 (UTC) X-FDA: 77879743872.18.79B9E55 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by imf26.hostedemail.com (Postfix) with ESMTP id 0BD624080F6B for ; Wed, 3 Mar 2021 20:45:22 +0000 (UTC) Received: by mail-pj1-f45.google.com with SMTP id d2so5141701pjs.4 for ; Wed, 03 Mar 2021 12:45:18 -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=32Qm/Uyf2Lhed9JgA1QJ7suEThHhdsVNGCD4lOn0G9Y=; b=Fp3P1jHF2RXHxJ6HE2oevW0qVoVfn2AJOv59VFIMl9j3cYi1E9SIlqsnCOI0yyZCVB w1NG3DOCcVe6S+F63FFT4vu7j3fVpTTW8an7y2y3uZiE4O4B8adI6W+2+n4UosmIXhfI JgdkYV2wPJ72XXWFszea6AkVRVIjiDR111pQ+Nc/IdsIpTuXFn872GOXKt6HZ1gxzmd2 UbqReUwdpBYFXoCvFEl/2BXXT9hPISA+RvK8URuSNe8JIZLrObFf30Eg/exw35ivkD7T dSTDQ5LHO/jd6KEsxSkZgEuivh6k1ZIpB/2/mRWCcVUff/RagLhe3Ry8J2dEqEPo2nOe t8KA== 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=32Qm/Uyf2Lhed9JgA1QJ7suEThHhdsVNGCD4lOn0G9Y=; b=Z3UePnlKBXqToJTZpVVBBnIcrYzmdHAduEGEjHJL4nV16NxRBubQKw78RuUtyISHyv gLOt9D0JtEKB3fNZifZ6aWvAjgZubi0bpRsNIqqfDZIZu4hy/aWq+yF6ncCnvYhVRWhp LCUqRcDkcq8xX8keYANveGOIfReJOwqTsjiunIo1SleveX6yF20sj/EcaqXiZLCM68Ed UoeQFQmqI44sl9Kr/fiYSZEVyNKslR3wSRWiqwAeYYLba9JfYbYImG7koWE8EkcMQjVl INQSNo4rFVH51lQ3vQOJO92/jPudiyGTfx24hFOV5RkwrBKZhD5lkJ5dqlQvzLZ6P9SA W3zw== X-Gm-Message-State: AOAM533JG5JKeVnQGdHegaP5UtBxwQqP0QM0MjWGj7M7BXvcl72IuP4M 1lMdZViLDKvBfWPE9zUxDFY= X-Google-Smtp-Source: ABdhPJz6qd0PVo3Tzd04F5outYkulshzoV4t+Uv8AJoOR15VhpkVw+PJYtNVrAezDstP+d3kZVD2QA== X-Received: by 2002:a17:902:b78a:b029:e4:8ce6:fb64 with SMTP id e10-20020a170902b78ab02900e48ce6fb64mr883900pls.77.1614804317601; Wed, 03 Mar 2021 12:45:17 -0800 (PST) Received: from bbox-1.mtv.corp.google.com ([2620:15c:211:201:c87:c34:99dc:ba23]) by smtp.gmail.com with ESMTPSA id y20sm14969784pfb.138.2021.03.03.12.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 12:45:16 -0800 (PST) From: Minchan Kim To: Andrew Morton Cc: LKML , linux-mm , joaodias@google.com, Minchan Kim , Oscar Salvador , Vlastimil Babka , Michal Hocko Subject: [PATCH RESEND v2] mm: remove lru_add_drain_all in alloc_contig_range Date: Wed, 3 Mar 2021 12:45:12 -0800 Message-Id: <20210303204512.2863087-1-minchan@kernel.org> X-Mailer: git-send-email 2.30.1.766.gb4fecdf3b7-goog MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 0BD624080F6B X-Stat-Signature: ti4beyj55tk5ooahthraqciictnnjmap Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf26; identity=mailfrom; envelope-from=""; helo=mail-pj1-f45.google.com; client-ip=209.85.216.45 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614804322-629351 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 pointless since it has changed source page freeing from putback_lru_pages to put_page[1]. This patch removes it. [1] c6c919eb90e0, ("mm: use put_page() to free page instead of putback_lru_page()" Reviewed-by: Oscar Salvador Acked-by: Vlastimil Babka Acked-by: Michal Hocko Signed-off-by: Minchan Kim --- * From v1 - https://lore.kernel.org/linux-mm/20210209175048.361638-1-minchan@kernel.org/ * add [Acked|Reviewed]-by - vbabka, mhocko, osalvador * add history to the description - vbabka mm/page_alloc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index f10966e3b4a5..11579f0ddba9 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -8616,8 +8616,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))) {