Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp849642pxt; Fri, 6 Aug 2021 15:47:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDwFVSix2Eo25NMTF+KGeDu9nWHFBlWHiHRS/gAW31/my93I8SrbiX+srcYcjjtm8QqqSN X-Received: by 2002:a92:c748:: with SMTP id y8mr324037ilp.2.1628290024454; Fri, 06 Aug 2021 15:47:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628290024; cv=none; d=google.com; s=arc-20160816; b=YDjdHT+5EAVgXKT3JaUYRHSlDcLuz33BvMhafhbfsEoRNBT4t65LgW4f092wtOXBMW zC+guTO/dEjVeiyUHoNweGrQa2ytByWc14pBfMdpJVXypiJtDhzKu/8sFBwdvIBMho9h dFJ/jQqSsxX71D9PHMmjvY8mJip7gBa7ctBDkQgae6l5OtFRmpK84ZMJl6dUDDyM+Y6i /g5m/Psms2ylO+I+oY2NfGMCugh40xmDY15EPTsB0rfepH2LxbUL60S/lIrZR5xp+7fZ PAqGiG8/lvEKQ3rdxRbCUN5QArrT5sQlQpxmn71syL9AqQS/gEQH8PpGoGKUzR5A0v8t M0Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature; bh=Ji7CNaKcKGHeWsie3QdsczqRV/JKE+/AAwQ8IVed0y4=; b=AuPRtXoQkn0HXi5GduJqJtgVz6BWNgmgQAYo0BPwYvBvlyTIgbHwKSQaOa+W3JERON 2mB57a/cXgqJaXG4W1xokFUcQ+JMn/uczfzao8n2A5Y57Bzin81fOg18WNgo2BbpzxOX XcW3Fg3c4VdvpTYdHy/p+c0Y32la1PS2O1M6ZC5JFHlCm4z0MYx3vJRU8AL5ZcjHaQBX vBDXbCrySWy7IkfvbOxbTvBkOzB8w6tb1qYMCbE9KB2rpY6rBQW18b9y18uOaWX94kOe 6JU/vzdLx0atkLnagSGAlYb7nrPYBn6hoqYGtBDNRytBLgR0cOSIc2ESCpQsx966z8PB Fntw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="OmmOV4/V"; dkim=neutral (no key) header.i=@suse.cz; 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 t16si10754129jaq.36.2021.08.06.15.46.37; Fri, 06 Aug 2021 15:47:04 -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; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="OmmOV4/V"; dkim=neutral (no key) header.i=@suse.cz; 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 S244116AbhHFPRR (ORCPT + 99 others); Fri, 6 Aug 2021 11:17:17 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:59454 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232091AbhHFPRQ (ORCPT ); Fri, 6 Aug 2021 11:17:16 -0400 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > >