Re: [PATCH 1/3] mpt2sas: remove the use of writeq, since writeq isnot atomic
From: Hitoshi Mitake
Date: Thu May 19 2011 - 00:08:46 EST
On Thu, May 19, 2011 at 04:11, Moore, Eric <Eric.Moore@xxxxxxx> wrote:
> On Wednesday, May 18, 2011 12:31 PM Milton Miller wrote:
>> Ingo I would propose the following commits added in 2.6.29 be reverted.
>> I think the current concensus is drivers must know if the writeq is
>> not atomic so they can provide their own locking or other workaround.
>>
>
>
> Exactly.
>
The original motivation of preparing common readq/writeq is that
letting each driver
have their own readq/writeq is bad for maintenance of source code.
But if you really dislike them, there might be two solutions:
1. changing the name of readq/writeq to readq_nonatomic/writeq_nonatomic
2. adding new C file to somewhere and defining spinlock for them.
With spin_lock_irqsave() and spin_unlock_irqrestore() on the spinlock,
readq/writeq can be atomic.
How do you think about them? If you cannot agree with the above two solutions,
I'll agree with reverting them.
--
Hitoshi Mitake
h.mitake@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/