From patchwork Wed Jan 26 22:19:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rik van Riel X-Patchwork-Id: 509861 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0QMh6Kr007433 for ; Wed, 26 Jan 2011 22:43:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754436Ab1AZW1A (ORCPT ); Wed, 26 Jan 2011 17:27:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50402 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753565Ab1AZWZb (ORCPT ); Wed, 26 Jan 2011 17:25:31 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0QMPN5P006144 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 26 Jan 2011 17:25:23 -0500 Received: from annuminas.surriel.com (ovpn-113-70.phx2.redhat.com [10.3.113.70]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p0QMPDlo007297; Wed, 26 Jan 2011 17:25:22 -0500 Date: Wed, 26 Jan 2011 17:19:50 -0500 From: Rik van Riel To: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Avi Kiviti , Srivatsa Vaddagiri , Peter Zijlstra , Mike Galbraith , Chris Wright , ttracy@redhat.com, "Nakajima, Jun" Subject: [RFC -v7 PATCH 1/7] sched: check the right ->nr_running in yield_task_fair Message-ID: <20110126171950.5668f082@annuminas.surriel.com> In-Reply-To: <20110126165657.2ddd2ac9@annuminas.surriel.com> References: <20110126165657.2ddd2ac9@annuminas.surriel.com> Organization: Red Hat, Inc. Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 26 Jan 2011 22:43:20 +0000 (UTC) diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index c62ebae..7b338ac 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -1304,7 +1304,7 @@ static void yield_task_fair(struct rq *rq) /* * Are we the only task in the tree? */ - if (unlikely(cfs_rq->nr_running == 1)) + if (unlikely(rq->nr_running == 1)) return; clear_buddies(cfs_rq, se);