From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DF49C43334 for ; Tue, 21 Jun 2022 01:27:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BD3F16B0072; Mon, 20 Jun 2022 21:27:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B842D6B0073; Mon, 20 Jun 2022 21:27:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A4CCB6B0074; Mon, 20 Jun 2022 21:27:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 94F786B0072 for ; Mon, 20 Jun 2022 21:27:02 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 6BE35120E40 for ; Tue, 21 Jun 2022 01:27:02 +0000 (UTC) X-FDA: 79600504284.29.254A73E Received: from relay5.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by imf25.hostedemail.com (Postfix) with ESMTP id 0F468A0017 for ; Tue, 21 Jun 2022 01:27:01 +0000 (UTC) Received: from omf13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 1CDB432FB4; Tue, 21 Jun 2022 01:27:01 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA id 8A60120012; Tue, 21 Jun 2022 01:26:59 +0000 (UTC) Message-ID: Subject: Re: [PATCH v4 00/34] Printbufs - new data structure for building strings From: Joe Perches To: Kent Overstreet Cc: David Laight , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "pmladek@suse.com" , "rostedt@goodmis.org" , "enozhatsky@chromium.org" , "linux@rasmusvillemoes.dk" , "willy@infradead.org" Date: Mon, 20 Jun 2022 18:26:58 -0700 In-Reply-To: <20220621005752.ohiq5besmy3r5rjo@moria.home.lan> References: <20220620004233.3805-1-kent.overstreet@gmail.com> <0a5901f8460f452a89c9b0cda32fb833@AcuMS.aculab.com> <20220620150514.3tjy5dv7pv5frcwd@moria.home.lan> <53d77ae6101a0f24cfb694174d4c7699424c57e8.camel@perches.com> <20220621005752.ohiq5besmy3r5rjo@moria.home.lan> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.1-0ubuntu1 MIME-Version: 1.0 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1+6laJhvDVSxjllgACLhEHrhgVyrTNCaWA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655774822; h=from:from:sender:reply-to:subject:subject: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=tUoTBp1Yav49YDjDsdWxv6r4643IVi2JND8niGpQrb8=; b=JkzWwKl9Wk4TFhBojmh5ZIOS+pCriXxEUowMTl8o5CwcWhvOqQxiktVxlsaQLJJEaHWbLF 5z1qS+Z+M0dtGojOMiHf7hnoqKDZVdTSExVhSWttnZK/6iyhyb2JYK6P8zmwqqdo1qzTN9 nb+BOG7uTixEjFFMKHfAfUYhYX5Mfyw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655774822; a=rsa-sha256; cv=none; b=QgAXGU6AYkNTl52TPVW4kbn7JtBnAIJDv3uHy7uTKTXfTRFHNJ1P5uQG47cNQIQH45eRSw +KBg7poh/8PhTUkHhTlHjdawkO1T0v5Jf2vwcjjBN5l+f4nJpknK73NSoRXJsSQUE8Fgc0 mm/grxmhJJgDfKVGToPCQIR17NRbXbM= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=none; spf=none (imf25.hostedemail.com: domain of joe@perches.com has no SPF policy when checking 216.40.44.17) smtp.mailfrom=joe@perches.com; dmarc=none X-Stat-Signature: 8idoygq4w99samsxb6fou3s6n13p86k6 Authentication-Results: imf25.hostedemail.com; dkim=none; spf=none (imf25.hostedemail.com: domain of joe@perches.com has no SPF policy when checking 216.40.44.17) smtp.mailfrom=joe@perches.com; dmarc=none X-HE-Tag-Orig: 1655774819-286916 X-Rspamd-Queue-Id: 0F468A0017 X-Rspamd-Server: rspam02 X-Rspam-User: X-HE-Tag: 1655774821-19510 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, 2022-06-20 at 20:57 -0400, Kent Overstreet wrote: > On Mon, Jun 20, 2022 at 05:38:51PM -0700, Joe Perches wrote: > > On Mon, 2022-06-20 at 11:07 -0400, Kent Overstreet wrote: > > > On Mon, Jun 20, 2022 at 04:19:31AM +0000, David Laight wrote: > > > > I really think that is a bad idea. > > > > printk() already uses a lot of stack, anything doing a recursive > > > > call is just making that worse. > > > > Especially since these calls can often be in error paths > > > > which are not often tested and can already be on deep stacks. > > >=20 > > > We went over this before - this patch series drastically reduces stac= k usage of > > > sprintf by eliminating a bunch of stack allocated buffers. Do try to = keep up... > >=20 > > I generally agree with David. > >=20 > > I think Kent has not provided data that this actually _reduces_ > > stack usage. >=20 > I think the people who are comfortable with reading C can discern that wh= en > large stack allocated character arrays are deleted, frame size and stack = usage > go down. I am very comfortable reading C. You have not provided any data.