lkml.org 
[lkml]   [2015]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sched: memory corruption on completing completions
On 02/06/2015 12:18 PM, Raghavendra K T wrote:
> On 02/06/2015 04:27 AM, Linus Torvalds wrote:
>> On Thu, Feb 5, 2015 at 2:37 PM, Davidlohr Bueso <dave@stgolabs.net>
>> wrote:
>>>>
>>>> It is possible that the paravirt spinlocks could be saved by:
>>>>
>>>> - moving the clearing of TICKET_SLOWPATH_FLAG into the fastpath
>>>> locking code.
>>>
>>> Ouch, to avoid deadlocks they explicitly need the unlock to occur before
>>> the slowpath tail flag is read.
>>
>> Well, just make the unlock do the actual real unlock operation
>> ("fastpath"), leaving the TICKET_SLOWPATH_FLAG alone. The unlock path
>> can *test* the flag and do whatever kicking it needs to get people
>> started again, but not clear it again.
>>
>
> This is definitely a good idea, will think more on this.
>

Just sent the patch with that idea, also keeping in mind that
head = tail may not hold good for trylock checking
(last unlock might have left TICKET_SLOWPATH_FLAG set)

http://article.gmane.org/gmane.linux.kernel/1883900



\
 
 \ /
  Last update: 2015-02-06 16:21    [W:0.050 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site