Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp253851imn; Wed, 3 Aug 2022 02:24:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR4yCMynP/2hrQu+0HGVMdERik6QSaz1U4bPMGU748ffN+dN3DL3gZRIACbFo5FJ0hGK8eZX X-Received: by 2002:a17:90a:ba04:b0:1f2:1bf9:5d97 with SMTP id s4-20020a17090aba0400b001f21bf95d97mr3870006pjr.35.1659518693376; Wed, 03 Aug 2022 02:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659518693; cv=none; d=google.com; s=arc-20160816; b=CsZQS9Prnynfp5a9uxMQWdITNysPDbaxtMiqmI64mrYvnENnZIXB4eEmXdkOy6T4uK yTWUS15VHzV+It1GRTB75ESPRVp928/y+VmMLl017hqBfkXR1+FpNg/BFudl46q3cT2g u8vE8mZT2JAEpxPs1KUAU2oBtKIpQrh+vqVKPBHWTzLH3nSRLjpgHy15JiX/bnxqjvct OhEUDt4DR97xzvBzAk+6vVFitmtyAIsf5RP82cszfRGIhhXgj6YdkOQ5sn6fBUljqvoT TU2bCeBJt09/O2BPOEMmpQ1EAahgwo0ts90+o1V79ZEgkEAy1xzCWExPu9FzhOyYN7++ tPEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=nKRalrIqVsuYFTzTSvVANggnqo9j5wSGgHIJD/WSv5Q=; b=klS+pms3puDFxamEw0JI6sWnKgl0oAy2OukigaBQ1gLnGOEXvb+DwHE8PEQQ4cj2x7 x4hkSUzlEVJE9GIhG2W7X4yhHgIYSoAqeVjXUWnhS5gte35ns98AFCpw5HXqf+J90XPQ abG7bLOiES7HBiqxH6nqtLfohvjjUoGxpOoxsX44lurlsqVl3v1WzkvQS3CJNjS9I3jw BmBIp6gEutTAmKSP5U0Q/nr3FCIhsbJiAaD02Fpu8o4ShgKCQp+QxQmuiuTfhyEDnASx BbF8K9CNwCZ4dxVb5M6APSslHgeoW3lQDBXkm27e7mN7FL6f5zuWG4kG+CfNhsuGm0F1 fgtQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j69-20020a638048000000b0041c664f637esi4487924pgd.726.2022.08.03.02.24.38; Wed, 03 Aug 2022 02:24:53 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235062AbiHCI7I (ORCPT + 99 others); Wed, 3 Aug 2022 04:59:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231495AbiHCI7G (ORCPT ); Wed, 3 Aug 2022 04:59:06 -0400 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AE432251E for ; Wed, 3 Aug 2022 01:59:05 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=liusong@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0VLGE8GG_1659517139; Received: from 30.178.80.143(mailfrom:liusong@linux.alibaba.com fp:SMTPD_---0VLGE8GG_1659517139) by smtp.aliyun-inc.com; Wed, 03 Aug 2022 16:59:01 +0800 Message-ID: Date: Wed, 3 Aug 2022 16:58:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.0.3 Subject: Re: [PATCH] sched/debug: avoid executing show_state and causing rcu stall warning To: Ingo Molnar Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org References: <1659489525-82994-1-git-send-email-liusong@linux.alibaba.com> From: Liu Song In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 > * Liu Song wrote: > >> From: Liu Song >> >> If the number of CPUs is large, "sysrq_sched_debug_show" will execute for >> a long time. Every time I execute "echo t > /proc/sysrq-trigger" on my >> 128-core machine, the rcu stall warning will be triggered. Moreover, >> sysrq_sched_debug_show does not need to be protected by rcu_read_lock, > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> and no rcu stall warning will appear after adjustment. >> > That doesn't mean it doesn't have to be protected by *any* lock - which > your patch implements AFAICS. > > There's a couple of lines such as: > > for_each_online_cpu(cpu) { Hi, Here I refer to the implementation of "sysrq_timer_list_show", and I don't see any lock. Maybe there is a problem with the implementation of "sysrq_timer_list_show". Thanks > > ... which need to be protected against CPU hotplug events. > > I haven't checked any of the deeper code to see what RCU or other > protection it may need, but clearly you didn't either ... > > Thanks, > > Ingo