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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 416ACC388F7 for ; Tue, 20 Oct 2020 17:20:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8233322249 for ; Tue, 20 Oct 2020 17:20:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8233322249 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C67EF6B005C; Tue, 20 Oct 2020 13:20:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C174B6B0062; Tue, 20 Oct 2020 13:20:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B2DFF6B0071; Tue, 20 Oct 2020 13:20:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0181.hostedemail.com [216.40.44.181]) by kanga.kvack.org (Postfix) with ESMTP id 844826B005C for ; Tue, 20 Oct 2020 13:20:25 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 1B05D180AD815 for ; Tue, 20 Oct 2020 17:20:25 +0000 (UTC) X-FDA: 77392967610.22.birth92_0f1179127241 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id D569F18038E67 for ; Tue, 20 Oct 2020 17:20:24 +0000 (UTC) X-HE-Tag: birth92_0f1179127241 X-Filterd-Recvd-Size: 3305 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Tue, 20 Oct 2020 17:20:24 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id EDB3BAC23; Tue, 20 Oct 2020 17:20:22 +0000 (UTC) Subject: Re: [PATCH v2 3/5] mm/page_alloc: move pages to tail in move_to_free_list() To: David Hildenbrand , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linux-hyperv@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, Andrew Morton , Matthew Wilcox , Oscar Salvador , Pankaj Gupta , Wei Yang , Alexander Duyck , Mel Gorman , Michal Hocko , Dave Hansen , Mike Rapoport , Scott Cheloha , Michael Ellerman References: <20201005121534.15649-1-david@redhat.com> <20201005121534.15649-4-david@redhat.com> From: Vlastimil Babka Message-ID: <505935d6-90d2-3fce-57f0-5946968d6372@suse.cz> Date: Tue, 20 Oct 2020 19:20:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 MIME-Version: 1.0 In-Reply-To: <20201005121534.15649-4-david@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 10/5/20 2:15 PM, David Hildenbrand wrote: > Whenever we move pages between freelists via move_to_free_list()/ > move_freepages_block(), we don't actually touch the pages: > 1. Page isolation doesn't actually touch the pages, it simply isolates > pageblocks and moves all free pages to the MIGRATE_ISOLATE freelist. > When undoing isolation, we move the pages back to the target list. > 2. Page stealing (steal_suitable_fallback()) moves free pages directly > between lists without touching them. > 3. reserve_highatomic_pageblock()/unreserve_highatomic_pageblock() moves > free pages directly between freelists without touching them. > > 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. To simplify, let's move the > pages to the tail for all move_to_free_list()/move_freepages_block() users. > > In 2., the target list is empty, so there should be no change. In 3., > we might observe a change, however, highatomic is more concerned about > allocations succeeding than cache hotness - if we ever realize this > change degrades a workload, we can special-case this instance and add a > proper comment. > > This change results in all pages getting onlined via online_pages() to > be placed to the tail of the freelist. > > Reviewed-by: Oscar Salvador > Acked-by: Pankaj Gupta > Reviewed-by: Wei Yang Reviewed-by: Vlastimil Babka