Message ID | 20140121112258.330689671@infradead.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBCV5TUXXRUIBB4NU7GLAKGQEATAUTZA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 87445203BE for <linaro@patches.linaro.org>; Tue, 21 Jan 2014 11:30:58 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wp4sf13497795obc.1 for <linaro@patches.linaro.org>; Tue, 21 Jan 2014 03:30:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:message-id:user-agent :date:from:to:cc:subject:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe :content-disposition; bh=RpA/QMb2dI8CbX7CM5KAh+XFVev04qOcMaTjnhYsMyw=; b=XhH9Kkdqc3Cqx1jtfmv4VXDT2qBknhyBJtyIKHXD47yxTUgmAnCFiliAgZXmwG6EkZ Dxuh1T0DFYtzwNwpwxJXWjje7aebt3SLspVQBR17QyY1rnMzj89fOGdAE31tI4wYE+yt nxgcGCNpqqYswqSx0azZH8BBid2J0jxMSCFyJ5nHebk+EAUNSiwbzCIbiIY/1AvYOiEa 9KuoeRAhbfX1xTZ9GKnTSH3rqz5zyGMZfYeAdWwxh6DArAQdNVC2UenD30tnlo+AGpIk hjihBf2ZdnxfbpP0k6mQ6A6BvitSM0Gk+Hjy4ZEfzBpxhYRaoT8kZd/l23T2U4W5YcwJ KlWA== X-Gm-Message-State: ALoCoQnrH8NL4a2B4EYZhel3QAr/Mslk0p8gHUcDKmoeuyxvIu9H/lY4soqF4MCYFEcnMskr5Eut X-Received: by 10.182.158.4 with SMTP id wq4mr8877826obb.18.1390303857675; Tue, 21 Jan 2014 03:30:57 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.131.202 with SMTP id oo10ls275553qeb.53.gmail; Tue, 21 Jan 2014 03:30:57 -0800 (PST) X-Received: by 10.58.227.38 with SMTP id rx6mr14505230vec.10.1390303857542; Tue, 21 Jan 2014 03:30:57 -0800 (PST) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id ru2si1849366vcb.29.2014.01.21.03.30.57 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 03:30:57 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id oy12so3089557veb.28 for <patchwork-forward@linaro.org>; Tue, 21 Jan 2014 03:30:57 -0800 (PST) X-Received: by 10.220.133.80 with SMTP id e16mr14147100vct.13.1390303857454; Tue, 21 Jan 2014 03:30:57 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp111114vcz; Tue, 21 Jan 2014 03:30:56 -0800 (PST) X-Received: by 10.66.231.6 with SMTP id tc6mr24558913pac.68.1390303851858; Tue, 21 Jan 2014 03:30:51 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qx4si5064632pbc.165.2014.01.21.03.30.51; Tue, 21 Jan 2014 03:30:51 -0800 (PST) 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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754614AbaAUL37 (ORCPT <rfc822;linus.walleij@linaro.org> + 27 others); Tue, 21 Jan 2014 06:29:59 -0500 Received: from merlin.infradead.org ([205.233.59.134]:51879 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754230AbaAUL30 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 21 Jan 2014 06:29:26 -0500 Received: from dhcp-077-248-225-117.chello.nl ([77.248.225.117] helo=twins) by merlin.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1W5ZWC-0002WS-Ab; Tue, 21 Jan 2014 11:29:20 +0000 Received: by twins (Postfix, from userid 0) id DFB68821E87B; Tue, 21 Jan 2014 12:29:03 +0100 (CET) Message-Id: <20140121112258.330689671@infradead.org> User-Agent: quilt/0.60-1 Date: Tue, 21 Jan 2014 12:17:56 +0100 From: Peter Zijlstra <peterz@infradead.org> To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, daniel.lezcano@linaro.org, pjt@google.com, bsegall@google.com, Peter Zijlstra <peterz@infradead.org> Subject: [PATCH 2/9] sched: Fix race in idle_balance() References: <20140121111754.580142558@infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peterz@infradead.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> Content-Disposition: inline; filename=daniel_lezcano-2_sched-fix_race_in_idle_balance.patch |
--- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6417,6 +6417,13 @@ void idle_balance(struct rq *this_rq) raw_spin_lock(&this_rq->lock); + /* + * While browsing the domains, we released the rq lock. + * A task could have be enqueued in the meantime + */ + if (this_rq->nr_running && !pulled_task) + return; + if (pulled_task || time_after(jiffies, this_rq->next_balance)) { /* * We are going idle. next_balance may be set based on