Re: [PATCHv5 3/4] sparc64: Avoid irqsave/restore on vio.lock if in_softirq()

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

 



From: Sowmini Varadhan <sowmini.varadhan@xxxxxxxxxx>
Date: Wed, 22 Oct 2014 18:12:45 -0400

> 
> For NAPIfied drivers , there is no need to
> synchronize by doing irqsave/restore on vio.lock in the I/O
> path.
> 
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@xxxxxxxxxx>

Conditional locking is broken locking, and the bug you introduce
here is a good example of why that is.

If the vio->timer has to be triggered when vio_port_up() is
invoked, it will next run fron in_softirq() context regardless
of whether the user is sunvnet or sunvdc.  So it will elide
the locking regardless of who is using this vio context.

Never, ever, use conditional locking.

This locking is harmless overhead in a slow path, just leave
it alone for now.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux