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

Re: [Minios-devel] [UNIKRAFT PATCH 7/8] lib/ukschedcoop: Fix yield behavior when current thread is first in thread list



On 5/28/19 10:14 PM, Florian Schmidt wrote:
> Hi Costin,
> 
> when testing this patch, I ran into an issue. If I create a chain of
> three threads that spawn one each and then go to sleep, I get stuck in
> an infinite loop here:
> 
> On 4/23/19 12:41 PM, Costin Lupu wrote:
>> +        /* wake some sleeping threads */
>> +        UK_TAILQ_FOREACH_SAFE(thread, &prv->sleeping_threads,
>>                         thread_list, tmp) {
>> +            if (thread->wakeup_time && thread->wakeup_time <= now) {
>> +                uk_thread_wake(thread);
>> +                UK_TAILQ_REMOVE(&prv->sleeping_threads,
>> +                        thread, thread_list);
>> +                if (thread != uk_thread_current())
>> +                    UK_TAILQ_INSERT_TAIL(&prv->thread_list,
>> +                            thread, thread_list);
>> +
>> +            } else if (thread->wakeup_time < min_wakeup_time)
>> +                min_wakeup_time = thread->wakeup_time;
>>           }
> 
> Can you have a look and see what goes wrong there? I sent you my test
> program off-list.

Yeah, I forgot some code in the patch. I will send a v2.

Thanks,
Costin

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.