From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Galbraith Subject: Re: [RFC -v2 PATCH 2/3] sched: add yield_to function Date: Tue, 14 Dec 2010 12:03:58 +0100 Message-ID: <1292324638.7436.29.camel@marge.simson.net> References: <20101213224434.7495edb2@annuminas.surriel.com> <20101213224657.7e141746@annuminas.surriel.com> <1292306896.7448.157.camel@marge.simson.net> <20101214102409.GA3665@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Rik van Riel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Avi Kiviti , Peter Zijlstra , Chris Wright To: vatsa@linux.vnet.ibm.com Return-path: In-Reply-To: <20101214102409.GA3665@linux.vnet.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Tue, 2010-12-14 at 15:54 +0530, Srivatsa Vaddagiri wrote: > On Tue, Dec 14, 2010 at 07:08:16AM +0100, Mike Galbraith wrote: > > That part looks ok, except for the yield cross cpu bit. Trying to yield > > a resource you don't have doesn't make much sense to me. > > So another (crazy) idea is to move the "yieldee" task on another cpu over to > yielding task's cpu, let it run till the end of yielding tasks slice and then > let it go back to the original cpu at the same vruntime position! Yeah, pulling the intended recipient makes fine sense. If he doesn't preempt you, you can try to swap vruntimes or whatever makes arithmetic sense and will help. Dunno how you tell him how long he can keep the cpu though, and him somehow going back home needs to be a plain old migration, no fancy restoration of ancient history vruntime. -Mike