From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [RFC PATCH 2/3] sched: add yield_to function Date: Fri, 03 Dec 2010 22:30:42 +0100 Message-ID: <1291411842.2032.17.camel@laptop> References: <20101202144129.4357fe00@annuminas.surriel.com> <20101202144423.3ad1908d@annuminas.surriel.com> <20101203005008.GU10050@sequoia.sous-sol.org> <4CF9368C.8030309@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Cc: Chris Wright , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Avi Kiviti , Srivatsa Vaddagiri , Ingo Molnar , Anthony Liguori To: Rik van Riel Return-path: In-Reply-To: <4CF9368C.8030309@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, 2010-12-03 at 13:27 -0500, Rik van Riel wrote: > > Should these details all be in sched_fair? Seems like the wrong layer > > here. And would that condition go the other way? If new vruntime is > > smaller than min, then it becomes new cfs_rq->min_vruntime? > > That would be nice. Unfortunately, EXPORT_SYMBOL() does > not seem to work right from sched_fair.c, which is included > from sched.c instead of being built from the makefile! I'm not quite sure why that is, but I kinda like that, the policy implementation should never export stuff. Code outside the scheduler cannot ever know the policy of a task, hence policy specific exports are bad. A generic export with policy implementations (like the sched_class::yield_to() proposal) are the proper way.