Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35853480rwd; Mon, 10 Jul 2023 13:45:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlHnIAqQR/u8xv4atb0MHC42tCmQRav7ZmLuGwWPuEOJ4YxGo+sWmGgOouoq/ojjG/v2SU5m X-Received: by 2002:a05:6402:4c9:b0:51d:df5e:5674 with SMTP id n9-20020a05640204c900b0051ddf5e5674mr14669628edw.1.1689021934221; Mon, 10 Jul 2023 13:45:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689021934; cv=none; d=google.com; s=arc-20160816; b=j/23DEiL4upP6EXOvdzQ4IE+GmbgiZbX62TWtNqZxqTXtjS11exFOj1cjgo1Ehdr8c uLrQJFE2RhBEwZDkPar3/1n+qw/VBL22CctgN50SKikdSXWpNyoY9niDQjUh9SbwqMlx hYiG0x3IPlv8Rr+bZiRMzJwTeARGRt+TXNAheAZfPndmsYStaAZF/q6W3Fi2JKWzn58H sCoOTIr7an0VSZnd8yC8lrD7fXxsk4LvIKFLYyWPv0BtdMp9yT64PR3zGuJUdisH7OBY sMTXmUebtoonqp6y9KHf9zz/RmWbEST5uyb66sjKQJGtFe4jPDh4LkckOO3mMb7Ji7Ce leFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=gyH01PtizYUL5Svf5755bncRciNTpI+JDWU8HXJ7t6o=; fh=QuROCEuXw+BnYL1YtXSPXMHb+yQU6+Kxobz+6w3/v+o=; b=jglQfa0uJGj8P3335+NZz7E3yFd2GbBKSBiOk4e9nTDQCJHUeOvANEnDg9v0mCPgxd R4ZDv6sPkisQzeq1wA9LWBuuXKEYpgqxnsShDcZuwAyhJO4OE+OmCK0cYiahdyfRvEd6 rlBkml1Ca07AeCaOvxYOmawXY9Oc9FksjOPhVCCU2aZecogaNz9p5F8JhCDWCPUYkOMY rq/s7FpmIud6MO2qOTc1sjUY7PzlQZYyVDtQmCsoZLbw65BO8SKTlxt9qAtBfnZalzD8 QlgOarNNteIgIC6M2pSpXkdtEC5i6UQrdEaDVepNTp7t9FNs+2qYWrUNtjhXe/VcycIp nY5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=UBgdqqvt; 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 p13-20020aa7d30d000000b0051db8b08c6asi315204edq.571.2023.07.10.13.45.10; Mon, 10 Jul 2023 13:45:34 -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=@linux-foundation.org header.s=korg header.b=UBgdqqvt; 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 S230284AbjGJU0P (ORCPT + 99 others); Mon, 10 Jul 2023 16:26:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229560AbjGJU0O (ORCPT ); Mon, 10 Jul 2023 16:26:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD40B198; Mon, 10 Jul 2023 13:26:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 41B0E611C3; Mon, 10 Jul 2023 20:26:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AAD0C433C8; Mon, 10 Jul 2023 20:26:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1689020772; bh=Xjx+HnYnS65YQoXatRuMi3xuh6WSWvutNLaaTXSjmko=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UBgdqqvtm7sLAyH42SzguqVkleEGLdFy5ZE6qE+rQlIsaIfZSqgRARIqrMtGI51yh qGgvheCjkZYPDKQiZNGvKdjdUbOF1fuoXER7AoVIvZo0BvnDaisoszvYqQsbrbH6Gu c0GfnqKot1svigDw/XN/SGEe48D56tu1Y7DAHcZY= Date: Mon, 10 Jul 2023 13:26:11 -0700 From: Andrew Morton To: Yajun Deng Cc: corbet@lwn.net, hch@lst.de, m.szyprowski@samsung.com, robin.murphy@arm.com, paulmck@kernel.org, catalin.marinas@arm.com, rdunlap@infradead.org, peterz@infradead.org, rostedt@goodmis.org, kim.phillips@amd.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-mm@kvack.org Subject: Re: [PATCH] dma-contiguous: support numa CMA for specified node Message-Id: <20230710132611.ccf619f06f3ead06986cb7f4@linux-foundation.org> In-Reply-To: <20230710074944.3501810-1-yajun.deng@linux.dev> References: <20230710074944.3501810-1-yajun.deng@linux.dev> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,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 On Mon, 10 Jul 2023 15:49:44 +0800 Yajun Deng wrote: > The kernel parameter 'cma_pernuma=' only supports reserving the same > size of CMA area for each node. We need to reserve different sizes of > CMA area for specified nodes if these devices belong to different nodes. > > Change kernel parameter from 'cma_pernuma=' to 'numa_cma='. If node > isn't specified, it will reserve CMA area for per-numa node. if the node > is specified, it will reserve CMA area for the specified node. > > At the same time, print the node id in cma_declare_contiguous_nid() if > enabled CONFIG_NUMA. Changing an existing kernel parameter will break existing setups. It would be preferable to add a new parameter for this?