Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964889AbcDYUXk (ORCPT ); Mon, 25 Apr 2016 16:23:40 -0400 Received: from mail-ig0-f193.google.com ([209.85.213.193]:35953 "EHLO mail-ig0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964774AbcDYUXj (ORCPT ); Mon, 25 Apr 2016 16:23:39 -0400 MIME-Version: 1.0 In-Reply-To: <20160425160005.0eb36aea@gandalf.local.home> References: <20160425145606.598329f2@gandalf.local.home> <20160425190651.GL3448@twins.programming.kicks-ass.net> <20160425191815.GA24761@kroah.com> <20160425192435.GM3430@twins.programming.kicks-ass.net> <20160425195437.GA25465@kroah.com> <20160425160005.0eb36aea@gandalf.local.home> Date: Mon, 25 Apr 2016 13:23:36 -0700 X-Google-Sender-Auth: yZnLwdtBbUA0ApUadpXB5w-jnBc Message-ID: Subject: Re: [PATCH v2] printk: Add kernel parameter to disable writes to /dev/kmsg From: Linus Torvalds To: Steven Rostedt Cc: Greg Kroah-Hartman , Peter Zijlstra , LKML , Ingo Molnar , Borislav Petkov , Andrew Morton , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1319 Lines: 30 On Mon, Apr 25, 2016 at 1:00 PM, Steven Rostedt wrote: > > For the purpose to pass messages from early init through to final boot. > Systemd continued this for the same purpose. Which I agree is totally > legit. But where systemd fails, is that it continues to use this > interface far beyond the need. > > I agree with Andrew, we should have had a way to close the pipe after > the system was up and running. I really don't think this should be about open/close, but about rate limiting writes. I think we'd be much better off allowing writes during early boot (when the real root filesystem hasn't been started yet, so logging to disk doesn't work - at that point the kernel log really is a better alternative), and then just start throttling it later (possibly very aggressively). But the other issue is that once you actually have logging working, I don't see why you don't just look at the system logs. Yeah, it's not /var/log/messages any more, but it's not *that* hard to do. Just use "journalctl -k" instead of dmesg, and you won't be missing data. This is why I harp on rate limiting, and I think your patch is silly: it solves the wrong problem (the one that isn't a real problem), and it does it with a sledgehammer when a flyswatter would be more appropriate. Linus