Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13919764pxu; Mon, 4 Jan 2021 08:00:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4hE4qZnhsW0RJ9BaOm966Y6lGk4I80Nyvhh4sqplvFjeC+syxQKTz6HR9CIL8Oxjv3rh2 X-Received: by 2002:a17:906:e291:: with SMTP id gg17mr68361166ejb.31.1609776042658; Mon, 04 Jan 2021 08:00:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609776042; cv=none; d=google.com; s=arc-20160816; b=k8Eoe/cQT2LJYb/pR9IUqpeEzbQUjgydBuyNE44JZ4l7IpwcyZEGRHOLiOV8EBOny9 0Wwp3va4XlicQXNJwQf2SP0a4m7LQosv2w3IM/ETplrqD6SIdpO/LSo2De8qOjF2UPal eOBBU3CEsY6MVaN+C8e59c8kEE3+zdNP6eXtMSW25mBQa1LjRwChO1WKrwFcviqBacqP N5rCQzaFvdDtOrZdJSodGkcrH4wI+kmraNuTe9tm1zPLLKbYzQuj9pqRjS2qZhoWrs55 mZnIiSTD6w+MRS8hYyn+vPJjaaMxB+bwqT/8fFdmnK/TKZUFiz5HXPddi68libKB/i9l Wifg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3EGmnRyr5X4ekn3lhgCJIAOH3HIZX6HuJoFIgiIne5A=; b=g6sBtICNLvs27jXLwM27lpfVjWhZwctB/cSfhjvlSQnR+CSpohHDxjkSK5wIcjBNWN QbLPjBnZVlfwQfReAAVBHwl8lDbnEwAuuyIcN7rt6E7p8lXar7apbHZbrJRfMmvH+rTJ w2lsVf8nleS/8n17yVbWwBuKuKMy4oCusIkuLJkcjqL+tPOTldK3FIJjk0NWN9n2/SvG 7AznUJpuvGwt/Hwv5s30p4sDFOwU/pPzXroqFf2BV+vYFFMi3Jr/wiwVszSv3Nw2YjK3 cNrAJq5/V6jtTkuafzVxSfxM9YWV/VpQo7O+MqTxJF+4X8ZB3+OtYmenLvvJGZT4h/FN rw2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ETEh1F2g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si33144489edr.48.2021.01.04.08.00.19; Mon, 04 Jan 2021 08:00:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ETEh1F2g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727672AbhADP6l (ORCPT + 99 others); Mon, 4 Jan 2021 10:58:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727293AbhADP6l (ORCPT ); Mon, 4 Jan 2021 10:58:41 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 871EBC061574; Mon, 4 Jan 2021 07:58:00 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id x20so65411885lfe.12; Mon, 04 Jan 2021 07:58:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3EGmnRyr5X4ekn3lhgCJIAOH3HIZX6HuJoFIgiIne5A=; b=ETEh1F2gbphfLcdW3xIPLalLRA3f5vupSOfICX0vhGXhXx00INyaR528/FggcVmyPx dmj/mkQHOYzBdAZ8gfj7DqRDU3qb3NPK6qDPR/VOqmwBqAYbHEqn4IGRnbxCYlxhQJmw 7rDoT/FcbzCTJViD3o7yKHU7Ce+ZStMfhg/DYi57qBmJK5GCBySqL1uZgBZ+a6WVKIII V/o76swGGpcBXbWx92V6+Fs9BADjn7XQp7F69dxYCky6EAKAYqH+RdKMFhiV6FQw019A I8gLq3HboLV9JAN2g4yKk+8YmqpJJoFuOqmJH3raM/xclo6tkk5n5Ep5x+4m/1D6Ivul eA8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3EGmnRyr5X4ekn3lhgCJIAOH3HIZX6HuJoFIgiIne5A=; b=XpoQ/3+le1k58rDovS0r3FePZTTND1QXOVGnzO94BqT878zCQTAR2aSGXfGnlk7YpJ 2ivh5rtee3MtxiEHJJvMjIEPdYOQ00SKaleeQ87TrIQ7edZYRH85zH6RL7cgL2zQm6Pg 7AooaIGkLOTWJQgMc+pIHCxjJwN5flH4R6yy5LHuiWVjWcMgWbc7af2Cf2mk+YfqtDdG ea4y2FJMeHaX1MsNCJnyLC2WpQbKhfXlMDLeJ2pFmHNKhwXGISfvozXtMOiZTe4cqmP0 P/TxT2XBXuDlExxBRofQAhi4TXs4NAQXaW0wjFPmBmLMpS8jL3hcDC5weAs0YQdOU1SO Zo1A== X-Gm-Message-State: AOAM532kKvXOT2L7PZ/A4VBeF8SFWwYeKqBTk6T4l1RNVTvL2pc+qUVN 41BD/nii/FAwsM9IWVk912YTiy4j4txCGBDP3es= X-Received: by 2002:a05:6512:3288:: with SMTP id p8mr30124378lfe.443.1609775879070; Mon, 04 Jan 2021 07:57:59 -0800 (PST) MIME-Version: 1.0 References: <20210104152058.36642-1-frederic@kernel.org> <20210104152058.36642-4-frederic@kernel.org> In-Reply-To: <20210104152058.36642-4-frederic@kernel.org> From: Fabio Estevam Date: Mon, 4 Jan 2021 12:57:47 -0300 Message-ID: Subject: Re: [PATCH 3/4] ARM: imx6q: Fix missing need_resched() check after rcu_idle_enter() To: Frederic Weisbecker Cc: Peter Zijlstra , LKML , "Rafael J . Wysocki" , Ingo Molnar , stable , Thomas Gleixner , "Paul E . McKenney" , Len Brown , Pengutronix Kernel Team , NXP Linux Team , Daniel Lezcano , Shawn Guo , Sascha Hauer Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Frederic, On Mon, Jan 4, 2021 at 12:21 PM Frederic Weisbecker wrote: > > Entering RCU idle mode may cause a deferred wake up of an RCU NOCB_GP > kthread (rcuog) to be serviced. > > Usually a wake up happening while running the idle task is spotted in > one of the need_resched() checks carefully placed within the idle loop > that can break to the scheduler. > > Unfortunately imx6q_enter_wait() is beyond the last generic > need_resched() check and it performs a wfi right away after the call to > rcu_idle_enter(). We may halt the CPU with a resched request unhandled, > leaving the task hanging. > > Fix this with performing a last minute need_resched() check after > calling rcu_idle_enter(). Shouldn't tif_need_resched() be used instead of need_resched() in the commit log?