Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp747981lqj; Sun, 2 Jun 2024 21:55:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXkwyYFwkbCFoj3x+D8NjQ492Xq9VxPZQVAuKuTTFPVBsCRW2QfdekMtS3HOTulD8o5pxlgRvQzDmM+iJuZrjSztYwsTS7SoHUvAIG17w== X-Google-Smtp-Source: AGHT+IEWFKLVc7nLMu7pvD7ZkFbf2K3s4zSDSAY/PjDU35ns9yg0cn8awRtGT6lioMLv6XiOj1kF X-Received: by 2002:a17:906:e218:b0:a68:6851:68bc with SMTP id a640c23a62f3a-a6868516bedmr558252866b.5.1717390553382; Sun, 02 Jun 2024 21:55:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717390553; cv=pass; d=google.com; s=arc-20160816; b=K66FW5BKBxQGY//CBSfznr5bNFgpvJM6form7napKCECihmH3Yg5Ti4Au6Tb8gfFuB o0YeHNUnzsglw0sFmt10cCjFfaVGImd3yGy6EPG5ua4VUO0o9pJXp/FApFViOfrWEtSw 1CVK70uh068AX7wEROvLT7D5ECupuyVQs8x4VIZJE+Bkr2aByia8b8tWTsdK7Sf7fmLJ 2aYMsYyVKSV/ym6UF+pdu+v9iBe0JvKS7j7arPZvJa/fB+qZFzPJWtmIuxtuFtajTZ2l 1OfVxbH9EukFpwDigQpwnHaiErHHMw5mmI4gFG/bwmXfu5aynkuo2IDWzUKlQ/ojjMp0 GSUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=0vgpl2pvD+ZoEuT/KfaO9NrRSypVlYGw9oery+TBtf0=; fh=v2r/dmqgt08fGlrguaUvVR0LYqGCJWfbvKFtA6FNUUk=; b=aVR6zwFo55QjEril3Uj75qvQ0TDIH9rUh1nKLja45fjU8xZyVf+rzyc/asjqWhs9vV 4WlR2xtZRNy+CzTYYLhXBCn6Jz7OXtAC7rbm4YVfK6S1FWZASfLczd5Vj+FoMaZX2lVR dh4wtyt8pNDrlp9hIFaA5j6xDN47e61vj+iRnbA0s+hJL7J0YrGovgLvDB7oUe4VwjS0 W5PxdpcPJfn5BjA+m9d10BKCKpnfW7ClhsXL/9XEULF8D5aZ41acwZgFregyYV7Mw+eQ bKYnYtkM5jECWbKcNc74SJcsZ0Ucrctny2bGTXKq29DF19UGIBLE68Of9cS4A1QN9U0S bvGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Gzer7bcA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-198606-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198606-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6905f51e9dsi79618466b.116.2024.06.02.21.55.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 21:55:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198606-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Gzer7bcA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-198606-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198606-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 204661F21392 for ; Mon, 3 Jun 2024 04:55:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F5C01CABD; Mon, 3 Jun 2024 04:55:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Gzer7bcA" Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (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 D7B8D19E; Mon, 3 Jun 2024 04:55:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717390544; cv=none; b=cwPEUF8HAFUtXqM7DTCfG4/1366ZksFQKaGI9j+OI9n7bX+BeCr7uFjr2hLbFMluIP3omAXELgfLbA4zu3zc6bxQe5CgREBYtNsfjDjMgrh8s6oRM2iV3F1jX6S6M8WnTiLxhFmKg9TSnmxCdlhSNNidQGN0hmJgNtFTGVABQE0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717390544; c=relaxed/simple; bh=AV2KrnFWAFUsRY9ZYLITcITNmLoIydafWAFTUt+9/Bw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=kDpC0nRUNYH3cVACkGPkWuAgyfOTHaMcDwPomDnULRRGKqLVoIut6Xoy2YXC/A+t5hRbhCTjFm6+Q4VU+EiPqaiCYzXOjvYBlZCJbkO07zOBJaMMiyyQYXcWJXWSCeHB/JdrVAIDDNIFs+t6lSxeOICoqD/e56miHAzZMzTphtM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Gzer7bcA; arc=none smtp.client-ip=209.85.216.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-2c1a99b75d8so2842129a91.3; Sun, 02 Jun 2024 21:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717390542; x=1717995342; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0vgpl2pvD+ZoEuT/KfaO9NrRSypVlYGw9oery+TBtf0=; b=Gzer7bcAU0tgF3wrhGydTV2OYeqTTQhdiyOPXcIpODfGVpfqwe8vfOKwdZtbDP4xMK HVWBnVv8VJVsZy0kq7ROuUBJMJt1zpmNNpGcR9ypA11IORvT4fQiF8RsiWHw5F7AqWiO lGknG9Cd9Yoxx1c6A9Ju8FDfK4FDqy70s87T7Zxq4+jVvwgHsq2/O5bipA+BzZS79lYh c3IsY9naAWLIv5rBFXi1VCJP/uZvmW9RMtMuGu1foSTFoZaToyDzJovgEDSOHxSP5dIZ 7XKeyrOFSdsuZqzmajkKua4AJMDWtnmEfGgfh+CG1tEY+VpYXW4Wl9us2CcjNJvH6jtN 6fiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717390542; x=1717995342; h=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=0vgpl2pvD+ZoEuT/KfaO9NrRSypVlYGw9oery+TBtf0=; b=HBpFCuwbBe5CJH37QjlAUyTvK6djVcO76OjcTOUWTk9fzEVmvNPwuive838dUo0zQy TBUXvVKwA2nj/RznmfmZatm3O5f7AeP8xv3e4t4PCsgFlyMkPLOew2SJ/mgpCPqSVrCB yVKgH0n4xFmmcIvPgwCIfbrFMW2xlpdCoz1NxksSS9zGiM6athD9TaxjH7mxyO+w/3ma yNNg39zFrDJLXdAi7XYRO4hqPpvs8HU3u1uJilcrBUtvrbEaywP2a7hi0tSdDqQRfvXi mPbA6oTrNVkgjqMa/v45K5DZpLihBeu4R/+ZUdQAfSvcJWV1jLNg4IkrDwiDe+vrFqk4 z1AA== X-Forwarded-Encrypted: i=1; AJvYcCUS+2zJwjG4xAdiDRNvkT60cergkZJrvPIXdNVXevvXQMn/+6rdzKy+BvpND28U2PAloUp/LDcFa6kSjv40KCx5fVF4KJL18eEDmotehH3O1SWjz34SwByEk2NjlLN5GJjg X-Gm-Message-State: AOJu0Yw7n09vpSaRUu9AbL8hBywKIUFFfLwUm2ClM5s7xDeSjPYMEVoD 1SJJr2ZH+foqoK4a/Vyal34akt5YyEFrNXvNujKb4l+orjGC8B+q10eKfxsOC9Y6UMizYks/cSA woaT8auh2Izo+qXj6F+HMd6B425A= X-Received: by 2002:a17:90b:612:b0:2c1:aa8e:3ca6 with SMTP id 98e67ed59e1d1-2c1dc588b81mr8514194a91.23.1717390542031; Sun, 02 Jun 2024 21:55:42 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240528030054.4525-1-qiang.zhang1211@gmail.com> <1195a9a3-db87-465d-a3b0-ee92d67da954@paulmck-laptop> In-Reply-To: From: Z qiang Date: Mon, 3 Jun 2024 12:55:30 +0800 Message-ID: Subject: Re: [PATCH] rcutorture: Skip debug object testing for cur_ops without ->debug_objects set To: paulmck@kernel.org Cc: frederic@kernel.org, neeraj.upadhyay@kernel.org, joel@joelfernandes.org, urezki@gmail.com, rcu@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" > > > > > On Tue, May 28, 2024 at 11:00:54AM +0800, Zqiang wrote: > > > This commit make rcu_test_debug_objects() early return when the > > > specified cur_ops not set the ->debug_objects. > > > > > > Signed-off-by: Zqiang > > > --- > > > kernel/rcu/rcutorture.c | 5 +++-- > > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > > > diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c > > > index 08bf7c669dd3..9b8c277ab91a 100644 > > > --- a/kernel/rcu/rcutorture.c > > > +++ b/kernel/rcu/rcutorture.c > > > @@ -3495,8 +3495,9 @@ static void rcu_test_debug_objects(void) > > > return; > > > } > > > > > > - if (WARN_ON_ONCE(cur_ops->debug_objects && > > > - (!cur_ops->call || !cur_ops->cb_barrier))) > > > + if (!cur_ops->debug_objects || > > > + WARN_ON_ONCE(cur_ops->debug_objects && > > > > You lost me here. Given that we have "!cur_ops->debug_objects" before > > that WARN_ON_ONCE(), why do we need "cur_ops->debug_objects" inside of it? > > > > Also, we don't get here unless the rcutorture.object_debug kernel boot > > parameter is specified, don't we really want to WARN_ON_ONCE if the > > current flavor does not support that? Maybe I didn't describe it clearly enough, this modification is mainly to filter out test types that do not support double call_rcu*() checking, for example tasks, tasks-rudes, task-tracing ;) . Thanks Zqiang > > Hi, Paul > > The rcutorture.object_debug is set true, but the tasks-tracing does not support > duplicate cur_ops->call check, but the debug_objects test was still done. > > insmod rcutorture.ko torture_type=tasks-tracing fwd_progress=4 > n_barrier_cbs=4 object_debug=1 > > [ 106.082416] rcutorture: WARN: Duplicate call_tasks-tracing() test starting. > [ 106.082533] tasks-tracing-torture: rcu_torture_read_exit: Start of test > [ 106.082543] tasks-tracing-torture: rcu_torture_read_exit: Start of episode > [ 106.105552] rcutorture: duplicated callback was invoked. > [ 106.105567] rcutorture: duplicated callback was invoked. > [ 106.111269] rcutorture: WARN: Duplicate call_tasks-tracing() test complete. > > Thanks > Zqiang > > > > > Or do you have a use case that needs to silence these warnings? > > > > Thanx, Paul > > > > > + (!cur_ops->call || !cur_ops->cb_barrier))) > > > return; > > > > > > struct rcu_head *rhp = kmalloc(sizeof(*rhp), GFP_KERNEL); > > > -- > > > 2.17.1 > > >