[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1326720836.2442.231.camel@twins>
Date: Mon, 16 Jan 2012 14:33:56 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Konstantin Khlebnikov <khlebnikov@...nvz.org>
Cc: Ingo Molnar <mingo@...e.hu>, Marcelo Tosatti <mtosatti@...hat.com>,
Avi Kivity <avi@...hat.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Subject: Re: [PATCH v2] kvm: remove dependence on delay-accounting
On Sat, 2012-01-14 at 20:30 +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.
Urgh, more stupid config knobs, we should be removing them, not adding
moar.
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 868cb83..dd5bf78 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -734,7 +734,6 @@ extern struct user_struct root_user;
>
> struct backing_dev_info;
>
> -#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
> struct sched_info {
> /* cumulative counters */
> unsigned long pcount; /* # of times run on this cpu */
> @@ -744,7 +743,6 @@ struct sched_info {
> unsigned long long last_arrival,/* when we last ran on a cpu */
> last_queued; /* when we were last queued to run */
> };
> -#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */
Not having that structure helps with compile errors.
> #ifdef CONFIG_TASK_DELAY_ACCT
> struct task_delay_info {
> @@ -782,7 +780,7 @@ struct task_delay_info {
>
> static inline int sched_info_on(void)
> {
> -#ifdef CONFIG_SCHEDSTATS
> +#if IS_ENABLED(CONFIG_SCHEDSTATS) || IS_ENABLED(CONFIG_KVM)
WTF is IS_ENABLED and why do you use it?
Not much like this stuff.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists