Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp706986ybl; Fri, 16 Aug 2019 02:42:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRUEoEXaA4gcR/Tqs1imwtNIyBWG0Y9j4e3nlFAq0yf8Omy5KYQfWicQ1eOVyWhbdruwwv X-Received: by 2002:a63:3006:: with SMTP id w6mr7047900pgw.440.1565948569390; Fri, 16 Aug 2019 02:42:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565948569; cv=none; d=google.com; s=arc-20160816; b=WZTkL4XWPBQyrWaQLY70XHpw2aIakBaCICTxhHSdH0FHNSXk3uoyZqiS1IqgF3dZ2V f2Bkim3r5w8jJ2sFzT2cUSR/9t8slrRi2Mwu6iywG/7/scbO3BQTRPGX9DQPg7tk8FON 40kwciBIotxk4Nu6+pyPrw+WudgbKHZqTP3XZeLgxQ+euUn387e0NeDXQqccuWTn+Xyf pjY9xKg4RHdjtUHo2MtOAsr7mazj4/Gf9Qt3lvDAZ1XKEUtJRHnG9ghOH3mvJ8rYV4pS AmLIa1VpylBmFleIQCY0xlukeDNG/dGorp0aY/qRoPhQAIDTZUtowSNhHjZyjlPmA/o9 uLZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=ANY5RrQoSXgtjPfF4EWXrJCXf/gbTFR2CwH8GlRa7p0=; b=mcpRrHLIvJkS6GyMDmkN2FsYAaxQhdRoHQUEBYz2hntNI6AU4qgzsWouHDVxNksoqB xSY5fysYz7YAtWVgjWZQVmlzF/kMgz+3RBkEPDPNYJirqJc1rzdy3Hd80a5PDQPSY3+z F51fLo3k8DDO2dPoQdcy0QCBZD2Xa1TDOPYfFsv0Zn4OZhno0MZ5bPE8Q3r4YSr3jQRv cM8a6V+MVBsCldmw8soZULc/GPmA/zjYIFutmjpx4XRhUUyv+qVTS7EKXj29niRvcacP jYcVgO9OqvjlHkp9IAAk4XkZ5ziN6xV/yZFETCAhsL3QOUPLDM5ucMwkHtpfrgr9ifJh NjpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m12si3658316plt.413.2019.08.16.02.42.31; Fri, 16 Aug 2019 02:42:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726980AbfHPJlt (ORCPT + 99 others); Fri, 16 Aug 2019 05:41:49 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:41840 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726765AbfHPJlt (ORCPT ); Fri, 16 Aug 2019 05:41:49 -0400 Received: from localhost ([127.0.0.1] helo=vostro.local) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1hyYjA-0006SV-I7; Fri, 16 Aug 2019 11:40:56 +0200 From: John Ogness To: Dave Young Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Andrea Parri , Thomas Gleixner , Sergey Senozhatsky , Brendan Higgins , kexec@lists.infradead.org, Simon Horman , Kazuhito Hagio Subject: Re: [RFC PATCH v4 9/9] printk: use a new ringbuffer implementation References: <20190807222634.1723-1-john.ogness@linutronix.de> <20190807222634.1723-10-john.ogness@linutronix.de> <20190816054651.GA4403@dhcp-128-65.nay.redhat.com> Date: Fri, 16 Aug 2019 11:40:54 +0200 In-Reply-To: <20190816054651.GA4403@dhcp-128-65.nay.redhat.com> (Dave Young's message of "Fri, 16 Aug 2019 13:46:51 +0800") Message-ID: <87y2ztwiqh.fsf@linutronix.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-08-16, Dave Young wrote: > John, can you cc kexec list for your later series? Sure. > On 08/08/19 at 12:32am, John Ogness wrote: >> This is a major change because the API (and underlying workings) of >> the new ringbuffer are completely different than the previous >> ringbuffer. Since there are several components of the printk >> infrastructure that use the ringbuffer API (console, /dev/kmsg, >> syslog, kmsg_dump), there are quite a few changes throughout the >> printk implementation. >> >> This is also a conservative change because it continues to use the >> logbuf_lock raw spinlock even though the new ringbuffer is lockless. >> >> The externally visible changes are: >> >> 1. The exported vmcore info has changed: >> >> - VMCOREINFO_SYMBOL(log_buf); >> - VMCOREINFO_SYMBOL(log_buf_len); >> - VMCOREINFO_SYMBOL(log_first_idx); >> - VMCOREINFO_SYMBOL(clear_idx); >> - VMCOREINFO_SYMBOL(log_next_idx); >> + VMCOREINFO_SYMBOL(printk_rb_static); >> + VMCOREINFO_SYMBOL(printk_rb_dynamic); > > I assumed this needs some userspace work in kexec, how did you test > them? I did not test any direct userspace access to the ringbuffer structures. > makedumpfile should need changes to dump the kernel log. > > Also kexec-tools includes a vmcore-dmesg.c to extrace dmesg from > /proc/vmcore. Thanks for the heads up. I'll take a look at it. The code changes should be straight forward. I expect there will need to be backwards compatibility. Perhaps it would check first for "printk_rb_*" then fallback to "log_*"? John Ogness