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 C2896C43334 for ; Tue, 21 Jun 2022 02:31:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0A0956B0072; Mon, 20 Jun 2022 22:31:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 051078E0001; Mon, 20 Jun 2022 22:31:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5A9D6B0074; Mon, 20 Jun 2022 22:31:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D851A6B0072 for ; Mon, 20 Jun 2022 22:31:48 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id AA9AB80E7E for ; Tue, 21 Jun 2022 02:31:48 +0000 (UTC) X-FDA: 79600667496.17.6F6921D Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) by imf11.hostedemail.com (Postfix) with ESMTP id 4E2B640014 for ; Tue, 21 Jun 2022 02:31:48 +0000 (UTC) Received: by mail-qv1-f47.google.com with SMTP id p31so18478276qvp.5 for ; Mon, 20 Jun 2022 19:31:48 -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=Bug3LXi1Aq6PRwRUvNUaWDOJ1zcASuYiUSH1Dvw5rS4=; b=ZIzAarIJwUG1UzRAc3XDmaIU7ID4JLGGYXAYm45TtviKkBsscq8QgmwifNWFchnYsf kZ7aDg6JPZdcip5nRIkOV+QktfEQwpIGIlfGjRyQGLdISvmn2qslg0C2zn4SdiIsIWuu wOT1sQ4FThObehTU+RRWq8NO31TfOkb9NghyML0dl+bg590te3b1+vs0UyW/4Rgxw4Nh O5xUOu7dXpGsdlymDtrI0rkfAPMqN0Ajdmk46xLfZQCk8YJjMwC7qANzbM4wBB4FH5b2 IN3puqtBFxr9LDY1Fe/9//DQw6aE3gBvUz2PCeOmKYP1IMgm5OmXciod12YXm5KPrhfl 00Wg== 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=Bug3LXi1Aq6PRwRUvNUaWDOJ1zcASuYiUSH1Dvw5rS4=; b=EdteTYJSmZIIv/Lxv9KZwsg8NnYZ9fm9M+dF2eJloU0oH9mup8ULmp56heFMOwmV3m YafiUFXznlfajWtUJgNzitSONeSgqpNpzpHW8nGkEe8neq7bfPumenpRuvBkVidXgrqu nZ+MHpWvkKcEvOkeQnacxvKNmv8ZNAl+YcuHrme6FdKI/ikFLscKj47kHwDBJMB4DXSC 79go15kXgRUunbkFhMlZzt75PUaKSSsOFzgNkyFSDAWdrXX7Q31vNdjJP+jqDZQuy60N X7ijk/ErG92ReoeVue2/n+M3YwZer/tOhKuLZXTUuBo623EjDho2L9BbJMhfh6B//REa oYog== X-Gm-Message-State: AJIora/Q0sq0sjyvhwo+jtBvcsaU6eat5CWuZfC2B2lteNJkQpcIVKKU 46OzokX6V1FfrahlgqgLBQ== X-Google-Smtp-Source: AGRyM1sKLR8mPrR5c57iQz1Ki3yWj3lrFksqjFTf0n2kFU/SXQfh7Deltq59LjbB2sU05EnmqWNPuw== X-Received: by 2002:ac8:4e90:0:b0:304:fe09:6c32 with SMTP id 16-20020ac84e90000000b00304fe096c32mr22037211qtp.157.1655778707596; Mon, 20 Jun 2022 19:31:47 -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 b64-20020a376743000000b006a5d4f32e5dsm12819128qkc.128.2022.06.20.19.31.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 19:31:46 -0700 (PDT) Date: Mon, 20 Jun 2022 22:31:45 -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: <20220621023145.sx3o3txbmbsa3br6@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZIzAarIJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf11.hostedemail.com: domain of kent.overstreet@gmail.com designates 209.85.219.47 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=1655778708; 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=Bug3LXi1Aq6PRwRUvNUaWDOJ1zcASuYiUSH1Dvw5rS4=; b=SonJOtkjuLhtyTp1XwP+kUUkDLJigqcV8/WoJBPgBaUvoaQjiRgdz1bOCAphWDZSA45ujV fwtJulKRBlBXP/11V/xc5UG/xGdXLeDNBcvWB4P45WLMtk4vUJeNzUkkTOV8V5PYVCWZ2f 4SofiXkXAGhg0TRENsYIvjyEv5xmf4s= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655778708; a=rsa-sha256; cv=none; b=FREkeYY4EmtYdDUV7gchHUVevD/a+J/NoZuCjmhKs/7kVzKhhv/5EGgHv25Jl029IuKdfR DBDaP4spoXHiNZmOy1WUhFeg9qblue8F1EtXodjEnE5uIvVnPbOMhGC/knxj6KhLeEKJrA l61u1+7CLWKt/FXXeIZvmzZeBgMMYZM= X-Rspamd-Queue-Id: 4E2B640014 Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZIzAarIJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf11.hostedemail.com: domain of kent.overstreet@gmail.com designates 209.85.219.47 as permitted sender) smtp.mailfrom=kent.overstreet@gmail.com X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: djyozu68bdaa7p4yompznb398off6o3h X-HE-Tag: 1655778708-474358 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, Jun 20, 2022 at 06:26:58PM -0700, Joe Perches wrote: > 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. > > > > > > > > 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. > > I am very comfortable reading C. > > You have not provided any data. It seems like neither of you have even bothered to check stack frame size in the current code, and you guys are the one asserting that this is an issue.