Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp631152imm; Thu, 5 Jul 2018 06:26:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdEu0jsGGE3/B6G4kW1cN+11YLybJCrSBGXu8pomJx19ORtwJyXJ9U2y8+DSPbZCsZW62aV X-Received: by 2002:a63:64c2:: with SMTP id y185-v6mr5570326pgb.126.1530797175863; Thu, 05 Jul 2018 06:26:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530797175; cv=none; d=google.com; s=arc-20160816; b=VfHjeGCYFGBPo1zi7F3NDUkkKTxVnnpF+cllHShayCNqJNvc9R14Ok8k3CKH7vIaIx JvogUdBoL1iidaumrIhNPIYTjeDNEz1PCpRtysYIbzKzoq1/9g2/BC5l9Tn0Et2IDfuK dShtisqdUShzfUqTT19POc9bUo7PkDhpNB0LllQqcY9p2wldu5nrL/StDTaeaxwduqO4 zql27n1++8wiDsoItdw8jiZiESS2ahc98WcLbd4Au5W/Ta+0Z7U2tlAvmXkPNXyxSLSa 53vT3kuGgWTwavvZfPtuXg+LwEnorZY30y6Q4++ruNT+KFL7nPk6M4IlJkKv4Y1GHzfA c/ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=GpHjCC3sAG9c1Mj6z2jbFAYti0u6GHYI4zcqQp3jiXs=; b=XD1NBS3mq6aUNyjbl+HQcV4VBvc+MTRgLQK4D0c3qt+6DQV833TjBVtKEBxYkcLHYR yzDnfWymcHj1++vJhEOoFHcNmoMyA4zDZqyGVG7LjfkhnYRJQ0sBol7CzZxpSlivQAx4 Wg+JTKDA5iV4cGaQtlMIgmQvjnWE3/ldVHx9BdbmA4pdzwL48/+NwjUHn8EIkI954ga9 +YXD9KoTz1QqBQn5L3AozonmJU4ptyaI7mFQBc8mMPvy/QBtaGNWA51BKC60RVsgo1nj 5w1Cnc5cir1ecPLKIKClGcP0oW5IyuCT/OvlO7rBjcD/yGwJsvX66RDauL+6mBX0hry6 jM9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeblueprint-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=VFh7BzPm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si5909713plf.133.2018.07.05.06.26.01; Thu, 05 Jul 2018 06:26:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeblueprint-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=VFh7BzPm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754304AbeGENZD (ORCPT + 99 others); Thu, 5 Jul 2018 09:25:03 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:40509 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753887AbeGENZB (ORCPT ); Thu, 5 Jul 2018 09:25:01 -0400 Received: by mail-ed1-f67.google.com with SMTP id e19-v6so6350401edq.7 for ; Thu, 05 Jul 2018 06:25:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeblueprint-co-uk.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GpHjCC3sAG9c1Mj6z2jbFAYti0u6GHYI4zcqQp3jiXs=; b=VFh7BzPmE5CAnPaFTOZDfTErBOqKvU+Gh+f5kGZWLCn33zz6qMQCsNLnBVRAVrXyQE JXAO0Wgk/iuFvT41ZiWxkQYDI/MyM8dgPmHU0kEVUt/Eunt5W0cM83G7qIvpOEYZxTem b0jhRKQLm5bWKvuLDyOGSZzZBYXVsk3GSS7Tufc7kxTC57UGpTirzTziqzkH1dbPYGzU X480R7xxVXRII2Kre4NL7ay2nCrfhwAn3wpc89SLjliYtVXjIUUqoXw8D1qXz3dyDA01 pq1B/LGxiDpwhBjyU9QifHtyc80fyaLLLxw52HiBmC/ChIvtYDsJVOAQY+Vhawmw1yC5 QdIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GpHjCC3sAG9c1Mj6z2jbFAYti0u6GHYI4zcqQp3jiXs=; b=a7JVRsRhwMX3tQD9F5zTR83vTkPonr5KG27g3W05MqLxloIpFsDgdz8rcKg1nP4Tkh nXMhj6UR1Zv5qw6EUIlluNQTs678Tx5qAHqxdOpol7gGZuawhw0Go/OLvwaqO1RtjVHa dqv85lwz59+1NT7BpWWDuodWTEEbiTgODrgeD7DdlBouHn8VuhnGuCzU638JN7QpF3kR ncMO2gta1DE+mPQ3bRfM+FlBUY6y1Gw/QylUfkChzgvT6n4uN20cP67gPCkn7D/Tp3aa 1j86KEriI7uy1SMYD7S2ddmyq5Q7y8Je1IJ5Ra94PgXiSJbISLiMT9Jpn2a6CqVAgxPp 8cHA== X-Gm-Message-State: APt69E2TERmGw26ZqVZJP4aKs6/fIoX0FwNB+7/Ac4uvL6HwW/jtEprr fKAaqUgIjP5pvMSZXkw5aibEeA== X-Received: by 2002:a50:a519:: with SMTP id y25-v6mr6896289edb.105.1530797100707; Thu, 05 Jul 2018 06:25:00 -0700 (PDT) Received: from localhost ([2a02:c7f:9214:6300:de53:60ff:fe39:5599]) by smtp.gmail.com with ESMTPSA id e25-v6sm2981686edq.65.2018.07.05.06.24.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 06:25:00 -0700 (PDT) Date: Thu, 5 Jul 2018 14:24:58 +0100 From: Matt Fleming To: Dietmar Eggemann Cc: kernel test robot , Peter Zijlstra , linux-kernel@vger.kernel.org, Ingo Molnar , Mike Galbraith , lkp@01.org Subject: Re: [lkp-robot] [sched/fair] fbd5188493: WARNING:inconsistent_lock_state Message-ID: <20180705132458.GA3864@codeblueprint.co.uk> References: <20180705080227.GH23907@yexl-desktop> <0ac4845e-cf6b-c5e3-a16c-f2fc457c5ef5@arm.com> <7c3d20fa-4997-e6ed-3750-e054ce1bd610@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c3d20fa-4997-e6ed-3750-e054ce1bd610@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 05 Jul, at 11:52:21AM, Dietmar Eggemann wrote: > > Moving the code from _nohz_idle_balance to nohz_idle_balance let it disappear: > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 02be51c9dcc1..070924f07c68 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -9596,16 +9596,6 @@ static bool _nohz_idle_balance(struct rq *this_rq, unsigned int flags, > */ > smp_mb(); > > - /* > - * Ensure this_rq's clock and load are up-to-date before we > - * rebalance since it's possible that they haven't been > - * updated for multiple schedule periods, i.e. many seconds. > - */ > - raw_spin_lock_irq(&this_rq->lock); > - update_rq_clock(this_rq); > - cpu_load_update_idle(this_rq); > - raw_spin_unlock_irq(&this_rq->lock); > - > for_each_cpu(balance_cpu, nohz.idle_cpus_mask) { > if (balance_cpu == this_cpu || !idle_cpu(balance_cpu)) > continue; > @@ -9701,6 +9691,16 @@ static bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle) > if (!(flags & NOHZ_KICK_MASK)) > return false; > > + /* > + * Ensure this_rq's clock and load are up-to-date before we > + * rebalance since it's possible that they haven't been > + * updated for multiple schedule periods, i.e. many seconds. > + */ > + raw_spin_lock_irq(&this_rq->lock); > + update_rq_clock(this_rq); > + cpu_load_update_idle(this_rq); > + raw_spin_unlock_irq(&this_rq->lock); > + > _nohz_idle_balance(this_rq, flags, idle); > > return true; > Hmm.. it still looks to me like we should be saving and restoring IRQs since this can be called from IRQ context, no? The patch was a forward-port from one of our SLE kernels, and I messed up the IRQ flag balancing for the v4.18-rc3 code :-(