Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3964498rwb; Fri, 30 Sep 2022 10:40:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM689ZsLY7CuZ7CIEY2cQcc/BM5/uPUE4adzkulRNN7eo1c3JdFbWrtohKqS0nGe1Yfz3H50 X-Received: by 2002:a17:90b:4b03:b0:202:a7e1:2c9a with SMTP id lx3-20020a17090b4b0300b00202a7e12c9amr10679667pjb.195.1664559608612; Fri, 30 Sep 2022 10:40:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664559608; cv=none; d=google.com; s=arc-20160816; b=R9r2TGEvNdS31LKLBxOSr58Few5I5vEHCAeAaSaDaqK/kDPq93dJCfpFiReAq93d76 kWYQiuT3LNdyVs702WFIPCWG/KHzRZpprjEy7e4cA3GFtrC3LGn1TdYEIYGOB0mwII9b VRgO0x4k9EJWfdpSyi6MSEDWB4BknuOelMpkaMsyNL00kiQXGwZ50YywYi4d1bUOqdBX MTpGt5zIiNNvdtAuUmVg/mrEzOJ0gOGk1umUBhkfd/UvK5EwvLyiu/2E/sf2TZsiPfm3 lwqPMvq029aV6daYyviwmBzCG1IY/Hi0VVykRNG82G+dK+ipuIOyvi+qwu5H8qbZ+E8A 0Ogg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QFL6LlhwvZGz/p5H7pzHxGfwk3dZsCKYsSd1m5JM4oM=; b=uqVE2OrcjOGzliE7jt3X8Wfoi5PKiixQM5U8ab+a5GWeqMOpumc/CKOfURUqRXaK+7 UaF6WstVQ7pCeMJ21upZwx0UV6Jv78H5OPhpP8g8mTGt25cEJGaBn8cMniiDlrzRWk72 ECg3nmIB6MKRzejO/qrFZr1bg7cEAvhl6n5xRH5T51Ma8LVi/vZh2+lUvL7TIrl5Gil9 4YFBjENhyoaZEGoXZczRQRZi+z1Ju2ail3L1p8QB0risqDlALWEIs1KRKBBQKoM1ChhE 5Aq21DL2S6FCzab0Hu4dXrzgyY8uCGbHEnf3K2KI/nxaAe8SUMK+RmuB5Rc8B+yaCXhg YN2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=fVFmnuf1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k4-20020a63ba04000000b00438b7cb307bsi3709759pgf.239.2022.09.30.10.39.50; Fri, 30 Sep 2022 10:40:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=fVFmnuf1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229522AbiI3R1W (ORCPT + 99 others); Fri, 30 Sep 2022 13:27:22 -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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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