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=-9.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 18A62C4320A for ; Fri, 6 Aug 2021 15:17:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9277461159 for ; Fri, 6 Aug 2021 15:17:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9277461159 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id E05EF6B006C; Fri, 6 Aug 2021 11:17:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DB4006B0071; Fri, 6 Aug 2021 11:17:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CA2A46B0072; Fri, 6 Aug 2021 11:17:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0113.hostedemail.com [216.40.44.113]) by kanga.kvack.org (Postfix) with ESMTP id ADDDC6B006C for ; Fri, 6 Aug 2021 11:17:02 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 521CF8249980 for ; Fri, 6 Aug 2021 15:17:02 +0000 (UTC) X-FDA: 78445008684.24.DD3CE9B Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf08.hostedemail.com (Postfix) with ESMTP id 74DFB3008BCD for ; Fri, 6 Aug 2021 15:17:01 +0000 (UTC) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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-out2.suse.de (Postfix) with ESMTPS id D72CC1FEDC; Fri, 6 Aug 2021 15:16:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1628263019; 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=Ji7CNaKcKGHeWsie3QdsczqRV/JKE+/AAwQ8IVed0y4=; b=OmmOV4/V+3J4IDCgzcpuvnlYwlEPuguUXfMNvgIUO+2EMBszfJw7GJo0j/eBoRSKsEjZSL 6os1q31ixX3UaAQXJiBQohNbuFos9kPhNdOottXZYPhk9Q62QhZlJ53BSDSOuvMSoOqciT anV15cj9aRsrGr5gdsN0DBK8FUwBDBM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1628263019; 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=Ji7CNaKcKGHeWsie3QdsczqRV/JKE+/AAwQ8IVed0y4=; b=VqEyOwMDrK8XCX4Pl4ntewOdtNSWg8cIdbtynH9VJ7IccIi+oxHCJV3vYb5cbl4/MsmHje x2G35Cre4yEskxDg== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 imap1.suse-dmz.suse.de (Postfix) with ESMTPS id A815E13A86; Fri, 6 Aug 2021 15:16:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id zxRLKGtSDWHMKgAAGKfGzw (envelope-from ); Fri, 06 Aug 2021 15:16:59 +0000 Subject: Re: [RFC PATCH 12/15] mm: Make MAX_ORDER of buddy allocator configurable via Kconfig SET_MAX_ORDER. To: Zi Yan , David Hildenbrand , linux-mm@kvack.org Cc: Matthew Wilcox , "Kirill A . Shutemov" , Mike Kravetz , Michal Hocko , John Hubbard , linux-kernel@vger.kernel.org, Kees Cook , Peter Zijlstra , Nicholas Piggin , Thomas Gleixner References: <20210805190253.2795604-1-zi.yan@sent.com> <20210805190253.2795604-13-zi.yan@sent.com> From: Vlastimil Babka Message-ID: <1a5c17ac-7f63-6aae-b83b-4438bfa6fe34@suse.cz> Date: Fri, 6 Aug 2021 17:16:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210805190253.2795604-13-zi.yan@sent.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b="OmmOV4/V"; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=VqEyOwMD; dmarc=none; spf=pass (imf08.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Stat-Signature: gtpw6mhkhm18ni6yg6z66cxwqar71bxz X-Rspamd-Queue-Id: 74DFB3008BCD X-Rspamd-Server: rspam01 X-HE-Tag: 1628263021-558409 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 8/5/21 9:02 PM, Zi Yan wrote: > From: Zi Yan > +config SET_MAX_ORDER > + int "Set maximum order of buddy allocator" > + depends on SPARSEMEM_VMEMMAP && (ARCH_FORCE_MAX_ORDER = 0) > + range 11 255 > + default "11" > + help > + The kernel memory allocator divides physically contiguous memory > + blocks into "zones", where each zone is a power of two number of > + pages. This option selects the largest power of two that the kernel > + keeps in the memory allocator. If you need to allocate very large > + blocks of physically contiguous memory, then you may need to > + increase this value. > + > + This config option is actually maximum order plus one. For example, > + a value of 11 means that the largest free memory block is 2^10 pages. It's enough that it's confusing for the devs, we could spare the users and add +1 to the value they specify :) > config HAVE_MEMBLOCK_PHYS_MAP > bool > >