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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35999C433F5 for ; Fri, 30 Sep 2022 17:27:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231917AbiI3R1U (ORCPT ); Fri, 30 Sep 2022 13:27:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232138AbiI3R1Q (ORCPT ); Fri, 30 Sep 2022 13:27:16 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 872561C3DF7; Fri, 30 Sep 2022 10:27:10 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 019271F8B9; Fri, 30 Sep 2022 17:27:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1664558829; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QFL6LlhwvZGz/p5H7pzHxGfwk3dZsCKYsSd1m5JM4oM=; b=fVFmnuf1u1KQlPpWHU/orNzNBxCa48mSUZkdDX4xlVMEG3NTwC9YxcZf+MalvdIs8VPDMC osCorspvdyRlzuSH6nWTp5FHT9YJrkRNI+xnlBo1Cinbk4bxPlh8r1QOWYUzGwN4Ing/dy eTbPx3G/4qET3f0xn+WB1F2qlpsf9P8= Received: from suse.cz (unknown [10.100.201.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 526442C161; Fri, 30 Sep 2022 17:27:08 +0000 (UTC) Date: Fri, 30 Sep 2022 19:27:04 +0200 From: Petr Mladek To: John Ogness Cc: Doug Anderson , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , LKML , Jason Wessel , Daniel Thompson , Greg Kroah-Hartman , Jiri Slaby , Aaron Tomlin , Luis Chamberlain , kgdb-bugreport@lists.sourceforge.net, linux-serial@vger.kernel.org Subject: Re: [PATCH printk 10/18] kgbd: Pretend that console list walk is safe Message-ID: References: <20220924000454.3319186-1-john.ogness@linutronix.de> <20220924000454.3319186-11-john.ogness@linutronix.de> <87o7uxugbr.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o7uxugbr.fsf@jogness.linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org On Fri 2022-09-30 15:50:56, John Ogness wrote: > On 2022-09-30, Petr Mladek wrote: > > Anyway, what about using the later added SRCU walk here? > > After all, this is exactly what RCU is for, isn't it? > > So I think a lot of the problems with this series is that SRCU is > introduced too late. We are debating things in patch 6 that are > irrelevant by patch 12. > I will rework the series so that the changes come in the following > order: > > 1. provide an atomic console_is_enabled() > > 2. convert the list to SRCU > > 3. move all iterators from console_lock()/console_trylock() to SRCU > > Step 3 may result in console_lock()/console_trylock() calls disappearing > or relocating to where they are needed for non-list-synchronization > purposes. I agree that introding SRCU as early as possible would help. The current patchset converts the same code several times... Best Regards, Petr