From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH][RFC] kvm-scheduler integration Date: Mon, 09 Jul 2007 09:41:38 +0300 Message-ID: <4691D8A2.2040706@qumranet.com> References: <11838994974161-git-send-email-avi@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: KVM , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andi Kleen Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org [cc list restored] Andi Kleen wrote: > Avi Kivity writes: > >> diff --git a/include/linux/sched.h b/include/linux/sched.h >> index 693f0e6..b705876 100644 >> --- a/include/linux/sched.h >> +++ b/include/linux/sched.h >> @@ -875,6 +875,10 @@ struct task_struct { >> pid_t pid; >> pid_t tgid; >> >> +#ifdef CONFIG_SCHED_KVM >> + struct kvm_vcpu *kvm_vcpu; >> +#endif >> > > You should be careful to put this into a cache line that > is already touched during context switch. Otherwise > if it needs an additional cache miss it might become > very costly > Yeah, I'll look into task_struct again to find a good place. > Also it's a bit worrying to expose hooks into the scheduler > to any modules. How would others be stopped from abusing this? > The functions for installing a hook are out-of-line and EXPORT_SYMBOL_GPL'ed, in case that helps. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/