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.3 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 72A51C4363D for ; Tue, 22 Sep 2020 15:38:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0DC142399A for ; Tue, 22 Sep 2020 15:38:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="jaaJudmC"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="5gN8aBAE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726737AbgIVPiT (ORCPT ); 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