Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp131260rdb; Tue, 5 Dec 2023 00:15:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGpAJWTyX8aU4npz5lWjpjSglzbaUh4m7PYk/mI2ZNgZeDxp9NsSC14DkEMl2x4E5/O4CgG X-Received: by 2002:a05:6830:2a87:b0:6d9:ade1:4ea1 with SMTP id s7-20020a0568302a8700b006d9ade14ea1mr1742691otu.1.1701764149206; Tue, 05 Dec 2023 00:15:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701764149; cv=none; d=google.com; s=arc-20160816; b=sknATxCdT/TcnC8qIu2kJd9MghMJsjioyvyHg5JGc9Cf4uoxiF1x4wQbWGUk09Dd9B K2svG78mjX2UDz27l3Cpo0rB+jXQYHqGdwlB8YC73KIKx2G30hYA0wyYB+GmyBUu51iF CQFl/E1QDv9+UFifLfZze19PcXvKsXuOK6D61z8aoQpYc2zG3CoXaj/PxWV/+qTEEPpY xpZbOOhaCgYvulBMzWAfmkeHnU31fPPyKo1mQ0zclrlFEUreHhqPaCI2ZGPLu5pfCPHD eD4gZxcu1LVmkON9+x5I9aNKNwLhgbG7V/JrjyUpJhp30DLkLH/yqW5WdHiUuXLRjf1H QYCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=9anVqRMnfV6B5EoLFHEo7lDtKN9nMWpzmp4bifNE4cs=; fh=mDlxLUzqICBJBxQMiZ11Xp+ukKvOiPOoIt3cBeb//0A=; b=DPWvHA6nA+C9WemlYSOgmUirocVrac/4vTR9LUCySotUNCeRfnf7qdMtrQviYCegyS cDOrwCP/uEnM8yUuavK3YE3b7JxluJo8q8rs6Vc+5QETlth2VCLW9dWeZvGVZuy2rEaZ UoIldcLMpZPtqhZy8vTsv5OZP9blMbHvPcs9gR9zsPDQ1+j5cEBvRw21RsVZZgzpt3Mm fQm01BWlzWIZUXUQ+eqdU3yhkhsvPLh+HZzahDkG1De9gbWqtdqupUjRDQk616zSf/eE 4nmB9mcIQQjhSBiVosWMv8nuPtGvNRI3d2RwN6g0yPvb0v9gPRBhpB2/v1VuYHZDTvn3 iBnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=omPDKffj; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=t+RWieXO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id k63-20020a632442000000b005c661b579c0si5083542pgk.68.2023.12.05.00.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 00:15:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=omPDKffj; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=t+RWieXO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 18F1C80473E4; Mon, 4 Dec 2023 12:07:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233461AbjLDUHV (ORCPT + 99 others); Mon, 4 Dec 2023 15:07:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbjLDUHV (ORCPT ); Mon, 4 Dec 2023 15:07:21 -0500 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F4D8D2; Mon, 4 Dec 2023 12:07:27 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 1521A3200AC2; Mon, 4 Dec 2023 15:07:24 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Mon, 04 Dec 2023 15:07:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1701720444; x=1701806844; bh=9anVqRMnfV6B5EoLFHEo7lDtKN9nMWpzmp4 bifNE4cs=; b=omPDKffjOnPSb+/bslfn4VK83XyifFieLu9Ywi75ziHYRaNiOJ5 mn1ySINpO9YTCpp5AK2eNi8GYbLpIV0eZguATq+gYc1i3Dto0Jts/q+eauDelC1E +9XUgxvp+5Gjan0i7yrsurgGcP3G7+NH51sYKB6bT6R6vtAQd1twQ58v0hor04BS eGjLfMbE2lbyRBwuLosW4D+lO2dEpzywTlYm98b47iPKhO/jEoKDRhhJHz3E1YAs 0teaAld5oZznBGs1kJLxPd82RQVYAF9hNmW3/4WkmWBRIekZmUtKgC+NFL+g8rXQ LjZBAnJH0vpg3yH8DtOxbGGoFcwYkwAI+hQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701720444; x=1701806844; bh=9anVqRMnfV6B5EoLFHEo7lDtKN9nMWpzmp4 bifNE4cs=; b=t+RWieXOS3fZHa+VhyXHDHf0FwTX1sBzS+EpcgwxTAdgNDNXlwC Kkk+2OP+dLwoMq0pQriVtJx6xRn7Q+MuLbZqdR18lFAbzbdbXJfzs0CvB1rDgYEg l3ZLw2g3mz+RIdEzdV+5Hx53EHr1M+gxDUZbKYP5VBTvKJYLFNL4rBiiuDUnE6dS CUdq/+IrbqPxDpCd7gGOHnInvynr1VyEM1kyB90lGGw/EEd2rLYeU+IGnug7GMK1 8/myhDo4KT71+HpqM22B95f8Tg8sUd2igxtb3vGRB/0EKtBsTU5hXqIcQL4uBiYW BlNBhLNmdji3snpdkBBhvrS3us0xBJxv16A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudejiedgudefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedf tehrnhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrf grthhtvghrnhepgeefjeehvdelvdffieejieejiedvvdfhleeivdelveehjeelteegudek tdfgjeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id F1A82B60089; Mon, 4 Dec 2023 15:07:23 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1178-geeaf0069a7-fm-20231114.001-geeaf0069 MIME-Version: 1.0 Message-Id: <820dd18d-21a9-4c0d-ad92-021dc9b782b4@app.fastmail.com> In-Reply-To: <8f5f9a4b-f809-44cb-8f26-05e39b29dfb6@wanadoo.fr> References: <20231204085735.4112882-1-arnd@kernel.org> <8f5f9a4b-f809-44cb-8f26-05e39b29dfb6@wanadoo.fr> Date: Mon, 04 Dec 2023 21:06:53 +0100 From: "Arnd Bergmann" To: "Christophe JAILLET" , "Arnd Bergmann" , "Yisen Zhuang" , "Salil Mehta" , "David S . Miller" , "Eric Dumazet" , "Jakub Kicinski" , "Paolo Abeni" Cc: "Jijie Shao" , "Hao Chen" , Netdev , linux-kernel@vger.kernel.org Subject: Re: [PATCH] [v2] net: hns3: reduce stack usage in hclge_dbg_dump_tm_pri() Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 04 Dec 2023 12:07:40 -0800 (PST) On Mon, Dec 4, 2023, at 19:54, Christophe JAILLET wrote: > Le 04/12/2023 =C3=A0 09:57, Arnd Bergmann a =C3=A9crit=C2=A0: >>=20 >> Use dynamic allocation for the largest stack object instead. It >> would be nice to rewrite this file to completely avoid the extra >> buffer and just use the one that was already allocated by debugfs, >> but that is a much larger change. >>=20 > could : > pos +=3D scnprintf(buf + pos, len - pos, "%s", ); > be more widely used to avoid the alloc()/free() + copy of strings? Yes, I think that would help, but this is beyond what I trust myself to do blindly. Arnd