Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Monday, July 23, 2007 - 9:13 am

On Monday 23 July 2007 18:05:58 Satyam Sharma wrote:


The first goal is correct code.

The reason for the memory barrier is to prevent other memory references
from being moved over the atomic reference.

e.g. when a bit is used to communicate with another CPU this might be dangerous.

I don't think it's a good idea to remove them. It'll likely introduce subtle
bugs. Atomic bitops tend to be so slow anyways that it doesn't make much
difference.

-Andi

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/8] i386: bitops: Cleanup, sanitize, optimize, Satyam Sharma, (Mon Jul 23, 9:05 am)
[PATCH 1/8] i386: bitops: Update/correct comments, Satyam Sharma, (Mon Jul 23, 9:05 am)
Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobber ..., Andi Kleen, (Mon Jul 23, 9:13 am)
Re: [PATCH 7/8] i386: bitops: Kill needless usage of __asm ..., Jeremy Fitzhardinge, (Mon Jul 23, 9:23 am)
Re: [PATCH 7/8] i386: bitops: Kill needless usage of __asm ..., Jeremy Fitzhardinge, (Mon Jul 23, 10:39 am)
Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobber ..., Jeremy Fitzhardinge, (Mon Jul 23, 10:49 am)
Re: [PATCH 7/8] i386: bitops: Kill needless usage of __asm ..., Jeremy Fitzhardinge, (Mon Jul 23, 11:28 am)
Re: [PATCH 7/8] i386: bitops: Kill needless usage of __asm ..., Jeremy Fitzhardinge, (Mon Jul 23, 1:40 pm)
Re: [PATCH 8/8] i386: bitops: smp_mb__{before, after}_clea ..., Jeremy Fitzhardinge, (Tue Jul 24, 12:48 am)
Re: [PATCH 4/8] i386: bitops: Kill volatile-casting of mem ..., Benjamin Herrenschmidt, (Tue Jul 24, 2:49 am)
Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobber ..., Benjamin Herrenschmidt, (Tue Jul 24, 2:52 am)
Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobber ..., Jeremy Fitzhardinge, (Tue Jul 24, 2:31 pm)
Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobber ..., Benjamin Herrenschmidt, (Tue Jul 24, 2:36 pm)
Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobber ..., Benjamin Herrenschmidt, (Tue Jul 24, 2:37 pm)
Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobber ..., Benjamin Herrenschmidt, (Tue Jul 24, 3:32 pm)