On 02/14/14 17:12, Hannes Reinecke wrote:
> The reason I did this was that I don't have to allocate memory
> unnecesarily.
> If I move the allocation out of the spinlock I'll have to recheck
> the list upon insertion to ensure no duplicates are present.
> Upon hitting a duplicate I would have to release the memory again.
> 
> I do agree that GFP_KERNEL is probably not the correct thing here;
> so either I move it to GFP_ATOMIC or we may run into a chance of
> having to release the memory again afterwards.
> 
> Personally I'm inclined to use GFP_ATOMIC, but I'm not sure what'd
> be best.
> 
> What would you suggest here?

I have not yet had a chance to audit all code where list_lock is used.
Is sleeping allowed in each function where list_lock is used ? If so,
how about using a mutex instead of a spinlock ?

Bart.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to