Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62661C7618D for ; Tue, 21 Mar 2023 11:41:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230214AbjCULlL (ORCPT ); Tue, 21 Mar 2023 07:41:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229872AbjCULlJ (ORCPT ); Tue, 21 Mar 2023 07:41:09 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B66A2170E; Tue, 21 Mar 2023 04:41:07 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6782021C90; Tue, 21 Mar 2023 11:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1679398866; h=from:from:reply-to: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=MwTj1oxYQNef9fyW1y1b6zGbRy/MsPXVId7UhSbxGHo=; b=PKV3JR3WSlhF3QR+TaeAlwtUggs2deWrLqNLbNztOzVlTqPHbHCD2S22muGH8UAsbytSCU HwKieIj/PsmbG/SLsuW4fwrr+ngHvqcqP/gStK0HeUpk1jsc6Tq0t5iocR1HGJIRCilPTp tIcb0OOPPiMNvc0/nTwbn9hO0jaBUi0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1679398866; h=from:from:reply-to: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=MwTj1oxYQNef9fyW1y1b6zGbRy/MsPXVId7UhSbxGHo=; b=CWZ8vl7U0gaxKv/IxIhWPeI1F3rphj7OJKaqjGufGdo+v8qg1QqDR+dQcIeI1D/AT6XQJn pxhAG8WcUFpP1pDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3518D13451; Tue, 21 Mar 2023 11:41:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5zO6C9KXGWTyAwAAMHmgww (envelope-from ); Tue, 21 Mar 2023 11:41:06 +0000 Message-ID: <38b82ca1-29c2-4ce5-b7d6-bf1b7dcc365b@suse.cz> Date: Tue, 21 Mar 2023 12:41:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCHv2] mm/page_alloc: Make deferred page init free pages in MAX_ORDER blocks Content-Language: en-US To: "Kirill A. Shutemov" , Andrew Morton , Mel Gorman , David Hildenbrand Cc: linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230321002415.20843-1-kirill.shutemov@linux.intel.com> From: Vlastimil Babka In-Reply-To: <20230321002415.20843-1-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/21/23 01:24, Kirill A. Shutemov wrote: > Normal page init path frees pages during the boot in MAX_ORDER chunks, > but deferred page init path does it in pageblock blocks. > > Change deferred page init path to work in MAX_ORDER blocks. > > For cases when MAX_ORDER is larger than pageblock, set migrate type to > MIGRATE_MOVABLE for all pageblocks covered by the page. Looks like the problems with migratetype were why commit e780149bcd4b ("mm: fix set pageblock migratetype in deferred struct page init") switched it from MAX_ORDER to pageblock_order. This should work better. > Signed-off-by: Kirill A. Shutemov Reviewed-by: Vlastimil Babka But I think you'll have to rebase on mm-unstable that moved some of the code to mm_init.c