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

Re: [Xen-devel] [PATCH v2 1/5] x86/cpuidle: switch to uniform meaning of "max_cstate="



>        {
> @@ -1396,12 +1405,12 @@ int pmstat_reset_cx_stat(uint32_t cpuid)
>    
>    void cpuidle_disable_deep_cstate(void)
>    {
> -    if ( max_cstate > 1 )
> +    if ( max_cstate > ACPI_STATE_C1 )
>        {
>            if ( local_apic_timer_c2_ok )
> -            max_cstate = 2;
> +            max_cstate = ACPI_STATE_C2;
>            else
> -            max_cstate = 1;
> +            max_cstate = ACPI_STATE_C1;
>        }
>    
>        hpet_disable_legacy_broadcast();
> @@ -1409,7 +1418,8 @@ void cpuidle_disable_deep_cstate(void)
>    
>    bool cpuidle_using_deep_cstate(void)
>    {
> -    return xen_cpuidle && max_cstate > (local_apic_timer_c2_ok ? 2 : 1);
> +    return xen_cpuidle && max_cstate > (local_apic_timer_c2_ok ? 
> ACPI_STATE_C2
> +                                                               : 
> ACPI_STATE_C1);
>    }
>    
>    static int cpu_callback(
> --- a/xen/arch/x86/cpu/mwait-idle.c
> +++ b/xen/arch/x86/cpu/mwait-idle.c
> @@ -731,7 +731,8 @@ static void mwait_idle(void)
>               } while (cx->type > max_cstate && --next_state);
>               if (!next_state)
>                       cx = NULL;
> -             menu_get_trace_data(&exp, &pred);
> +             else if (tb_init_done)
> +                     menu_get_trace_data(&exp, &pred);

Style ??

~Alex
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.