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 BCC5DC43334 for ; Tue, 21 Jun 2022 00:57:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 22BFA6B0071; Mon, 20 Jun 2022 20:57:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1DC066B0073; Mon, 20 Jun 2022 20:57:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0A4866B0074; Mon, 20 Jun 2022 20:57:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id EF7666B0071 for ; Mon, 20 Jun 2022 20:57:55 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id C2789FB3 for ; Tue, 21 Jun 2022 00:57:55 +0000 (UTC) X-FDA: 79600430910.26.F4F3EFA Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) by imf26.hostedemail.com (Postfix) with ESMTP id 6AC761400B2 for ; Tue, 21 Jun 2022 00:57:55 +0000 (UTC) Received: by mail-qv1-f42.google.com with SMTP id t16so13285961qvh.1 for ; Mon, 20 Jun 2022 17:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=s9yCSknvivXOCDzx6BY6FbW8mnwWGLGgsKhyrZCinWU=; b=njxx+bhrRN/d5D7pBWAqvtB9LH64qZRgC9Gy2Dx0mKfxea66YfdkKR/lbtJqUMQWo2 wov/9mpBSRKVHW2zx9B6goeBTkv9JV5gRBPu+F4y4t3KNuohdWHD0w34la+Oox2lpMn+ l4aZQ2932xzeENYlbyBciutU4JI3If5eoO8QfDhbloYysYSvSskjyxMgxnvbRtCMeYP3 gugcalew2eu7Zpj+JADT65hTXyLiD5wpKs/DMuBWEQaWas9Yh5xuszdlO2/3/7ZAsAH6 cp7rrBvtPiv0OEffiOMlBRGKTmsolwzWK/I6r6milsfKq1ZXWYVM4whADlyBNN0qYyFC kQ/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=s9yCSknvivXOCDzx6BY6FbW8mnwWGLGgsKhyrZCinWU=; b=drREGmHQsnYKzydmKQ4jUu3h0cVyuPx7Hl7/GZ4Ek9swME0yUFMqhuj5y/Kn8I+91N InbU6gBaKf1lkc2mAtlsaCrc7WtKMmhPa/08dcbxeTy6wSOOX3r1ImL85+HKXaqTpp2n /8IAWbMD7PYR0KrHwLpdlnha6oWry9chZezqEn0vGK/cmUzunCOaF/FkvGdhxrdhLhi/ Z3RqWFiN0EkgGRVQapTMbSiRh4VZryg/cNn+7iZNE17ypiwWDmfuJ13/55zIHh1k6i1N oHQui6SDG4ZoCwakQAobzwu2xYp5kLAK9R33RntSWgjjKHgxNKiUonpWdvQfawYRI+01 0aIQ== X-Gm-Message-State: AJIora8oiHKnHCYi/TCPsLe7FYMJAThRze7uCYPOwoh7dJe7atri6Wol HIQSORWfapl3gtv/nCMfFORv9O5oRPp9zWI= X-Google-Smtp-Source: AGRyM1slrO9xwd2Aonm9UtY5AjVCx98e+png+gulVl2ecfSSdz90oZc4bznkwHR/J1H4BTOpBXgzWA== X-Received: by 2002:ac8:5790:0:b0:305:bd1:f7b0 with SMTP id v16-20020ac85790000000b003050bd1f7b0mr21931700qta.94.1655773074740; Mon, 20 Jun 2022 17:57:54 -0700 (PDT) Received: from localhost (c-73-219-103-14.hsd1.vt.comcast.net. [73.219.103.14]) by smtp.gmail.com with ESMTPSA id r8-20020a05622a034800b00304e4bbc369sm12057403qtw.10.2022.06.20.17.57.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 17:57:53 -0700 (PDT) Date: Mon, 20 Jun 2022 20:57:52 -0400 From: Kent Overstreet To: Joe Perches 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" Subject: Re: [PATCH v4 00/34] Printbufs - new data structure for building strings Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53d77ae6101a0f24cfb694174d4c7699424c57e8.camel@perches.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655773075; a=rsa-sha256; cv=none; b=I4yvZnYnW9jO2ujg5IQavJ4OkPV2YSzIDbtlqdqQ+5ITED1W8wbPQlWQJ9KTwPnDsUOSgg f9YrX5MQjEbQqwOO4QmtzO7CPmjmUyI1NSLBtj51KXkKnXX/NEldFFMDk6HKgTMEkOsmBb LhTRAhbzLm8M3aUPByTCIuMAxfHgHNo= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=njxx+bhr; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf26.hostedemail.com: domain of kent.overstreet@gmail.com designates 209.85.219.42 as permitted sender) smtp.mailfrom=kent.overstreet@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655773075; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=s9yCSknvivXOCDzx6BY6FbW8mnwWGLGgsKhyrZCinWU=; b=7ZZ9Ul+WtfD2cIpwyPwx98thZJL4z9Edlfh6+ZSJiZh3dAaL66xEN0r7h57bXMV0A4Z9tH rJPg4tVBlw6BxtsPlqWlEFHGXIoY80mJloy9cP/gC4QpPl6/uMTljlea6T758UK5IbRezu 5xZktYcwA3G49ZjtrS7zUj6milOqd1o= Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=njxx+bhr; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf26.hostedemail.com: domain of kent.overstreet@gmail.com designates 209.85.219.42 as permitted sender) smtp.mailfrom=kent.overstreet@gmail.com X-Stat-Signature: 5hp9zzqc77uj5zf8ss5hm8rjbpr3x5a1 X-Rspamd-Queue-Id: 6AC761400B2 X-Rspam-User: X-Rspamd-Server: rspam03 X-HE-Tag: 1655773075-95346 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000029, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. > > > > We went over this before - this patch series drastically reduces stack usage of > > sprintf by eliminating a bunch of stack allocated buffers. Do try to keep up... > > I generally agree with David. > > I think Kent has not provided data that this actually _reduces_ > stack usage. I think the people who are comfortable with reading C can discern that when large stack allocated character arrays are deleted, frame size and stack usage go down.