Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp219354rwb; Fri, 12 Aug 2022 18:15:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR62S4Ki9piX4NKkHlXsKlJOrOv/Cz4LjKvN7t53euaM4zDlaATC1JnquGVCaQzsBkrciioG X-Received: by 2002:a17:907:7b95:b0:72f:9c64:4061 with SMTP id ne21-20020a1709077b9500b0072f9c644061mr4126833ejc.351.1660353343655; Fri, 12 Aug 2022 18:15:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660353343; cv=none; d=google.com; s=arc-20160816; b=MZ1LA5750LswLFxhNNcJERNSPdUQLdJkEqE8852/oz5nTDa5Dk6HT6wF/p627SEC63 2ioPY52yG6Y2Y8UhWjv7Ok4vmjwm1j0ceISVUh5j1OZdLkRfWC049uTwvGe5q3zAxULM ZPutYCnSd7F7XbdOwbVEauaZL3sY4ecrxBocNeeTjkKrUSYmrNkfLh1QCe6XZPwoJSpW GR+K5tE1Z6+6vg6pgR+NipoTzFDSg4SxYx0dWsvwlju1qHi/YwU3Y2bpwpzrz5KZxpLR rZjgBkaPskUkqAraunvxC/CE0a8tL1vrfZdbGxoijec5gJtKL9XEpl4fn1PN2q/tV5UQ 1F4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=JWBoT2glIn/13QDTu41Nqhp1XoaLX7F6+qyi5O/vBqI=; b=oyO/dCHUhdTqIT/Nyn0qT0nYxsH3rvZwcfM6GFKnUzrJlWH2HTv7/sbbFoh0kUYfYU a/XuHFIqgJzHIqLrH6PNfC+qkAnQSCu5XqzdLvTGWuwSArq1A043WJRQCJjuZy/yXI0k JSjgpvKfTeSt8aOo+8KEOSC2OyuS4EH3DAN+70keVq3R/kOKf13VyVBfwkflmnXQuZOc QZ3jngejDHim7iQ0sK0IqOzQ2yNI+p1sBM+pV7zrWh1iy6Webz4oAouCt6+k+FV0CZTU ybDrBhrtPD9HLVlV1n3HLfn4YocSeWyEIhU0nsssnYJ6Xn+3vcMD0NJCm/VsZfl/uR5A lBxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Vrk13mcL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc10-20020a170907168a00b0073065f0ddbdsi3242531ejc.599.2022.08.12.18.14.40; Fri, 12 Aug 2022 18:15:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Vrk13mcL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235683AbiHMBLu (ORCPT + 99 others); Fri, 12 Aug 2022 21:11:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234256AbiHMBLs (ORCPT ); Fri, 12 Aug 2022 21:11:48 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3ACEA598E for ; Fri, 12 Aug 2022 18:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=JWBoT2glIn/13QDTu41Nqhp1XoaLX7F6+qyi5O/vBqI=; b=Vrk13mcLQUjTlS7qDwG4jIdHoI q/89MPbAAkRadYDMu4MjWUVmwe99hDpczUWZLpkmYO/McelIQlhJQCljDCUeMEXqFjUqcjxLTsVu/ NFqaIrozbN9/a5iP+3oyd50TAdoJd197xQq47XAc/vamfsO9xU4qSHJqm6bGiFUN5T8i47lZSxCBB bI4hSiGwJq7xXTnkF1vi58Kkiztzo4dZt0B4OXyxOAPYDUypFoOqIgmPiyrm5Ga2giZgLnBY2ire0 ev7cp7AUIXRbRL1Yj/QXdWbdOPD1qlSFPlS9d4znI+asLAvPA2hqwQY/Qi755jhqRVJNk8hGZiApl /0UQcDgg==; Received: from [2601:1c0:6280:3f0::a6b3] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oMfgb-001eXA-3V; Sat, 13 Aug 2022 01:11:33 +0000 Message-ID: Date: Fri, 12 Aug 2022 18:11:32 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [RFC PATCH v2 09/12] mm: Make MAX_ORDER of buddy allocator configurable via Kconfig SET_MAX_ORDER. Content-Language: en-US To: Zi Yan , linux-mm@kvack.org Cc: David Hildenbrand , Matthew Wilcox , Vlastimil Babka , "Kirill A . Shutemov" , Mike Kravetz , John Hubbard , Yang Shi , David Rientjes , James Houghton , Mike Rapoport , linux-kernel@vger.kernel.org References: <20220811231643.1012912-1-zi.yan@sent.com> <20220811231643.1012912-10-zi.yan@sent.com> From: Randy Dunlap In-Reply-To: <20220811231643.1012912-10-zi.yan@sent.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi-- On 8/11/22 16:16, Zi Yan wrote: > diff --git a/mm/Kconfig b/mm/Kconfig > index bbe31e85afee..e558f5679707 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -441,6 +441,20 @@ config SPARSEMEM_VMEMMAP > pfn_to_page and page_to_pfn operations. This is the most > efficient option when sufficient kernel resources are available. > > +config SET_MAX_ORDER > + int "Set maximum order of buddy allocator" > + depends on SPARSEMEM_VMEMMAP && (ARCH_FORCE_MAX_ORDER = 0) > + range 10 255 > + default "10" > + 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. A value of 10 means that the largest free memory > + block is 2^10 pages. Please make sure that all lines of help text are indented with one tab + 2 spaces, as specified in Documentation/process/coding-style.rst. thanks. -- ~Randy