Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp6745rdd; Wed, 22 Nov 2023 08:04:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IH6OmVR9FL+w7tcXz+XfJGb0IR5wykzV4TYPv+gDF0OC3ws/76ifMZeu0GqejMNmoDkJso+ X-Received: by 2002:a05:6a21:1208:b0:18a:e21e:51a9 with SMTP id oe8-20020a056a21120800b0018ae21e51a9mr2146423pzb.60.1700669082560; Wed, 22 Nov 2023 08:04:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700669082; cv=none; d=google.com; s=arc-20160816; b=BrRd0fJ/soT9l29CS2qJQoDQiG3b3lS0fA8NdGZO9OlTHLUF6eexXYT3G5/j30muP3 sx8EeJC0x/Q3YmVcIRUyBkcHwnmnov+ksdoDXr3ksiBEVYcV2ANEC4kJnRSSx1Z+GDfr sPiVey+a6hTn53NyBlUjXrg6GhPoasrvxv0tbf5kjU4dEZcOJipieAJgKR2IVU3HnJ+K qWBYNcHz0hoE4XPjIqHxAJgpYpzuUdwy59SM3KhZRGybKkZXSDGithm9hZpQGcG5Bupz QesI1I1wIUH/Fj5La8DGujcivmRye4FKuE9vhLQabDtVWwhvyY7437VIUTM/lgQ51EHt NafA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Ck7nqrrJ5TqG0Izy74ih+BVldypg70Z5fbe63hdzuKg=; fh=LP9/T8s+eflbOjl+aSlpzMngPDETRTSy0rZyTmhCFj4=; b=rTlpVCMUCe7BPP1x/Q0U6hgTDl7fcFJAa+YwEVgnNPOZ+T0QcKe9pfnbv3VtogMfaH pp7aP/t5X9zYKHu8ofLyxC+N3JZLe5sBYiBySmTcuxv8FaboecLLxk9sbBMHc+vvK0X1 oySDhB3nNu82QzolB6Unc0QbzwCWOMumAmDeK6ay6zZmrc1Ihe4FincUR10NwLY9Y9wW 9vli/6FO3yqYsFhay11akcMCYkTAdwaLAG6mSAKwmarrTbmYyo+YRwo25LjwjZ6wJMIT /UgdF3ahpORuLCvRKXgAqaG0uB9RfFgX9RoLimasyIloSUiqbUIJl8cqM2lIfVTmugtM 42Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Y91dtkQU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id bn13-20020a056a02030d00b005b8ae5cd028si13438961pgb.758.2023.11.22.08.04.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 08:04:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Y91dtkQU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 52DFB82AA66E; Wed, 22 Nov 2023 08:04:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344202AbjKVQER (ORCPT + 99 others); Wed, 22 Nov 2023 11:04:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235265AbjKVQEP (ORCPT ); Wed, 22 Nov 2023 11:04:15 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B030D40 for ; Wed, 22 Nov 2023 08:04:11 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-9fa45e75ed9so638436666b.1 for ; Wed, 22 Nov 2023 08:04:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1700669049; x=1701273849; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Ck7nqrrJ5TqG0Izy74ih+BVldypg70Z5fbe63hdzuKg=; b=Y91dtkQUhjjfRBmCsOuz6gZMJQ0VFZwKxMTWLM3uy1G09NDOVmTEMr427nzegpm5tL Y9E265826Bhdrk4SNb7R1VOhW4CgdmKG/k4ihOHf7T32frd5XcKcZyaOXohBtIPJHEya uUg2r5tkm8c/RYUTj2cCQJrtV3nqFVPdnpODk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700669049; x=1701273849; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ck7nqrrJ5TqG0Izy74ih+BVldypg70Z5fbe63hdzuKg=; b=oscAyHlvG6/hEVE/c9ouj9oCjeUxiiaUC6ptjLZKpSaXTdupTVPdkfigymIEBOmzaR ceu3fdZtHiHkE4nKQlOTPTp6Ytf/mqIc+PkWKRz1r1PenZkM2oLojEAyOsGWjLqMKsgp UObRxk8hjAwRwwrvFN9HOl3Wy3h7NhVMVJggyEn4hqq2RqBhTfWVizUBVhJO7xtW6uUR MagdDSepspnxj1+Fa+p1D2lNFheOFPl52SYADq44pgeHjFm1o4hIotZrs0C3EtneJoWs su/1nCEI7YZOxfrI2b47c7JYJaC8GaSPKk2aqeS0hTr7Hf8z3cFng8WoqJU1Chjsspsl G4EQ== X-Gm-Message-State: AOJu0Yyyki/wbktSiqP+QDX7z/pRSXFCef56xhoKM3VX7wsGw4Ygu/RS PC1GSglZJ90OANRzLKuhWVdg/45CS3fOWRhB9GIlg6QA X-Received: by 2002:a17:906:105c:b0:a04:182c:9ea with SMTP id j28-20020a170906105c00b00a04182c09eamr1813958ejj.52.1700669049202; Wed, 22 Nov 2023 08:04:09 -0800 (PST) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com. [209.85.208.44]) by smtp.gmail.com with ESMTPSA id ca3-20020a170906a3c300b009fc42f37970sm4934133ejb.171.2023.11.22.08.04.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Nov 2023 08:04:08 -0800 (PST) Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-548c6efc020so17774a12.0 for ; Wed, 22 Nov 2023 08:04:08 -0800 (PST) X-Received: by 2002:a05:6402:3815:b0:544:466b:3b20 with SMTP id es21-20020a056402381500b00544466b3b20mr129282edb.5.1700669048191; Wed, 22 Nov 2023 08:04:08 -0800 (PST) MIME-Version: 1.0 References: <20231122100212.94327-1-lizhe.67@bytedance.com> In-Reply-To: <20231122100212.94327-1-lizhe.67@bytedance.com> From: Doug Anderson Date: Wed, 22 Nov 2023 08:03:50 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] softlockup: serialized softlockup's log To: lizhe.67@bytedance.com Cc: akpm@linux-foundation.org, pmladek@suse.com, lecopzer.chen@mediatek.com, kernelfans@gmail.com, linux-kernel@vger.kernel.org, lizefan.x@bytedance.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 22 Nov 2023 08:04:34 -0800 (PST) Hi, On Wed, Nov 22, 2023 at 2:02=E2=80=AFAM wrote: > > From: Li Zhe > > If multiple CPUs trigger softlockup at the same time with > 'softlockup_all_cpu_backtrace=3D0', the softlockup's logs will appear > staggeredly in dmesg, which will affect the viewing of the logs for > developer. Since the code path for outputting softlockup logs is not > a kernel hotspot and the performance requirements for the code are > not strict, locks are used to serialize the softlockup log output to > improve the readability of the logs. > > Signed-off-by: Li Zhe > --- > Changelogs: > > v1->v2: > - define the lock outside the scope of function > - add precondition 'softlockup_all_cpu_backtrace=3D0' in commit message > > kernel/watchdog.c | 4 ++++ > 1 file changed, 4 insertions(+) This seems like a useful improvement to me and the code looks good. Reviewed-by: Douglas Anderson