Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4406585pxk; Wed, 30 Sep 2020 01:59:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYlTLaA5PCh41oGtOulJ7b4aEJqzpO2dXEJZealfOu7N9rFDztCrF1HIl9Db/6vOSkFmjB X-Received: by 2002:aa7:d6c6:: with SMTP id x6mr1610685edr.338.1601456372534; Wed, 30 Sep 2020 01:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601456372; cv=none; d=google.com; s=arc-20160816; b=hzzrJPkNWaI0TWZ7boexyWkHzVxvLT3w23ivKWsUAmM7Q7DiKqYK50f5T9emIqkAu4 tFIbADyK5CZb3cerjnPrGAICjZvW4sZZJqiMV/mDIXKQUOe78JmCb8aIYl2eBJLxnslR 2eV6d1h2LHkA/F50n+b4KzXKcwbNmy7jKr+W4fpdZT3+smiHNEb1pxW2Y5qFc+k5jPOl x08Jk6f39MQ7kSBAT49CCn4sNg8ul1lyaJ/69ur3pw3PLZcwUMgl6djfbLzHSttzgs5J f9UL+FacXm1aIegCI2alcRIx3+s1WgxgRDqkByNNYdmZc2DDXJnP+tNNlrBAOZTFK3YO LkAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=woD9pzgXC5ff0hRO1H3nIkWVVoLP8SqvJs5444aCGK8=; b=JWgjYTRpOOpA6WZn3e6UnscTP/ewZiXiGynnNYs0NXzErNWHtneAbehND6g1XncAx/ jdWJdeSzWbGX/fPrWKg0nTZElP5yzkLMHg3nNrD+flC/SibVkXaDtvGW7NwGe32KAVXi oYZAW0Pg7xuCWmdqcVdUCMwzcJbnSKS/wGCXln4ivonPj+ri1jdJPb61OJuep+WHOl8m BKvFmC8aCK1FpUUP6YCyiuq5nwJyTA/9C2rh+Bpur8IwqtNvXz5yfcaguRHnHoElDt2/ jO5V9Y1H3UYKvcfaXG+tS0EtGfNeyCJmbGPi9b4V3iQoTFuL96Eun/SXUsO1O7J7fwmo 4qWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=jJQp1HWb; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si850811ejd.606.2020.09.30.01.59.09; Wed, 30 Sep 2020 01:59:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=jJQp1HWb; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728758AbgI3I5Q (ORCPT + 99 others); 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