Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3123484pxk; Mon, 5 Oct 2020 01:25:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzS1+uoLvbWvO7jPih3K04MsCrAUYXjjfalXYMLANcf819QJFLnPvD/33q/lofHP3PnemIr X-Received: by 2002:a17:907:33ca:: with SMTP id zk10mr14005261ejb.317.1601886305126; Mon, 05 Oct 2020 01:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601886305; cv=none; d=google.com; s=arc-20160816; b=d8Z8cs88LNWOwTnhqd+E7W5b8cHGGTkoMIk+D3OaT0oavFjsJU+Zy6XV9HVBlckhA/ 25HoUhXpo066Fc6hPy71X2OSrlD6YFGgKx26nCFcU/S7/pX+l7eJLRVB1FESIE+Cz9Is MsihcHZpAiP49F74uWSQH54tk1Xf1WXvFUCbU+L9jSHm91UHuXWL70MmNJgnzz2H5tYj qV2/1K7g8zgb8AV7fQiyOYFZioJI2bbPtmdPCjh0NguXBRTikqY+Tb788lPob0m06EzD DI04HbKQ+ZhFu+S/LLnaengDKWEb+L83lu/jL4M5E/RcrXCknBV1hklSaW4Wd6xQkuxl cGsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=owVVQ2sWGfS95W02ISzyszyrNnBPRJ12QYRFDJDh4vo=; b=0yY8ARoKBF8GJON/RFHI0CsyxJ1g3rf1mT6gaQOq/Zq/HjW/Zim62/4zsATVHw4Tw8 ycgNMokSGHw/kPQh13DAGeGTpDMqlw5iZVcKqINyTc0q8pqwDxhRnWiPMdBzJnSxnlDk vYlsNm9sG4l577WiAS7GgWK/ke9sUfJ23xdyd7OjlU6s04Jqc5cUW3tRM5aDCUULF6o+ FNtVNCppBDX3P0Ctc+/AeSNdYgEoKEKVb3zKUaTTvoV9oZAHQ6jsqMw4U0o0IdMXXdkk F+nt1Lqx2yD3DoMuI5dAeB/4p12dwyNSRT3i82B9JOiOxd7QRCH21LM/+WycyyAKizzO feZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q22si1218199edg.439.2020.10.05.01.24.43; Mon, 05 Oct 2020 01:25:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726197AbgJEIUx (ORCPT + 99 others); Mon, 5 Oct 2020 04:20:53 -0400 Received: from outbound-smtp54.blacknight.com ([46.22.136.238]:41807 "EHLO outbound-smtp54.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbgJEIUw (ORCPT ); Mon, 5 Oct 2020 04:20:52 -0400 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp54.blacknight.com (Postfix) with ESMTPS id 28837FB716 for ; Mon, 5 Oct 2020 09:20:51 +0100 (IST) Received: (qmail 11945 invoked from network); 5 Oct 2020 08:20:50 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 5 Oct 2020 08:20:50 -0000 Date: Mon, 5 Oct 2020 09:20:49 +0100 From: Mel Gorman To: Michal Hocko Cc: David Hildenbrand , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-hyperv@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, Andrew Morton , Oscar Salvador , Alexander Duyck , Dave Hansen , Wei Yang , Mike Rapoport , Scott Cheloha , Michael Ellerman Subject: Re: [PATCH v1 3/5] mm/page_alloc: always move pages to the tail of the freelist in unset_migratetype_isolate() Message-ID: <20201005082049.GI3227@techsingularity.net> References: <20200928182110.7050-1-david@redhat.com> <20200928182110.7050-4-david@redhat.com> <20201002132404.GI4555@dhcp22.suse.cz> <20201005065648.GO4555@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20201005065648.GO4555@dhcp22.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 05, 2020 at 08:56:48AM +0200, Michal Hocko wrote: > On Fri 02-10-20 17:20:09, David Hildenbrand wrote: > > On 02.10.20 15:24, Michal Hocko wrote: > > > On Mon 28-09-20 20:21:08, David Hildenbrand wrote: > > >> Page isolation doesn't actually touch the pages, it simply isolates > > >> pageblocks and moves all free pages to the MIGRATE_ISOLATE freelist. > > >> > > >> We already place pages to the tail of the freelists when undoing > > >> isolation via __putback_isolated_page(), let's do it in any case > > >> (e.g., if order <= pageblock_order) and document the behavior. > > >> > > >> Add a "to_tail" parameter to move_freepages_block() but introduce a > > >> a new move_to_free_list_tail() - similar to add_to_free_list_tail(). > > >> > > >> This change results in all pages getting onlined via online_pages() to > > >> be placed to the tail of the freelist. > > > > > > Is there anything preventing to do this unconditionally? Or in other > > > words is any of the existing callers of move_freepages_block benefiting > > > from adding to the head? > > > > 1. mm/page_isolation.c:set_migratetype_isolate() > > > > We move stuff to the MIGRATE_ISOLATE list, we don't care about the order > > there. > > > > 2. steal_suitable_fallback(): > > > > I don't think we care too much about the order when already stealing > > pageblocks ... and the freelist is empty I guess? > > > > 3. reserve_highatomic_pageblock()/unreserve_highatomic_pageblock() > > > > Not sure if we really care. > > Honestly, I have no idea. I can imagine that some atomic high order > workloads (e.g. in net) might benefit from cache line hot pages but I am > not sure this is really observable. The highatomic reserve is more concerned that about the allocation succeeding than it is about cache hotness. -- Mel Gorman SUSE Labs