From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rik van Riel Subject: Re: [RFC -v7 PATCH 4/7] Add yield_to(task, preempt) functionality. Date: Mon, 31 Jan 2011 13:11:35 -0500 Message-ID: <4D46FB57.2080005@redhat.com> References: <20110126165657.2ddd2ac9@annuminas.surriel.com> <20110126172148.32d07561@annuminas.surriel.com> <1296474542.15234.394.camel@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Avi Kiviti , Srivatsa Vaddagiri , Mike Galbraith , Chris Wright , ttracy@redhat.com, "Nakajima, Jun" To: Peter Zijlstra Return-path: Received: from mx1.redhat.com ([209.132.183.28]:28419 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755693Ab1AaSL7 (ORCPT ); Mon, 31 Jan 2011 13:11:59 -0500 In-Reply-To: <1296474542.15234.394.camel@laptop> Sender: kvm-owner@vger.kernel.org List-ID: On 01/31/2011 06:49 AM, Peter Zijlstra wrote: > On Wed, 2011-01-26 at 17:21 -0500, Rik van Riel wrote: >> + if (yielded) >> + yield(); >> + >> + return yielded; >> +} >> +EXPORT_SYMBOL_GPL(yield_to); > > yield() will again acquire rq->lock.. not not simply have > ->yield_to_task() do everything required and make that an unconditional > schedule()? I wanted to reduce code duplication, since this code path should not be taken all that frequently. But hey, you're the maintainer, so I'll implement it your way :) The patches should be on the way later today :) -- All rights reversed