From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FB85C6379D for ; Mon, 23 Nov 2020 16:37:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E12F20708 for ; Mon, 23 Nov 2020 16:37:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390123AbgKWQhE (ORCPT ); Mon, 23 Nov 2020 11:37:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:57982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732535AbgKWQhD (ORCPT ); Mon, 23 Nov 2020 11:37:03 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 649D220665; Mon, 23 Nov 2020 16:37:01 +0000 (UTC) Date: Mon, 23 Nov 2020 11:36:59 -0500 From: Steven Rostedt To: Marco Elver Cc: "Paul E. McKenney" , Anders Roxell , Andrew Morton , Alexander Potapenko , Dmitry Vyukov , Jann Horn , Mark Rutland , Linux Kernel Mailing List , Linux-MM , kasan-dev , rcu@vger.kernel.org, Peter Zijlstra , Tejun Heo , Lai Jiangshan Subject: Re: [PATCH] kfence: Avoid stalling work queue task without allocations Message-ID: <20201123113659.3d1fd866@gandalf.local.home> In-Reply-To: <20201123112812.19e918b3@gandalf.local.home> References: <20201112161439.GA2989297@elver.google.com> <20201112175406.GF3249@paulmck-ThinkPad-P72> <20201113175754.GA6273@paulmck-ThinkPad-P72> <20201117105236.GA1964407@elver.google.com> <20201117182915.GM1437@paulmck-ThinkPad-P72> <20201118225621.GA1770130@elver.google.com> <20201118233841.GS1437@paulmck-ThinkPad-P72> <20201119125357.GA2084963@elver.google.com> <20201120142734.75af5cd6@gandalf.local.home> <20201123152720.GA2177956@elver.google.com> <20201123112812.19e918b3@gandalf.local.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 23 Nov 2020 11:28:12 -0500 Steven Rostedt wrote: > I noticed: > > > [ 237.650900] enabling event benchmark_event > > In both traces. Could you disable CONFIG_TRACEPOINT_BENCHMARK and see if > the issue goes away. That event kicks off a thread that spins in a tight > loop for some time and could possibly cause some issues. > > It still shouldn't break things, we can narrow it down if it is the culprit. And it probably is the issue because that thread will never sleep! It runs a loop of: static int benchmark_event_kthread(void *arg) { /* sleep a bit to make sure the tracepoint gets activated */ msleep(100); while (!kthread_should_stop()) { trace_do_benchmark(); /* * We don't go to sleep, but let others run as well. * This is basically a "yield()" to let any task that * wants to run, schedule in, but if the CPU is idle, * we'll keep burning cycles. * * Note the tasks_rcu_qs() version of cond_resched() will * notify synchronize_rcu_tasks() that this thread has * passed a quiescent state for rcu_tasks. Otherwise * this thread will never voluntarily schedule which would * block synchronize_rcu_tasks() indefinitely. */ cond_resched_tasks_rcu_qs(); } return 0; } Did something change, where that "cond_resched_tasks_rcu_qs()" doesn't let things progress on ARM64? I noticed that you have PREEMPT enabled so this will only be preempted when its schedule time runs out and something else wants to run. How would that affect other threads? -- Steve