From patchwork Fri Sep 20 07:37:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 1987725 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=x8pT5i1Q; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=CE6+jTPd; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X94653lWdz1y2j for ; Fri, 20 Sep 2024 17:39:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RvnQk3ScgNMd7stNUPVRkz9DBNYL6mNWj+IWasNe8kM=; b=x8pT5i1QuY/8s9 ebjIU3Ju7PzqoSmXRNCf+ltxoob6yUk/O7ij2j8QU9BBBOtebuHWPsb2L3Vyr2wefn40QYzdWtddk 4KOEeg4eYGL3akVAtdDBkR6lwLFSqF8+KTmLWyGXv+ZtM/x7faDOPDmAAYEM6k2PC4DG9wCiwCKjv 8Wwks9fPZTLxVpUtHzPXUrAeZs/QlEVOuEvWKdxLuCsQ1FSQeaFhYn6btAP95VBPAT6b6T9HUCcr+ HkuSzX7AeIFdtBX7e8BaI5Vvth1TCx5oHOTm+TWpxPJqWHiLvuNbyt20PSqj5S3c7rxo3Y55TmOD7 KLTpVMw3C1oitIERIrtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srYEn-0000000Bdg3-0DrF; Fri, 20 Sep 2024 07:39:33 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1srYEh-0000000Bdab-26l9 for opensbi@lists.infradead.org; Fri, 20 Sep 2024 07:39:28 +0000 Received: by mail-pg1-x543.google.com with SMTP id 41be03b00d2f7-7163489149eso1361796a12.1 for ; Fri, 20 Sep 2024 00:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726817966; x=1727422766; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6WIZGgDDRkLULB2j4MdD1wL0XmzgRTr7v8RlhDtqXFg=; b=CE6+jTPd9Gb+zc3jIKJUTwJOoY0HqIeImeOBcXAS/kSaDy8bTTB52aSNYCJJt6jGPf L7oydkPtEl72OgPcwD+X0CKThHFWM1ac4LZqi/UJJo75y7b3mCZ1hMnDUW8zSsu6Z0lz LrnwfJBYRT3hF/cWDRK68APVCCFwF4b4/9/F9IQ8UO5339dHH6HEAr8amqGNH0HUhiiq qPfmN5TGUdx6xxWIWSQpZJdtY6gLtexsEEMOhhS2vcc54QIt+EhpfDhHbU/LYwgY58Qp xBhIGLJ4d/O/xTe7mJ0BZeb9Nv8NmfheUWOXAmZ8QPurq5T8X5t8C+Zm4VoxbDkRDJW8 c0Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726817966; x=1727422766; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6WIZGgDDRkLULB2j4MdD1wL0XmzgRTr7v8RlhDtqXFg=; b=wz/Koj/B9pBFFoMNfAQ+gF2J3hE0Y/xIkQbq25eAAErKlpmQvyt8/uXaW03fWSodqh lDo6u1YiLooDJK5hDfPqJQLEIoEWMfR+7jWNF6Ag7F+4F9GwUToR7q05Ph70lxmXrqzR f9E4hR3kDqCWn+lfkkBwWWpWbDB6fo4ye4JbSBo34DHkQBnMfJ3wRjH3GA3jyM3P79J7 RXpqT2ZxtOpuynlzAQcINhJEkgxDsOff1fhh6NwqA01dx5ycSF6GSxwqsbl2S6dsOpX6 qMf8sPdzyeTJ40TdrX4DmHN6pAntLjjp2PVNyt+ra2USgcUELImRmO5+QiUPrM41TMLh pXBA== X-Gm-Message-State: AOJu0Yynh6/PwkJlaYpNBbazVMyB+S51dpv8js+qfz3uOLZ8+r+5TLI6 qXB9T34xAej6UMrVT3ZxS+elsY2E2rcR+SwaOoXay/yDuk/Dew7V8v0LM4bT X-Google-Smtp-Source: AGHT+IH3vPXSZc/Tu8C9hGqyp0zsriyRuBAPw1StwmAjZpHTitTmry3vcx0cIxlyg6Bx9aJTsDuWeA== X-Received: by 2002:a05:6a20:65af:b0:1d3:eb6:c79b with SMTP id adf61e73a8af0-1d30eb6c99fmr1521190637.9.1726817966210; Fri, 20 Sep 2024 00:39:26 -0700 (PDT) Received: from localhost ([2001:da8:7001:11::cb]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71944ab4b36sm9307395b3a.47.2024.09.20.00.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2024 00:39:25 -0700 (PDT) From: Inochi Amaoto To: opensbi@lists.infradead.org Cc: Xing Xiaoguang , Xiang W , Inochi Amaoto Subject: [PATCH v2 1/2] platform: ensure enough heap size with debug triggers extension Date: Fri, 20 Sep 2024 15:37:35 +0800 Message-ID: <20240920073738.597300-2-inochiama@gmail.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240920073738.597300-1-inochiama@gmail.com> References: <20240920073738.597300-1-inochiama@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240920_003927_575557_E1D5C5D7 X-CRM114-Status: GOOD ( 10.18 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: DBTR introduce a big heap allocation to store hart state, this is allocated percpu and needs big space when CPU number is high. Increase the percpu part to fix this problem, and decrease the fixed part to avoid too big heap size. Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:543 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [inochiama(at)gmail.com] X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org DBTR introduce a big heap allocation to store hart state, this is allocated percpu and needs big space when CPU number is high. Increase the percpu part to fix this problem, and decrease the fixed part to avoid too big heap size. Fixes: 97f234f (lib: sbi: Introduce the SBI debug triggers extension support) Signed-off-by: Inochi Amaoto Reviewed-by: Xiang W --- include/sbi/sbi_platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sbi/sbi_platform.h b/include/sbi/sbi_platform.h index 7b3ac4b..d1c556c 100644 --- a/include/sbi/sbi_platform.h +++ b/include/sbi/sbi_platform.h @@ -152,7 +152,7 @@ struct sbi_platform_operations { /** Platform default heap size */ #define SBI_PLATFORM_DEFAULT_HEAP_SIZE(__num_hart) \ - (0x8000 + 0x800 * (__num_hart)) + (0x4000 + 0x2000 * (__num_hart)) /** Representation of a platform */ struct sbi_platform {