Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3688329rwb; Fri, 30 Sep 2022 07:06:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6lkGq5MCYCkss1+FPIVI7GrMRgx3Z1HqSUTTeCSL6gxXqzlmMTtNEiF+ILeJlvIt9fwjTn X-Received: by 2002:a17:906:db0e:b0:77b:82cf:54a6 with SMTP id xj14-20020a170906db0e00b0077b82cf54a6mr6525832ejb.691.1664546765525; Fri, 30 Sep 2022 07:06:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664546765; cv=none; d=google.com; s=arc-20160816; b=jzbW/i+zAG6XxD6qO0aAydjW4/6VAiRlX0z6jza//Mdy+I1TBy2UYxbRlhPsAGeBU5 DukBfpkhtPzs6WI7IMqR/H1larLv3oAWZxBYOmy3CCTTJt0KdWzCgtxhxtxMQe3oXUu3 EC1OX8BjEwQayBZWsWh41pGzjAqI5SuzNnEg+H9Yh3iAxL9HGEwDmj0sdVCV0qhi3LU4 xHNsNYpG/gYBGy5r2w7Pq7bXWoE6i9yQsyR7VFHfSFR9UUx9EglC0Xi+Iq7Qb1SGHdOg JqSTmhKVXmq7HjA0HT2x+1owDUJzZNmUwoPItDzKJ1hkEwGHvZ2Yi4vywU8UdDK8vFj3 rkMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=1OZgTaBWEcaQzJ86Oz30/kJlR6az74vxKOsEdbTFAX8=; b=c4tvzqxikla21R/ZfXG0beMPLiB/1cKyidC5Wtiyhb+kAaixATKPPze6TVULuvgNpI vu7QOwBt4+H1GnrqFI0fJsvKti1rBbsGgMLOoOlFh2Oj3eEY0L3WjvfvrDURNslH8//s LHnGqLqKR4yOr2yRLmvVKryu77BDHdw+5nueDDqVjtLeQzvitCiPRry3+LDM4EQm5kfh RZXIyYn1MLx+xMSDsy3LNRxiJew89NAM/44Y37v+88zAXzQkWA6dqq6N9HbJwdO3U8Kt GE3cWmTiq2F9p1pNSFX3KI2RDYcx2KO8+dA9jWaU5hxXWQmAoeP8/Uc96iG/NPoVL+kD ZTcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=A0hH8MBa; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="ml64D/Xg"; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r24-20020a170906549800b00741757d62adsi1556620ejo.993.2022.09.30.07.05.36; Fri, 30 Sep 2022 07:06:05 -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=@linutronix.de header.s=2020 header.b=A0hH8MBa; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="ml64D/Xg"; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230255AbiI3NpG (ORCPT + 99 others); Fri, 30 Sep 2022 09:45:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230198AbiI3NpC (ORCPT ); Fri, 30 Sep 2022 09:45:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFF3E29815; Fri, 30 Sep 2022 06:44:59 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1664545497; h=from:from:reply-to:subject:subject: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=1OZgTaBWEcaQzJ86Oz30/kJlR6az74vxKOsEdbTFAX8=; b=A0hH8MBaojWkXd5MBGXcx223TV1FAeFKbsOV7KO33rF8lOh1R+g+timvuUZRci0tjKOY/6 4WSp5XDEnq9s8dmyh+lD4UgBe99oiQSBnJlWTBSpQlP+hL5f3f56XQkhA5Gek+yaXvQMA4 1ex1ZtEifGPYeytDCd4vKMK5at2db6tQwsJHHdlEQyR2gne4qMw8O6/LR6GVoi4FZVrdHr 3MlN0xXdJ8Ws8yxf8Gy7X5I2Ka6Bh+EENVAln4K8v7CJxi1go+y5n3YRllExpunejo1OfM n9PfbjD5wmnFsp2oP6ZXz/CRyhz72AXZx31Vz+3jdKFEMg4vaOShZP2SI84mbA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1664545497; h=from:from:reply-to:subject:subject: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=1OZgTaBWEcaQzJ86Oz30/kJlR6az74vxKOsEdbTFAX8=; b=ml64D/XgKJ0aKgPtgkwESGaanTx5W5HjeWZ6FbPWgTg4fCFqFLXodxONMIjY2+soQIrz7R yMn32SAGpGeSqyBw== To: Petr Mladek , Doug Anderson Cc: 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 In-Reply-To: References: <20220924000454.3319186-1-john.ogness@linutronix.de> <20220924000454.3319186-11-john.ogness@linutronix.de> Date: Fri, 30 Sep 2022 15:50:56 +0206 Message-ID: <87o7uxugbr.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,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 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. John