diff mbox

sched: export delayacct_on

Message ID CE59C043D0EC3349B2BF41C0EC72229B12D1EFB03C@shsmsx501.ccr.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ren, Yongjie July 14, 2011, 7:15 a.m. UTC
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@intel.com>
---


> -----Original Message-----
> From: Avi Kivity [mailto:avi@redhat.com]
> Sent: Wednesday, July 13, 2011 9:19 PM
> To: Tian, Kevin
> Cc: Ren, Yongjie; kvm@vger.kernel.org; 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Avi Kivity July 14, 2011, 9:55 a.m. UTC | #1
On 07/14/2011 10:15 AM, Ren, Yongjie wrote:
> 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.

Thanks, that will teach me to patch without testing.  Applied.
diff mbox

Patch

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)