[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <877i1va0j3.fsf@basil.nowhere.org>
Date: Wed, 08 Apr 2009 12:43:28 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
Cc: hpa@...or.com, linux-kernel@...r.kernel.org, mingo@...e.hu,
tglx@...utronix.de
Subject: Re: [PATCH] [1/4] x86: MCE: Make polling timer interval per CPU
Hidetoshi Seto <seto.hidetoshi@...fujitsu.com> writes:
>>
>> @@ -632,14 +633,14 @@
>> static void mce_init_timer(void)
>> {
>> struct timer_list *t = &__get_cpu_var(mce_timer);
>> + int *n = &__get_cpu_var(next_interval);
>>
>> - /* data race harmless because everyone sets to the same value */
>> - if (!next_interval)
>> - next_interval = check_interval * HZ;
>> - if (!next_interval)
>
> [plan A]
> Add
> if (!check_interval)
> return;
>
> Or...
>
>> + if (!*n)
>> + *n = check_interval * HZ;
>> + if (!*n)
>> return;
The !*n will return for check_interval == 0 because 0*HZ is still 0 so it should be
equivalent. Did I miss something?
-Andi
--
ak@...ux.intel.com -- Speaking for myself only.
--
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