Re: [PATCH scsi-misc-2.6 04/08] scsi: remove meaningless volatile qualifiers from structure definitions

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

 



On Tue, 2005-03-22 at 23:22 -0500, Jeff Garzik wrote:
> volatile is almost always (a) buggy, or (b) hiding bugs.  At the very 
> least, barriers are usually needed.

The choice is either barrier or volatile usually.  volatile is nasty
primarily because it causes compiler pessimism in variable reloading.

> Almost every case really wants to be inside a spinlock, or atomic_t, or 
> similarly protected.

I know that's what I'm asking if an audit has been conducted for...to
replace the volatile, accesses have to be barrier protected.

> Specifically for SATA, I am making the presumption that SCSI is smart 
> enough not to mess with host_failed until my error handler completes.

Yes, that's a valid assumption ... and by the single threaded nature of
the error handler, always true.  However, the proposed patch wanted to
add a spinlock around the access in the scsi eh thread (the comment
stating for clarity).  Thus, the same change should be made in SATA for
consistency.

Since that change isn't in the patch, I was asking if all the users of
these variables had been audited for barriers instead ... since the
answer looks to be "no" to me.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux