Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp289910rdh; Wed, 7 Feb 2024 05:06:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUq+uiJXuemMRph+QCJaewkfromo0TLwFwN0tODVpHPARiHN3RQCwyNJ40o12Z3F9ocQYq6tVsfLpk+DQjT181fqDb4VUfC/EzZ37qTXA== X-Google-Smtp-Source: AGHT+IGd3IochxoUzCOzOqYLdjmDV+TY6Bsx06CuH9vUX9L6vScPhnQdGrynjXEJiFArXk8GtcSR X-Received: by 2002:a05:6a20:2c8a:b0:19e:3a9f:f925 with SMTP id g10-20020a056a202c8a00b0019e3a9ff925mr3486621pzj.14.1707311167492; Wed, 07 Feb 2024 05:06:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707311167; cv=pass; d=google.com; s=arc-20160816; b=xNU1aML6R2AKI5CoBHzh2Kby3CCk8PZtP3hnVVYLl6bJwr2YriB0YXlJ45q0AnkOrW aZSKuKmxkBtHZOuF/zWrizew9hiXBfB8ZqAu+oHLfE1m3HF7oP472AjBeFUvv+rZmQXn vSYiQ30167dCOzsQh/69qXN3sAGEmqJqZBZlQyXOAFxCHvIta28g7+UMqW8ib16YeU/t Z1Qo7bo5T5BVU0Sh+kOYFwGlH7/nUTj2d1taTGgGFpd/DDCRLluiGvdjgNiH3TJYbDtP mF3uTnLr+xMqxuOoaiiJyjV3V4hS1cHGUVoaEdDKov4n5sVgbOWA01RzzVF/k5pfA4o/ kAzQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=x6nGer9hwb9V43aQD6TonkhwKDUWxh83YWENmNzzbSY=; fh=cQ1se/KZ15Grv8JpQOb1kpNhVIBYeo9c3d85WYro/Es=; b=gNuubv/G+keAYVpoll1PKnaUWWCPnXc8S+MZg9jTgRxjFUeqYFeeC6PbUA53kwE9J2 Vfmu4Ice+jfiu4YIrTInyCpwLYOKsPvGAuUj5psxPJ9lrv89lvISht79zkj0yDDSli69 omdIdowxK6uUT6BJhK7VrIkN2R1hDPmAz0GUcFzKXaC2dIE4DYk3Tya9s5RcN88E4mcv WrdcqvMskaxRHjj4XqRBrISLduqVcq6/8URVgwVQUtDYltFbjxgEhP3TViNWCdfnkYfR 0ieX45EfOGHcE4olroY1ultoJNHd3FsvP5U+roo6CmqtpQUAM1E8YDuj1x8JM/AQYknU Jgsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=Ly1NyYWw; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-56507-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56507-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com X-Forwarded-Encrypted: i=2; AJvYcCWi/mQBkOnYBND8kW6rOTFFQPpUUyktCZ5Zn6MAfpXi1tFdrsJ8a61WQUbwYMIBoPA+MH5HOxY25UJbYzQGgNWqXwStqPWPxvdgoQm3Qw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ch7-20020a056a0208c700b005d3cd19d20fsi1548040pgb.479.2024.02.07.05.06.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:06:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56507-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=Ly1NyYWw; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-56507-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56507-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0D8A428923F for ; Wed, 7 Feb 2024 13:04:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 771837605F; Wed, 7 Feb 2024 13:04:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Ly1NyYWw" Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E09176059 for ; Wed, 7 Feb 2024 13:04:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311067; cv=none; b=u51nrFvK9NVj00QmqZ88VwfojWBDc+jlq8aI33UT24J+IN4Pfep7XSJqSfc0xlCspE6Rq8xx9Z7NaxCOCFQm7vnq62OfiBWqkIwIVn6G/v6t9VObEn27Rm940IkosfZNyHhzmxVFEfWQJAGeYI26Kb6HJtwjNf10Hf6hXB8o2Q4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311067; c=relaxed/simple; bh=gF3VcFxFiD1RkU0fj7v758VcLFQYwRIBzb5HxhOKpHI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=i0teppka2aaboTmsR1/HhaGTRzDQ+qFlbHBE0ux/zt8REYJEG3Ouv9hL9zjcY2b8TC5imTqtaAQrwnCIQtM3zjb7fjhQfjvH+F9QzFPcQgsmf8kpB9iYMLcimxHPm1C2D01gKwpHbRL1szIvoAsHHQ7nJQ9mgSAhL70JEcQD9K4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Ly1NyYWw; arc=none smtp.client-ip=209.85.208.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2cf3a095ba6so5330961fa.2 for ; Wed, 07 Feb 2024 05:04:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707311062; x=1707915862; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=x6nGer9hwb9V43aQD6TonkhwKDUWxh83YWENmNzzbSY=; b=Ly1NyYWwqqoWISfqFxNwYRuQ7nfXcB5WZAAFEFBxejzslmLjOYVK4huguYAmXYkBwB axtPW3pl3MXo40i6xMEu6lEvsWypzDmmlVbXLGg+GXGU2/YF7S739XEQ4ba8AVPm1ENB yMkaPrkvwTMEIMpUEylIPJQHShkLX8Sg1VkXBdCdnLlQKo7YWzkPmoLfxQ1/KWGxEAfJ rgAJq4N3zkXgJSorYfVV55LEH8guGa+TNt+HXWplf9uVvK+z7cm2xl59hgoZ/vWZ1BtI 4sjQIJN/MgWcpP+NgJcx0umvCATEU2UZcZ00mFNPiRnm9gQqATxZ8xX56Qjc+vhSM9Us GXOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707311062; x=1707915862; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=x6nGer9hwb9V43aQD6TonkhwKDUWxh83YWENmNzzbSY=; b=TGKP9V25ruNv97Ea/qXB+m3Zf7+veJqAoMKEB4ni7ItWfoSHfl9PvCFXPnJRqj160c j9QISNznRp1k2yrstNdRIUsZ13oNfuvvZP+7hG0Wg9zxuFl4u2uakku9cVzqqF//4sLM ydTAOEbqozyqhKx8Yp76wXE9ini3pQecAwvbrEWWCgKliwhyntkq0ZV8r0DobgfitxYE 5YayVwpHvpdtRDB5xiCFEg4hml5cxg9CwMSw6AVt01EvS67LU2W2qUimJWzZX5+zufsX GczR4G9l5ExAJ2LgOXJjgBA1PxeBT7Rh07rOgfuveP/78MQoI5ZeNeeQoSBGPp9TaC+v yNVQ== X-Forwarded-Encrypted: i=1; AJvYcCXySsHyFLx+GXBWzSiEk16dXpl7FZTO0Btj+jGMWINr97SU37ZJGY3yH17yb8uLcHC48yeiMbs1sbQHyzVSRWdxIAR4SgnmlE6TnjHt X-Gm-Message-State: AOJu0YxAeP//5TXc3VPWemVVKShdw/xUMmbZNP9XQLNmkUKVLWmNT7wr +vZfA0R8B17Evqe3duNppf7Xa7kH1w7Qk/FpmzsLClOZHCijFQLeS8g0KC3thxg= X-Received: by 2002:a2e:910d:0:b0:2d0:a829:6fc7 with SMTP id m13-20020a2e910d000000b002d0a8296fc7mr3948254ljg.5.1707311062085; Wed, 07 Feb 2024 05:04:22 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXSL7zY7t194MdDq+81ZXKHFIS8Ji5rW8CtbLG9nXUarAre6Ke7qVaYJDL9lJS4Ks/6d1XfArD13+20dqJgCLUU1ltgncJxiLrddVDdFGXwle9jsGfKLw1/5pnfrlOo5f4B/usZIb7O5WTvYv289KWQAKzD/QpxbXAYc9ordgBRm/xn45DiLEDby58oZggW60OqskgBVybZUFFdzgjaN3d71C1+ey7pd2JS9+Jtp/GbAY4= Received: from alley ([176.114.240.50]) by smtp.gmail.com with ESMTPSA id n5-20020a056402434500b00560c43b48f4sm637082edc.10.2024.02.07.05.04.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:04:21 -0800 (PST) Date: Wed, 7 Feb 2024 14:04:20 +0100 From: Petr Mladek To: John Ogness Cc: Douglas Anderson , Andrew Morton , Li Zhe , Pingfan Liu , Lecopzer Chen , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] watchdog: Better handling of concurrent lockups Message-ID: References: <20231220211640.2023645-1-dianders@chromium.org> <87ttmlan1d.fsf@jogness.linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ttmlan1d.fsf@jogness.linutronix.de> On Tue 2024-02-06 11:51:50, John Ogness wrote: > On 2024-02-06, Petr Mladek wrote: > > I have just got an idea how to make printk_cpu_sync_get_irqsave() > > less error prone for deadlock on the panic() CPU. The idea is > > to ignore the lock or give up locking after a timeout on > > the panic CPU. > > This idea is out of scope for this series. But it is something we should > think about. The issue has always been a possible problem in panic(). > > > AFAIK, the lock is currently used only to serialize related > > printk() calls. The only risk is that some messages might be > > interleaved when it is ignored. > > > > I am not sure if this is a good idea though. It might create > > another risk when the lock gets used to serialize more > > things in the future and a race might create a real problem. > > With the printk series we are currently working on [0], only the panic > CPU can store new printk messages anyway. So there would be nothing to > synchronize against (and it could be safely ignored). Right. > kgdb uses the same technique to quiesce the CPUs. It does not use the > printk_cpu_sync for this, but it is an example of a possible future > usage not related to printk. > > My vote is to make it a NOP for the panic CPU and then keep an eye on > any future uses. Sounds good. > Should I add this to v4 of [0]? Let's not complicate this series any more. It is almost ready ;-) We could do it by a separate patch in top of it or in another patchset. > > [0] https://lore.kernel.org/lkml/20231214214201.499426-1-john.ogness@linutronix.de Best Regards, Petr