Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4030246pxk; Tue, 22 Sep 2020 08:40:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1LpwBnGgAeUs3QGR9XGSbsAcct7P/QteytlVqo+5XdeiBv182re77WPAgfcAnCLCAB9gd X-Received: by 2002:a17:906:49cb:: with SMTP id w11mr5352761ejv.530.1600789200697; Tue, 22 Sep 2020 08:40:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600789200; cv=none; d=google.com; s=arc-20160816; b=N4S3wOmBKbM61H8+LjoigJr312E//CQis3cQ80jC0bRwcrR2ACnmTsHubsmUVKlxT1 vAf0VcAs5FJecDm4dn/Dj5GL06Y8mDELo7Jcfo4Hq015QoGO/580kRB8FYF7ov+wtTTn H00Say4YLMK7sx3OJPPBDkePvrVaHJcBKM1me/D6eUlpfozNnsZIExsWCHGM+B0xDkkp 9ppQYKHveb700vhGxw1a3zdjaEMYNPnZYDfdQ8CeKshUvip+TkQ4Coh8cUGjwTRYpWak RtrLSCxDZ302qWII6nPOX+1a5oFZRpxEL/DIw+JWxSccpKdcbOYe3Z49aq+dkLI34I5L U7XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:dkim-signature:dkim-signature:from; bh=C3xWt4Ci5igCgIFK/Nm1a3v2HdT6L5CdsmqX9DuinYQ=; b=gNri+X00Cisblj1O7reLMzhpsXBqInyqt1T26cPeBtFCN+ECEmG9VpRlRnxo+q8auN 7UGgd2VY1hnI7Lk3BnxE2t2+6/4iCGmffgH5KGuDgTzM7PAhHaqeXszQ5N+ST4V/NZhV Xumht3AqB9p4ZmKm7T5LP1AkSyGmGfKfv4HIERaoknVE0ZTBnnYGTl84FxBoNPkB58S1 DtpLNxdeKMILRHTfUhxYTV8MjdgEQeT3Wx95uR/wPNPL6jA33C6OzfmZlFQrvkzYI1DK i5fAMsrCMI0rqfGgEtfNOlbObf6kIzHcudHnQNUulO8CoEY4kGsWSqHxLof8AXCYNciM FShQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=jaaJudmC; 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 me14si10756205ejb.397.2020.09.22.08.39.36; Tue, 22 Sep 2020 08:40:00 -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=jaaJudmC; 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 S1726672AbgIVPiT (ORCPT + 99 others); Tue, 22 Sep 2020 11:38:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726646AbgIVPiT (ORCPT ); Tue, 22 Sep 2020 11:38:19 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BB63C061755 for ; Tue, 22 Sep 2020 08:38:19 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1600789097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=C3xWt4Ci5igCgIFK/Nm1a3v2HdT6L5CdsmqX9DuinYQ=; b=jaaJudmC5kYdzw9HUY0OXheMijFTaIb9HTccF0umU4XQ03mFWKXGM/a5fx+P0mxsvjSkhZ CkxwVpM5jgUdAPblfIXkCd37h7lfVyGYxH0ar4GrGoqdM1mmB4Navc6JckqBt3PJdz8QNG CDcU9aXelOaPETJoVU2ELMRJJ9rs48TyTioqOI4xyVdLiVXEkr91zO9UWJVjvLGPzZgNRB OCn91ZHY9FbUiybYmtFJgWUW/LyQwycWaAiCC5wyS+nD/m2LLxCt5JF8SlZc1SNXdIsShU Cg4+HnoCYJ7Dh5oyrRRiZIC7pQyJYrHxV/HqLcFhzas/14QPpwRdFEq7G9V4xw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1600789097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=C3xWt4Ci5igCgIFK/Nm1a3v2HdT6L5CdsmqX9DuinYQ=; b=5gN8aBAEU4T3tAYBz9rWMhvE9xBAjH3XwimkVrEDMuQY5POaFJLj/WDKL0skNBbuUUlDfs /8Yp0vtbdNO1+JDQ== To: Petr Mladek Cc: Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH printk 0/5] printk: remove logbuf_lock Date: Tue, 22 Sep 2020 17:44:11 +0206 Message-Id: <20200922153816.5883-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Here is the next series for the printk-rework to remove @logbuf_lock. Since this lock protected more than just the ringbuffer, a new finer-grained @syslog_lock is introduced. With this series, vprintk_store() is lockless. A consequence of this locklessness is that a different method for using temporary sprint space was needed. A DIY memory buffer pool has been implemented for this. Since printk is used before per-cpu variables are available, I felt that this was the simplest approach. Feel free to throw tomatoes at me if another approach should be taken. (And please suggest that other approach.) Also as a consequence of a lockless vprintk_store() is that there is no longer a need for the NMI safe buffers. They are also removed. The safe buffers for printk recursion are still used. This series falls in line with the printk-rework plan as presented [0] at Linux Plumbers in Lisbon 2019. The series is based on the printk-rework branch of the printk git tree: f35efc78add6 ("printk: remove dict ring") John Ogness [0] https://linuxplumbersconf.org/event/4/contributions/290/attachments/276/463/lpc2019_jogness_printk.pdf (slide 23) John Ogness (5): printk: get new seq before enabling interrupts printk: kmsg_dump_rewind_nolock: start from first record printk: use buffer pool for sprint buffers printk: remove logbuf_lock, add syslog_lock printk: remove nmi safe buffers kernel/printk/internal.h | 4 +- kernel/printk/printk.c | 320 ++++++++++++++++++++++++------------ kernel/printk/printk_safe.c | 64 +------- 3 files changed, 218 insertions(+), 170 deletions(-) -- 2.20.1