Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp305566rwl; Tue, 11 Apr 2023 19:01:05 -0700 (PDT) X-Google-Smtp-Source: AKy350bl5kTSwAv6AG7nODxYR4swm1KtSqhwuKwGCE9Shb5M/Syhpwkj+bVYkP3i8og904fF4C/T X-Received: by 2002:a17:907:8814:b0:94a:87d6:d39e with SMTP id ro20-20020a170907881400b0094a87d6d39emr7646656ejc.58.1681264864852; Tue, 11 Apr 2023 19:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681264864; cv=none; d=google.com; s=arc-20160816; b=YmufiN8TDv1x4dSZrOGzXnR8c1B6cbJvFHr9RjSu4d4gTtwRiqZwML/LRWcKG9HKmI 2ftedeHZmQ6AH9kZqHU/i83xRv8JuoOiR1RZc8yQnl9Sls04ylSQMtTuns0UgBSsZbFI ulXnyuNWe+qCLVwpkXb/rQsvhvpGxeA7h8ml1adwdap2gnHPK/CVR4ssxSzEO6pdMpCT s5vbrF/I+umms7SlKXJg2yz8gkwkVXr0GsAazqy6k/CmnOsyY6ce7NL9sgh8YXZQxCtT ntJXr7MEQVlDRSN1d7I5lBdqp3T6x1bwVBmrrS8PtBIWrV2Ovu6QoLYD06igzOHuz5WT 65fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=jkvWNkk1D4zYagSfBASBmBTtHIblQqU2LylpaSD7Fu0=; b=aNq75334DUoAXFRkNLRtwhp1Qr6S/7ZAJri8HjmaiNfa61tgYw9bqgASLjyfHT8+wg iT6hYiYE4fwtQ31QOjveK5F2v1nPPhtwCDiBKVOJlcu/1JTZtcJhqo5GhMmC22pD1nKr RQuJd+yfdmxumSop+s4h9oih2JHNCpIevPmuINH9zqCSSPQvJkHf6xUgdYAw/QtIGajE c5191wgYSIkvMSCrTU3qcvhIMNctoEmy6nm0bYf4VZhZRv1dPyh+CHS5L+ewG51IwSjh s9zUnmMbb1GzFtIahmXfBR3RueBXLYNaLsiH9j9iD5AXx++gPoNDdYGtBLkMO4AR68Mk P4rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=d3exat8i; 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=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wb3-20020a170907d50300b008df5a5088bcsi652256ejc.123.2023.04.11.19.00.37; Tue, 11 Apr 2023 19:01:04 -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=@gmail.com header.s=20221208 header.b=d3exat8i; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229634AbjDLBzR (ORCPT + 99 others); Tue, 11 Apr 2023 21:55:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjDLBzQ (ORCPT ); Tue, 11 Apr 2023 21:55:16 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49F9140E3; Tue, 11 Apr 2023 18:55:15 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id e18-20020a17090ac21200b00246952d917fso8491009pjt.4; Tue, 11 Apr 2023 18:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681264515; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jkvWNkk1D4zYagSfBASBmBTtHIblQqU2LylpaSD7Fu0=; b=d3exat8iufnqZQMftlidwS/KzkfSzFEd4frI1pTlUJK6dmAApy5q8QnhpVCcH2NmJf Lskbq5bUFr++T78H2Fq7aWrE21WkfBVV47beBDzh22JqOLGFgyNkSSB4LCoUxYPwuZo8 UI5YT9/ksJhXJhFvFN3FMVwr5n1VYL7PPGIAUVXQ/7lS+4n4SMxzU3/ie2BRBT9RE1CS cWsUwwqszQXIZKfAjlg5o94URfnRMIk1caZ+MwpkRa5Gk6q7d6Oiq14w9doDTxhyexLm gEvfE5akhJNElOJR+5UCFZ4X1yIiAfsI4EEn7MwXxVv0OWPBbaBJOSRELZ1APB5wwIHC Bz0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681264515; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jkvWNkk1D4zYagSfBASBmBTtHIblQqU2LylpaSD7Fu0=; b=3gdm1oxD4C67rmMy00a2Cl4K9JKO89vO4NpLYOpkOEvai6cqqVptW0VaZmD8JcKVNP o2d7b7lUwNE7lofTyu9tHCF3/hfhRTtu7jUPrWwq+A178WqWlNZCvh2aa4hnkWLYs6EZ fmiuPEZAVw8S4cEQGGW8LSgONJcg0k9Y0ZjsEI3CnBp78h5HyXvxqSBnfAh99HyL72+t BASti7/zKraeweaS3Gyx3VEWOovPBo6GsasPNCO2tpXT+oiSjO2ygUd3SmdN1+gXKgZ3 Sdowych3/mQL2e7vvIa9IUhRHkVtvYSDt6LH9im6ILrEHQOHfVliEqF/g+CUmCah6lrT rWzQ== X-Gm-Message-State: AAQBX9fGWpE6T6+4vLmVtrKuPX4KIO0ywTUJFqenZWF50e9cpnD/VcRF Rz8YHcd0LXvd1AzrsxhCAP4= X-Received: by 2002:a17:902:d48a:b0:1a5:2757:d40a with SMTP id c10-20020a170902d48a00b001a52757d40amr6243932plg.49.1681264514738; Tue, 11 Apr 2023 18:55:14 -0700 (PDT) Received: from localhost.localdomain ([154.220.3.115]) by smtp.gmail.com with ESMTPSA id l9-20020a17090270c900b0019b089bc8d7sm8061293plt.78.2023.04.11.18.55.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Apr 2023 18:55:14 -0700 (PDT) From: zhouzhouyi@gmail.com To: paulmck@kernel.org, rcu@vger.kernel.org, linux-kernel@vger.kernel.org, lance@osuosl.org Cc: Zhouyi Zhou Subject: [PATCH] rcu/torture replace wait_event with wait_event_interruptible Date: Wed, 12 Apr 2023 09:54:43 +0800 Message-Id: <1681264483-5208-1-git-send-email-zhouzhouyi@gmail.com> X-Mailer: git-send-email 1.7.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 From: Zhouyi Zhou In kfree_rcu_test, kfree_scale_shutdown will be detected as hung task if kfree_loops is too big. Replace wait_event with wait_event_interruptible to avoid false positive. Tested in the PPC VM of Open Source Lab of Oregon State University. Signed-off-by: Zhouyi Zhou --- kernel/rcu/rcuscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c index 91fb5905a008..b37eec94957c 100644 --- a/kernel/rcu/rcuscale.c +++ b/kernel/rcu/rcuscale.c @@ -771,7 +771,7 @@ kfree_scale_cleanup(void) static int kfree_scale_shutdown(void *arg) { - wait_event(shutdown_wq, + wait_event_interruptible(shutdown_wq, atomic_read(&n_kfree_scale_thread_ended) >= kfree_nrealthreads); smp_mb(); /* Wake before output. */ -- 2.34.1