From patchwork Thu Jul 14 07:15:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ren, Yongjie" X-Patchwork-Id: 974442 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6E7GoVZ011957 for ; Thu, 14 Jul 2011 07:16:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753522Ab1GNHQs (ORCPT ); Thu, 14 Jul 2011 03:16:48 -0400 Received: from mga02.intel.com ([134.134.136.20]:43071 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752994Ab1GNHQr convert rfc822-to-8bit (ORCPT ); Thu, 14 Jul 2011 03:16:47 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 14 Jul 2011 00:16:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.65,527,1304319600"; d="scan'208";a="25707469" Received: from pgsmsx602.gar.corp.intel.com ([10.221.43.81]) by orsmga002.jf.intel.com with ESMTP; 14 Jul 2011 00:16:46 -0700 Received: from pgsmsx509.gar.corp.intel.com (172.30.13.17) by pgsmsx602.gar.corp.intel.com (10.221.43.81) with Microsoft SMTP Server (TLS) id 8.2.255.0; Thu, 14 Jul 2011 15:15:41 +0800 Received: from shsmsx601.ccr.corp.intel.com (10.239.4.112) by PGSMSX509.gar.corp.intel.com (172.30.13.17) with Microsoft SMTP Server (TLS) id 8.2.255.0; Thu, 14 Jul 2011 15:15:39 +0800 Received: from shsmsx501.ccr.corp.intel.com ([10.239.4.141]) by shsmsx601.ccr.corp.intel.com ([10.239.4.112]) with mapi; Thu, 14 Jul 2011 15:15:37 +0800 From: "Ren, Yongjie" To: Avi Kivity CC: "kvm@vger.kernel.org" , Glauber Costa , "Tian, Kevin" Date: Thu, 14 Jul 2011 15:15:36 +0800 Subject: [PATCH] sched: export delayacct_on Thread-Topic: [PATCH] sched: export delayacct_on Thread-Index: AcxBX20o/Qnq5Y0xR4CyBUokhDo4VAAkrxkQ Message-ID: References: <625BA99ED14B2D499DC4E29D8138F1506290C15CB3@shsmsx502.ccr.corp.intel.com> <4E1D9B3C.6090907@redhat.com> In-Reply-To: <4E1D9B3C.6090907@redhat.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: zh-CN, en-US MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 14 Jul 2011 07:16:50 +0000 (UTC) Hi Avi, Thanks for effort. But I found your patch didn't include , 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 --- > -----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 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 #include #include +#include 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)