Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp462045rwl; Tue, 11 Apr 2023 22:22:46 -0700 (PDT) X-Google-Smtp-Source: AKy350b7qSblAT/MclKgh9SDQvsv4osR5xrt5pCs9nxBk4g/WlTwUgHdBTUZlMpdOp6Gu1t4cLSJ X-Received: by 2002:aa7:9e48:0:b0:628:cff:1440 with SMTP id z8-20020aa79e48000000b006280cff1440mr17973225pfq.28.1681276966572; Tue, 11 Apr 2023 22:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681276966; cv=none; d=google.com; s=arc-20160816; b=RZg8CZ5jHdsm3PM4UjAsm9cNvpoH3/mn8DAQkSam9+f89A2uBr7YASubwXSzA881Bp Z6ETe71we9q4eYuk+5DwuQ5/mOm6fWc6a2aCfxz7BTsoHz3721mDCQzKXYps4Hltg8OO W/GAAbEGTDI5+diUHQ3YM77Oh/R50A/npP3pNtW8p8wW3ZtHVSyBkBnS4DK9OMpgL8ui wTFE5pKhB9yv4ymX9FaCvgO6lA1NM9/u/EmMI1oqs3GkDgpwhrQA7mZmDvgsi8FyI07m 5yIxjkOlt2gGuiPokNDJF2jjBoGPJ2sGRo2oR5ELAyU7Q8n7X0cI1jIgCr0NVga1DtkZ OvNA== 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=it0Wi4L0e7s40uaIIiJKd4300bUDmSUf9yApkSgXnos=; b=UXAy+gseqIoCCg8GgMVXkVSWhJ0DLCsMcxxTy38ENpVRqnH4TncKip0zk/6UqQC1JT AoCNPxFb/h+nQSojAcB295r4rhT9R34XAJfFZebR4/f1o/c/X7FlHYR3qN47y9A3mBhk g1afVScV9yQcZHgnz53E8SOw7BUh46SO8YV+Xr2CgABetrCIrftdl/QTjltkrS4ZIuKP Kol/gjV9K9iyDbN6r1Aelr6L4CuYTc6DZa5VV/CGQhyvlN2PVtNz7ChwLuxKwt6Hf2Dt YRUDBNUpj6VLjcVs1m5PCOQFtPSg4mIymiU4XH3v2yf8iBmvcWBcOOEaplGD28PNQwPD qwDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=QXkgNXxW; 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 j4-20020a63fc04000000b00513cc8d1736si14832623pgi.746.2023.04.11.22.22.35; Tue, 11 Apr 2023 22:22:46 -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=QXkgNXxW; 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 S229595AbjDLFJe (ORCPT + 99 others); Wed, 12 Apr 2023 01:09:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjDLFJd (ORCPT ); Wed, 12 Apr 2023 01:09:33 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4825A1996; Tue, 11 Apr 2023 22:09:32 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id g3so11562529pja.2; Tue, 11 Apr 2023 22:09:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681276172; 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=it0Wi4L0e7s40uaIIiJKd4300bUDmSUf9yApkSgXnos=; b=QXkgNXxWy7yAf0sAx+it64ZTfgE7av1zC231AuReQ+ZPxHIJ8XlLaVrY33VKKm9slK eWKwb7wx596Sy+wyPffsiAhHLmF96j8WeqrsnqmZJuDa3Shxbvlqe3e2cWE0/3Xul7vO wYW4JFCkkfRSFqfmL6e4BfgLISd0o3HOjKXVT1KBFBuCB5FY17zqBVHkJpUWMRZbfcVZ LLpbjDYX3Zx5qubqTCMXTz9GvMi5qtOAy6XLL9FEhLqIbGMD0Smc2ODJOEUdAnKtWMmI 8iM4LYlqk39UU6ITk5zrWmssJ146t4wL1cv9yToGNFTRF7ULLtUsUbx6g5LUgNuzODUf wCLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681276172; 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=it0Wi4L0e7s40uaIIiJKd4300bUDmSUf9yApkSgXnos=; b=htyBcOozPXpOn1edrqC8NalLtYSJ31LSr01IdyX01vjM77AmJv2+foWqHqn6z3y4Xm 1uMTqIbFy6sBkgr+S4441FB0I+aWIenhU16mWKd0+gyJZEGQoUXwrIlZP//gntLKFFvx Q4jVKtYQveJdl36T2qSks6HyF+KR7mdQpktT1wy+hsh2ENftpyTBGaa/Fi0hOHHtqr2b 7/WlBhycYZyfco2Aj2iv+W/w5em+f9XJTG2QqSQl+LO3OIEOxD2d8eHhbYU1Q09KdjJM qYaaCfizR8ptoadtd0w7WVjvHLBOJCVGhzORDluti1i8mZDkUqlJ8SEdJ00Yf5pWP/fh Q9sQ== X-Gm-Message-State: AAQBX9fyVPwaPOE/lfb3jop3V0kvsFTVDqv2bzcLzksvINcZFhw+9FkT 2MzQJa9h2bP2bRBkcy5zNYFwNS05MUJi1xuwNjY= X-Received: by 2002:a17:902:988f:b0:1a1:ffc0:8b9e with SMTP id s15-20020a170902988f00b001a1ffc08b9emr4359639plp.4.1681276171666; Tue, 11 Apr 2023 22:09:31 -0700 (PDT) MIME-Version: 1.0 References: <1681264483-5208-1-git-send-email-zhouzhouyi@gmail.com> <0e334497-fbc1-49f7-87ef-8dbf6d25d6a7@paulmck-laptop> In-Reply-To: <0e334497-fbc1-49f7-87ef-8dbf6d25d6a7@paulmck-laptop> From: Zhouyi Zhou Date: Wed, 12 Apr 2023 13:09:20 +0800 Message-ID: Subject: Re: [PATCH] rcu/torture replace wait_event with wait_event_interruptible To: paulmck@kernel.org Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org, lance@osuosl.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Wed, Apr 12, 2023 at 12:54=E2=80=AFPM Paul E. McKenney wrote: > > On Wed, Apr 12, 2023 at 09:54:43AM +0800, zhouzhouyi@gmail.com wrote: > > 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_interrupt= ible > > 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, > > Good catch!!! > > Would wait_event_idle() work in this case? The _interruptible() > variant indicates that wakeups due to things like POSIX signals is > permitted. Thank Paul for your guidance and encouragement! I will perform a new round of rcu torture test, after this is done, I will resend the modified version. Thanks ;-) Zhouyi > > Thanx, Paul > > > atomic_read(&n_kfree_scale_thread_ended) >=3D kfree_nr= ealthreads); > > > > smp_mb(); /* Wake before output. */ > > -- > > 2.34.1 > >