From mboxrd@z Thu Jan 1 00:00:00 1970 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=-18.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 D0E83C433DB for ; Tue, 9 Feb 2021 18:18:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6229B60C41 for ; Tue, 9 Feb 2021 18:18:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6229B60C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C9E156B0005; Tue, 9 Feb 2021 13:18:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C4E406B006C; Tue, 9 Feb 2021 13:18:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B64E76B006E; Tue, 9 Feb 2021 13:18:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0216.hostedemail.com [216.40.44.216]) by kanga.kvack.org (Postfix) with ESMTP id 9EEA86B0005 for ; Tue, 9 Feb 2021 13:18:08 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 64A318248076 for ; Tue, 9 Feb 2021 18:18:08 +0000 (UTC) X-FDA: 77799538656.10.cakes78_050b92327609 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 49DF61698E8 for ; Tue, 9 Feb 2021 18:18:08 +0000 (UTC) X-HE-Tag: cakes78_050b92327609 X-Filterd-Recvd-Size: 3546 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Feb 2021 18:18:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612894686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zdS/JNK+W4+/EonRhgG8sns52Ojv8+x5USFjY91rjWg=; b=A/gOXBkOWTpNofUqxwdXpAb78yFrC3diJV+iMpAq+cotd9ph2cBPqJRrclJj+JnefwOKnF w76WS+/2gnINmBUGLRuTCYBlK3Qf9AwcklYYlKJZ1CGb87PtXgo4eTyp9FDdoa0EOSX0d/ dua32uqXZUr2mXzO5uX9JNOfXU0LjhY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-498-sYh8g-K2OvmhnAjobrpvgA-1; Tue, 09 Feb 2021 13:18:03 -0500 X-MC-Unique: sYh8g-K2OvmhnAjobrpvgA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 68B578030C2; Tue, 9 Feb 2021 18:18:01 +0000 (UTC) Received: from [10.36.113.141] (ovpn-113-141.ams2.redhat.com [10.36.113.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEADF5D9C0; Tue, 9 Feb 2021 18:17:59 +0000 (UTC) Subject: Re: [PATCH] mm: remove lru_add_drain_all in alloc_contig_range To: Minchan Kim , Andrew Morton Cc: linux-mm , LKML , Michal Hocko , Vlastimil Babka References: <20210209175048.361638-1-minchan@kernel.org> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Tue, 9 Feb 2021 19:17:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20210209175048.361638-1-minchan@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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: On 09.02.21 18:50, Minchan Kim wrote: > __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 > --- > 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))) { > I was expecting some magical reason why this is still required but I am not able to find a compelling one. Maybe this is really some historical artifact. Let's see if other people know why this call here still exists. -- Thanks, David / dhildenb