From patchwork Wed Feb 10 16:04:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minchan Kim X-Patchwork-Id: 12081107 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 E2D22C433DB for ; Wed, 10 Feb 2021 16:05:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8F6EB64E08 for ; Wed, 10 Feb 2021 16:05:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F6EB64E08 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 0BFAA6B006C; Wed, 10 Feb 2021 11:05:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 06FDD6B006E; Wed, 10 Feb 2021 11:05:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC8476B0070; Wed, 10 Feb 2021 11:05:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id D7EC66B006C for ; Wed, 10 Feb 2021 11:05:00 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8257B1CFB6 for ; Wed, 10 Feb 2021 16:05:00 +0000 (UTC) X-FDA: 77802831960.18.son72_4609e9227611 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 1DFE2100ED0DB for ; Wed, 10 Feb 2021 16:05:00 +0000 (UTC) X-HE-Tag: son72_4609e9227611 X-Filterd-Recvd-Size: 4265 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Wed, 10 Feb 2021 16:04:59 +0000 (UTC) Received: by mail-pf1-f179.google.com with SMTP id q20so1535939pfu.8 for ; Wed, 10 Feb 2021 08:04:59 -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=JjnrEMtmAnoIwqw6c8TBD65sHh6j23Tk4gaVZSM437g=; b=n4U/qPzbSSCPTQ4CmXv6LZSc4TY/fDrYJDcE3Oi5T6Kgs2+8J1y4Lc2beG0iGi06Rk /9C689SzBecgZmRICTYOn4/MHlo68ZgTqilrkI5q/aRSh8G5tP6o2b+rjP6y1IID+b5q Q1MIO9iaNVvgL1fs+nInBrMHOKlbjS1kuwfzhIyM8t6oSVBT8LmzDohALY1W1w7b+v6u ubDMo5YyFKM3EbUhbb2qCimglXxSg/yjQ4F5VFD7h5dOyCjWHSxsX3bVGH+37sttbBQK p6i1byPY+4U438rKbVgmDW1ColSXsDnMg/vVZCvQofsi7GVLy+C4f4GKjpv8XiFKz6I2 6YEA== 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=JjnrEMtmAnoIwqw6c8TBD65sHh6j23Tk4gaVZSM437g=; b=cLZK8joFncMjYwnevdsHhNLXc42nCdkCIVciNzBR9diPSSbqL1N0L8TYytq+N7flA1 lv5LkajRa0ZM+G0jzQfoqq2RFyrpY/NIrlNgMUaKUS8y0PW/iFm3GAHh4WU+KisZkrrd Udg7XyEgGQFHEzDNadjTjcSaZ+En2YtdKrBTs+qhiJV1uyLE5PoE1UHuFEHJDcq9wes7 v7lQJ4DZ2WqABN4q4Wg1RMOxKetP4NO+RW2Npm0hx6rIN8itdktalBzF47P3jGnXD74U fO9aHWVdhePqcGtnlOl2CXxquVQVOBNnBhjppP16Qoa0W/QUtXhm2SKsz1aQhrgM80V5 HEXw== X-Gm-Message-State: AOAM5324YSul//G6/Nid8+MQ0y93McKVsIeYOtKNUoQ9Vp2MtbL4ULy4 ycv8/aQrhOvqEge9qCi2G7E= X-Google-Smtp-Source: ABdhPJzYyBsDIL+IHmLsoiZZEOKi+Mg+mjz5fDQSUqli6T4zljFiWUCtgaU07Vjx1S472MbDmt+Vow== X-Received: by 2002:a63:1965:: with SMTP id 37mr3704325pgz.49.1612973098600; Wed, 10 Feb 2021 08:04:58 -0800 (PST) Received: from bbox-1.mtv.corp.google.com ([2620:15c:211:201:e5b0:be96:1dfb:a1f6]) by smtp.gmail.com with ESMTPSA id p17sm2866380pgn.38.2021.02.10.08.04.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 08:04:57 -0800 (PST) From: Minchan Kim To: Andrew Morton Cc: linux-mm , LKML , mhocko@suse.com, david@redhat.com, osalvador@suse.de, vbabka@suse.cz, Minchan Kim Subject: [PATCH v2] mm: remove lru_add_drain_all in alloc_contig_range Date: Wed, 10 Feb 2021 08:04:51 -0800 Message-Id: <20210210160451.3888849-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 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 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))) {