lkml.org 
[lkml]   [2012]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] kvm: remove dependence on delay-accounting
Marcelo Tosatti wrote:
> On Sat, Jan 14, 2012 at 08:30:51PM +0400, Konstantin Khlebnikov wrote:
>> KVM selects delay-accounting only to get sched-info for steal-time accounting.
>> Meanwhile delay-accounting can be disabled by boot option. This is ridiculous.
>>
>> This patch adds internal boolean option CONFIG_TASK_SCHED_INFO to enable only
>> task->sched_info and its collecting inside scheduler.
>>

<cut>

>> static inline int sched_info_on(void)
>> {
>> -#ifdef CONFIG_SCHEDSTATS
>> +#if IS_ENABLED(CONFIG_SCHEDSTATS) || IS_ENABLED(CONFIG_KVM)
>> return 1;
>
> CONFIG_TASK_SCHED_INFO?
>

It makes it equal to constant 1, because all its callers are
under #ifdef CONFIG_TASK_SCHED_INFO =)

its current code:

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
}

CONFIG_SCHEDSTATS == debug option in lib/Kconfig.debug for /proc/schedstat
CONFIG_TASK_DELAY_ACCT == wierd net-link based statistics collecting tool

Thus, may be better to remove this function, because it can return 0
only if delay-accounting is compiled but disabled by boot option
(delayacct_on =1 by default since 2.6.18)

patch follows...



\
 
 \ /
  Last update: 2012-01-16 14:45    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog