Re: [PATCH v3 09/22] kthread: Allow to cancel kthread work

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

 



Hello,

On Tue, Nov 24, 2015 at 12:23:53PM -0800, Linus Torvalds wrote:
> instead (possibly just "spin_unlock_wait()" - but the explicit loop

I see.  Wasn't thinking about cache traffic.  Yeah, spin_unlock_wait()
seems a lot better.

> might be worth it if you then want to check the "canceling" flag
> independently of the lock state too).
> 
> In general, it's very dangerous to try to cook up your own locking
> rules. People *always* get it wrong.

It's either trylock on timer side or timer active spinning trick on
canceling side, so this seems the lesser of the two evils.

Thanks.

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux