[PATCH] sched: export delayacct_on

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Avi,
Thanks for effort. But I found your patch didn't include <linux/module.h>, so I add it in this patch. This will work in our kvm build system.
Export delayacct_on 
Needed for sched_info_on(), used by KVM.

Signed-off-by: Yongjie Ren <yongjie.ren@xxxxxxxxx>
---
diff --git a/kernel/delayacct.c b/kernel/delayacct.c
index ead9b61..418b3f7 100644
--- a/kernel/delayacct.c
+++ b/kernel/delayacct.c
@@ -19,8 +19,10 @@
 #include <linux/time.h>
 #include <linux/sysctl.h>
 #include <linux/delayacct.h>
+#include <linux/module.h>

 int delayacct_on __read_mostly = 1;    /* Delay accounting turned on/off */
+EXPORT_SYMBOL_GPL(delayacct_on);
 struct kmem_cache *delayacct_cache;

 static int __init delayacct_setup_disable(char *str)


> -----Original Message-----
> From: Avi Kivity [mailto:avi@xxxxxxxxxx]
> Sent: Wednesday, July 13, 2011 9:19 PM
> To: Tian, Kevin
> Cc: Ren, Yongjie; kvm@xxxxxxxxxxxxxxx; Glauber Costa
> Subject: Re: kvm upstream build error..
> 
> On 07/13/2011 09:22 AM, Tian, Kevin wrote:
> > it works in my side, due to config difference. It is caused by recent
> > steal time feature.
> >
> > int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
> >          case MSR_KVM_STEAL_TIME:
> >
> >                  if (unlikely(!sched_info_on()))
> >                          return 1;
> >
> > static inline int sched_info_on(void)
> > {
> > #ifdef CONFIG_SCHEDSTATS
> >          return 1;
> > #elif defined(CONFIG_TASK_DELAY_ACCT)
> >          extern int delayacct_on;
> >          return delayacct_on;
> > #else
> >          return 0;
> > #endif
> > }
> >
> > I have CONFIG_SCHEDSTATS enabled, while yours has CONFIG_SCHEDSTATS
> > as 'n' while "CONFIG_TASK_DELAY_ACCT) as 'y'. However delayacct_on is
> > not an exposed symbol to modules.
> >
> 
> I added an export.  Thanks.
> 
> --
> error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux