Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4110000pxb; Mon, 1 Feb 2021 12:42:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwv1RVPvzzLdoj2CxobIEzaoYJqTmJZkLyzZTtNy5K2vGTFBtdclpYxBTCXUzB48Iy2BThk X-Received: by 2002:a50:ef0a:: with SMTP id m10mr21190067eds.38.1612212167733; Mon, 01 Feb 2021 12:42:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612212167; cv=none; d=google.com; s=arc-20160816; b=xQfNmNy+WaosAMXQxAB6bDX8jcy9PiGxM7eoSNIRWYe2ZdsH4RQwtvLymEPUzB/F6/ XKahUfdKVfBjL0ra/bzsNZwmg3XAxhk2VGALUldyGeGrokYliemk4Um1+M/z0RQut+Bv Vpb4I/j5TCAO1hoPyrYawq57g6XG4WC1TDnd/t2KGRyDTcGG8fV8FD2ZkD4ZWFJ7Vhxj HB+gu0Ws/gdUAaYh6I9CFZ8RB8jpXrKlI9H5QWXC0BD/3udsvydC32CTGJfw1387s22I czGjt91do327n+2muwq2bFZ2iTXc179oB6xFpRQg2SIhM/koBLT3muFoRb+4EivE0d1I qdzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=ik+2pHeaCJN3yC0VrQFpaKt/eoSUY23+5CwLQBsjvT4=; b=X22/XevymHadz7nlvTGmL+CGZvy+wa1gZyG4rBSip2USphAOILA2mHXF9mQybkyIwa OeNefgrY/LV4k6R3y9CdZexezdeafkTSFq7uVqm//tvQAJ4U2FXxyGVUVsz1f5NaVOsb bpOhMAAlqvEgpe1ReyYqCAQnCSRvoHcPsAMLlDbSNvF9PfY9FdoDTQbZUrI+sc7rzJVJ xZTCcnY9AUMpPRgiTdL3MO4uEWIjd5qOtsW8zA2xcDhg5zlRkY5VMqqwvW4RgETX150E F2EB0AgeGlNSrIfRvL7hfstJmve6uFR4qwHLyu5HXgeweatfBbtr0OQoQYq+5UFyu6R7 gRNg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r10si11489910edm.28.2021.02.01.12.42.20; Mon, 01 Feb 2021 12:42:47 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229707AbhBAUkv convert rfc822-to-8bit (ORCPT + 99 others); Mon, 1 Feb 2021 15:40:51 -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