gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] swapcontest usage in syncio.c


From: Anand Avati
Subject: Re: [Gluster-devel] swapcontest usage in syncio.c
Date: Wed, 8 Aug 2012 22:13:34 -0700



On Wed, Aug 8, 2012 at 10:13 PM, Emmanuel Dreyfus <address@hidden> wrote:
Anand Avati <address@hidden> wrote:

> I still don't understand how/why this change will help NetBSD

It ensures swapcontext() is operates on a context obtanined by
getcontext() in the same thread.

NetBSD considers the thread to be part of the context, and calling
swapcontext() with a context obtained from another thread will preempt
the other thread in order to execute synctask_wrap(). And here we break
because synctask_get() will not retreive the approriate task, as it was
set in thread specific storage of another thread.

I wonder how this will impact multi-thread syncproc. You might want to #define SYNCENV_PROC_MAX to 1?

Avati


reply via email to

[Prev in Thread] Current Thread [Next in Thread]