Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753135Ab1B1J0h (ORCPT ); Mon, 28 Feb 2011 04:26:37 -0500 Received: from mailout-de.gmx.net ([213.165.64.22]:50731 "HELO mailout-de.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752781Ab1B1J0g (ORCPT ); Mon, 28 Feb 2011 04:26:36 -0500 X-Authenticated: #14349625 X-Provags-ID: V01U2FsdGVkX1+oM0xpfOmoq11rYPkny+DDF2j8jAr2u+O4rbMzq9 IcMuMazhNr6/Z+ Subject: Re: [tip:sched/core] sched: Add yield_to(task, preempt) functionality From: Mike Galbraith To: Rik van Riel Cc: Venkatesh Pallipadi , mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl, mtosatti@redhat.com, tglx@linutronix.de, mingo@elte.hu In-Reply-To: <4D689346.1090002@redhat.com> References: <20110201095051.4ddb7738@annuminas.surriel.com> <4D689346.1090002@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 28 Feb 2011 10:26:29 +0100 Message-ID: <1298885189.9501.2.camel@marge.simson.net> Mime-Version: 1.0 X-Mailer: Evolution 2.30.1.2 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1011 Lines: 25 On Sat, 2011-02-26 at 00:44 -0500, Rik van Riel wrote: > On 02/25/2011 07:43 PM, Venkatesh Pallipadi wrote: > > The below comment says about rescheduling p's CPU. But the rq variable > > we have here is the curr_rq and not p_rq. So, should this be done in > > yield_to() with p_rq. I did try to see the discussion on other > > versions of this patch. v3 and before had - > > "resched_task(task_of(p_cfs_rq->curr));" which seems to be correct... > > You are correct. We are calling resched_task on the wrong task, > we should call it on p's runqueue's current task... Are you going to send a fix? > >> + > >> + /* Make p's CPU reschedule; pick_next_entity takes care of fairness. */ > >> + if (preempt) > >> + resched_task(rq->curr); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/