Re: [PATCH] ACPI: Read TSC upon resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(resending as plain text, sorry if you got dupe messages)

On Wed, Oct 6, 2010 at 7:19 PM, Greg KH <gregkh@xxxxxxx> wrote:
> On Wed, Oct 06, 2010 at 04:15:19PM -0700, Sameer Nanda wrote:
>> Read the TSC upon resuming and print it out. This is useful
>> in helping figure out amount of time spent in the BIOS when
>> resuming from suspend.
>>
>> Change-Id: I1d6a32bd62421becddecd152d561763e5f3e1101
>
> What is this tag for? ÂI don't think it matches anything the kernel
> community wants, do you?

Yeah, its not needed.  Let me resubmit the patch without this tag.

>
> And are you always going to be printing this out? ÂWhy do we want to
> know this every time?

Yes, every time.  This helps track variance in BIOS resume times
within a single boot.

>
>> Signed-off-by: Sameer Nanda <snanda@xxxxxxxxxxxx>
>> ---
>> Âdrivers/acpi/sleep.c | Â Â4 ++++
>> Â1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
>> index c0fed2e..f0588fa 100644
>> --- a/drivers/acpi/sleep.c
>> +++ b/drivers/acpi/sleep.c
>> @@ -214,6 +214,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
>> Â Â Â acpi_status status = AE_OK;
>> Â Â Â unsigned long flags = 0;
>> Â Â Â u32 acpi_state = acpi_target_sleep_state;
>> + Â Â u64 tsc;
>>
>> Â Â Â ACPI_FLUSH_CPU_CACHE();
>>
>> @@ -235,6 +236,9 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
>>
>> Â Â Â case ACPI_STATE_S3:
>> Â Â Â Â Â Â Â do_suspend_lowlevel();
>> + Â Â Â Â Â Â rdtscll(tsc);
>> + Â Â Â Â Â Â printk(KERN_INFO "TSC at resume: %llu\n",
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â (unsigned long long)tsc);
>
> How long does this take, will it slow down resume?

The impact is ~10us (as measured on an Intel Atom N455 @ 1.66Ghz).
Given that resume time is currently of the order of 1sec, its in the
noise range.

Thanks for the feedback!

>
> thanks,
>
> greg k-h
>



-- 
Sameer
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux