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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00, BUG6152_INVALID_DATE_TZ_ABSURD,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INVALID_DATE_TZ_ABSURD,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4865C4727F for ; Wed, 30 Sep 2020 08:57:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5F79C20659 for ; Wed, 30 Sep 2020 08:57:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="jJQp1HWb"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="lh+IJ2VJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728858AbgI3I5Q (ORCPT ); Wed, 30 Sep 2020 04:57:16 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:54906 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728126AbgI3I5P (ORCPT ); Wed, 30 Sep 2020 04:57:15 -0400 From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1601456234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=woD9pzgXC5ff0hRO1H3nIkWVVoLP8SqvJs5444aCGK8=; b=jJQp1HWbh9P2hqSrit86X0MKxZ5wyVCwlytCdVFK7ypZSgJgvuvTu6LeXz/s816ZZnlAJI dp0he0IxFNwC7wmw/6VM56YhYcretrjMJp5p7o0pXQ9UWZykys2X/x7fO+BBMJTgtRUMvX 2cJIc0EGidJhentLvqI6Yo93zBJg0R8YTMosr0v18x9RSC0ZD05tFR5YKynsSTlEtkZQpn 0WkUyNk1of5FN0NPO4USvS1t3I+96u3MxbL725q+hYXaTR5ywnU2xRfpNwUbxtVi834uTW RUeecMPKnW5fd15SYPmNf7aQCGwWUbiLD85VS4EaiNBfShpqErotGcGnOFMjqQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1601456234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=woD9pzgXC5ff0hRO1H3nIkWVVoLP8SqvJs5444aCGK8=; b=lh+IJ2VJM+zpZfklL6cuC+uzeTiBpndxnJeoqlBXW9PxCD4Y2M7xfIULa/PxwzSoK3tWQ4 SX/QylVajELDHMBw== To: Petr Mladek , Rasmus Villemoes Cc: Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH printk 3/5] printk: use buffer pool for sprint buffers In-Reply-To: <20200930085131.GY29288@alley> References: <20200922153816.5883-1-john.ogness@linutronix.de> <20200922153816.5883-4-john.ogness@linutronix.de> <20200923151129.GC6442@alley> <2c95c16b-03e7-eadd-d3af-bedc6b0b471e@prevas.dk> <20200925082822.GL29288@alley> <4e36f308-a435-f9c1-2d4f-362e797c764e@prevas.dk> <20200930085131.GY29288@alley> Date: Wed, 30 Sep 2020 11:03:13 +0206 Message-ID: <87o8ln1w2e.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-09-30, Petr Mladek wrote: >> Doubling the cost of every single printk by unconditionally doing >> vsnprintf() twice is a bad idea. > > I would prefer to solve this when there are real life problems. > printk() should not get called in performance sensitive paths in > the first place. > > We could always make the code more complicated when it can be > justified. Extra buffers is yet another layer (code and memory) > in the processing. And the current arguments sounds theoretical. I am preparing a v2 that avoids the memory pool. John Ogness