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=-17.5 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 E3262C433DB for ; Tue, 9 Mar 2021 16:31:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8CFA4601FB for ; Tue, 9 Mar 2021 16:31:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8CFA4601FB 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 256C78D0116; Tue, 9 Mar 2021 11:31:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 22D638D007F; Tue, 9 Mar 2021 11:31:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0F5AD8D0116; Tue, 9 Mar 2021 11:31:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0165.hostedemail.com [216.40.44.165]) by kanga.kvack.org (Postfix) with ESMTP id E811C8D007F for ; Tue, 9 Mar 2021 11:31:27 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id A61B91E0C for ; Tue, 9 Mar 2021 16:31:27 +0000 (UTC) X-FDA: 77900876214.19.0573663 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf28.hostedemail.com (Postfix) with ESMTP id 4540F20003A7 for ; Tue, 9 Mar 2021 16:31:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615307479; 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=2eBwkywOASVp/kvePJk1+t/Z7TCkxbP6z5J3Zg1UZfU=; b=TqCIyvKWk0XgxtpV2081QvoWLzfq8E6TTqoSIkTg/kfJmKDvx/5M+1RiJ1oNyZLvIOn5pU F5ATqEZH1HKpjg0oT7l1iSmoJ0jgIDXEFjIZZywQJDYia1Qk4pBKpBA2KxL8czSZyb6R3v sSeP/Pq4WMkGYVnIgsRC3bJvU/sOsvY= 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-210-Joo3Nc2JNo-0kmNL7ftE5w-1; Tue, 09 Mar 2021 11:31:14 -0500 X-MC-Unique: Joo3Nc2JNo-0kmNL7ftE5w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0AC45108BD06; Tue, 9 Mar 2021 16:31:13 +0000 (UTC) Received: from [10.36.114.143] (ovpn-114-143.ams2.redhat.com [10.36.114.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id C12255D6D7; Tue, 9 Mar 2021 16:31:10 +0000 (UTC) Subject: Re: [PATCH v2 1/2] mm: disable LRU pagevec during the migration temporarily To: Minchan Kim , Michal Hocko Cc: Andrew Morton , linux-mm , LKML , joaodias@google.com, surenb@google.com, cgoldswo@codeaurora.org, willy@infradead.org, vbabka@suse.cz, linux-fsdevel@vger.kernel.org References: <20210309051628.3105973-1-minchan@kernel.org> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <0ae7c7de-f274-c2ec-1b3a-a006ea280f98@redhat.com> Date: Tue, 9 Mar 2021 17:31:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: 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.15 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 4540F20003A7 X-Stat-Signature: re61byuwsyfr83b4177fsc1qibzd3owy Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf28; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=63.128.21.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615307486-806527 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: >>> Signed-off-by: Minchan Kim >>> --- >>> * from v1 - https://lore.kernel.org/lkml/20210302210949.2440120-1-minchan@kernel.org/ >>> * introduce __lru_add_drain_all to minimize changes - mhocko >>> * use lru_cache_disable for memory-hotplug >>> * schedule for every cpu at force_all_cpus >>> >>> * from RFC - http://lore.kernel.org/linux-mm/20210216170348.1513483-1-minchan@kernel.org >>> * use atomic and lru_add_drain_all for strict ordering - mhocko >>> * lru_cache_disable/enable - mhocko >>> >>> include/linux/migrate.h | 6 ++- >>> include/linux/swap.h | 2 + >>> mm/memory_hotplug.c | 3 +- >>> mm/mempolicy.c | 6 +++ >>> mm/migrate.c | 13 ++++--- >>> mm/page_alloc.c | 3 ++ >>> mm/swap.c | 82 +++++++++++++++++++++++++++++++++-------- >>> 7 files changed, 91 insertions(+), 24 deletions(-) >> >> Sorry for nit picking but I think the additional abstraction for >> migrate_prep is not really needed and we can remove some more code. >> Maybe we should even get rid of migrate_prep_local which only has a >> single caller and open coding lru draining with a comment would be >> better from code reading POV IMO. > > Thanks for the code. I agree with you. > However, in this moment, let's go with this one until we conclude. > The removal of migrate_prep could be easily done after that. > I am happy to work on it. Can you prepare + send along these cleanups so we can have a look at the end result? (either cleanups before or after your changes - doing cleanups before might be cleaner as we are not dealing with a fix here that we want to backport) -- Thanks, David / dhildenb