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.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 13FDBC433E0 for ; Mon, 1 Feb 2021 20:41:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C61E364EC8 for ; Mon, 1 Feb 2021 20:41:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229959AbhBAUkw convert rfc822-to-8bit (ORCPT ); Mon, 1 Feb 2021 15:40:52 -0500 Received: from lithops.sigma-star.at ([195.201.40.130]:44142 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbhBAUkv (ORCPT ); Mon, 1 Feb 2021 15:40:51 -0500 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 2E57F608A38A; Mon, 1 Feb 2021 21:40:06 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id u55Rgbsdcb7O; Mon, 1 Feb 2021 21:40:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 46751608A38F; Mon, 1 Feb 2021 21:40:05 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id SeDVACmb7lFf; Mon, 1 Feb 2021 21:40:05 +0100 (CET) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 00928608A38A; Mon, 1 Feb 2021 21:40:04 +0100 (CET) Date: Mon, 1 Feb 2021 21:40:04 +0100 (CET) From: Richard Weinberger To: John Ogness Cc: Petr Mladek , Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , tglx , linux-kernel , Thomas Meyer Message-ID: <790609565.351317.1612212004428.JavaMail.zimbra@nod.at> In-Reply-To: <87v9bbzga2.fsf@jogness.linutronix.de> References: <20210126211551.26536-1-john.ogness@linutronix.de> <20210126211551.26536-10-john.ogness@linutronix.de> <875z3bk9z1.fsf@jogness.linutronix.de> <1829482025.350347.1612198481059.JavaMail.zimbra@nod.at> <87v9bbzga2.fsf@jogness.linutronix.de> Subject: Re: [PATCH printk-rework 09/12] um: synchronize kmsg_dumper MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF78 (Linux)/8.8.12_GA_3809) Thread-Topic: synchronize kmsg_dumper Thread-Index: E17+D8fWeMDO0Mf1cXCZePXLxQWrVw== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org John, ----- Ursprüngliche Mail ----- >>> The line was previously synchronized for the kmsg_dump_get_line() >>> call. But yes, it was not synchronized after the call, which is a bug if >>> the dump is triggered on multiple CPUs simultaneously. The commit >>> message should also mention that it is handling that bug. >>> >>>> IMHO, this patch is not needed. >>> >>> I am not familiar enough with ARCH=um to know if dumps can be triggered >>> on multiple CPUs simultaneously. Perhaps ThomasM or Richard can chime in >>> here. >> >> Well, uml has no SMP support, so no parallel dumps. :-) > > When I grep through arch/um, I see many uses of spinlocks. This would > imply that uml at least has some sort of preemption model where they are > needed. Dumps can trigger from any context and from multiple paths. > > If you are sure that this is no concern, then I will drop this patch > from my series. Currently uml selects ARCH_NO_PREEMPT, so no preemtion too. We have spinlocks at obvious places in arch/um/ just to be ready if uml supports SMP at some point. Does your patch have drawbacks right now for uml? If not, I'd suggest to keep it. Thanks, //richard