public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: dmitry.antipov@linaro•org (Dmitry Antipov)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] sched: generalize CONFIG_IRQ_TIME_ACCOUNTING for X86 and ARM
Date: Wed, 08 Feb 2012 07:15:26 -0800	[thread overview]
Message-ID: <4F32918E.9000905@linaro.org> (raw)
In-Reply-To: <20120208131833.GK889@n2100.arm.linux.org.uk>

On 02/08/2012 05:18 AM, Russell King - ARM Linux wrote:

>> diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c
>> index 5416c7c..56d2a9d 100644
>> --- a/arch/arm/kernel/sched_clock.c
>> +++ b/arch/arm/kernel/sched_clock.c
>> @@ -162,5 +162,8 @@ void __init sched_clock_postinit(void)
>>   	if (read_sched_clock == jiffy_sched_clock_read)
>>   		setup_sched_clock(jiffy_sched_clock_read, 32, HZ);
>>
>> +	if (!no_sched_irq_time)
>> +		enable_sched_clock_irqtime();
>
> Why are you placing this here?  sched_clock is available from the point
> that it's registered, which should be before the first sched_clock()
> call.

This is just because I'm thinking about:

if (read_sched_clock == jiffy_sched_clock_read)
         setup_sched_clock(jiffy_sched_clock_read, 32, HZ);
else if (!no_sched_irq_time)
	enable_sched_clock_irqtime();

I suppose that "fine granularity task irq time accounting"
makes no sense if sched_clock() granularity is poor.

> This could have been written:
>
> 	depends on X86 || (ARM&&  HAVE_SCHED_CLOCK)
>
> However, ARM will always have HAVE_SCHED_CLOCK after the next merge window,
> so this can become a much simpler:
>
> 	depends on X86 || ARM

OK.

Dmitry

  reply	other threads:[~2012-02-08 15:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 12:48 [PATCH] sched: generalize CONFIG_IRQ_TIME_ACCOUNTING for X86 and ARM Dmitry Antipov
2012-02-08 13:18 ` Russell King - ARM Linux
2012-02-08 15:15   ` Dmitry Antipov [this message]
2012-02-08 15:24     ` Russell King - ARM Linux
2012-02-09  2:51   ` Yong Zhang
2012-02-09  2:48 ` Yong Zhang
  -- strict thread matches above, loose matches on Subject: below --
2012-02-28  6:29 Dmitry Antipov
2012-02-20  6:04 Dmitry Antipov
2012-02-27 10:12 ` Peter Zijlstra
2012-02-28  6:19   ` Dmitry Antipov
2012-02-11  0:02 Dmitry Antipov
2012-02-17 11:22 ` Ingo Molnar
2012-02-09 17:25 Dmitry Antipov
2012-02-10 22:28 ` Venki Pallipadi
2012-02-08 23:58 Dmitry Antipov
2012-02-08 16:08 Dmitry Antipov
2012-02-08 22:50 ` Venki Pallipadi
2012-02-07 18:06 Dmitry Antipov
2012-02-07 22:56 ` Venki Pallipadi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F32918E.9000905@linaro.org \
    --to=dmitry.antipov@linaro$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox