hi,
> On Thu, Aug 09, 2012 at 08:44:05PM +0200, Emmanuel Dreyfus wrote:
>> setjmp and longjmp are claim to not match the requirement because they
>> do not allow different stacks for each execution context.
>
> But there is a strong correlation between thread and stack, you can not
> switch one w
On Fri, Aug 10, 2012 at 05:11:02AM +0200, Emmanuel Dreyfus wrote:
> Joerg Sonnenberger wrote:
>
> > Is there a point? Our swapcontext is effectively a system call.
> > If it wasn't, it is still quite expensive for a routine that supposedly
> > only changes %rsp followed by a call, at least for a
Joerg Sonnenberger wrote:
> Is there a point? Our swapcontext is effectively a system call.
> If it wasn't, it is still quite expensive for a routine that supposedly
> only changes %rsp followed by a call, at least for architectures that
> don't use a register window algorithm.
It does more tha
Thor Lancelot Simon wrote:
> > Right, but the question is: can we mimick the Linux behavior?
> Would you jump off a bridge if all your friends were doing it?
I propose offering optionnally the Linux behavior, which helps porting
Linux applications. glusterfs usage of swapcontext is not a detail,
On Fri, Aug 10, 2012 at 03:00:34AM +0200, Emmanuel Dreyfus wrote:
> David Holland wrote:
>
> > Probably that the entire operating environment of B is cloned and run
> > in thread A, that is, that it's a magic implementation of threaded
> > continuations.
>
> Right, but the question is: can we mi
On Fri, Aug 10, 2012 at 03:00:34AM +0200, Emmanuel Dreyfus wrote:
> David Holland wrote:
>
> > Probably that the entire operating environment of B is cloned and run
> > in thread A, that is, that it's a magic implementation of threaded
> > continuations.
>
> Right, but the question is: can we mi
David Holland wrote:
> Probably that the entire operating environment of B is cloned and run
> in thread A, that is, that it's a magic implementation of threaded
> continuations.
Right, but the question is: can we mimick the Linux behavior?
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
m...@n
On Thu, Aug 09, 2012 at 08:47:51PM +0200, Martin Husemann wrote:
> On Thu, Aug 09, 2012 at 08:44:05PM +0200, Emmanuel Dreyfus wrote:
> > setjmp and longjmp are claim to not match the requirement because they
> > do not allow different stacks for each execution context.
>
> But there is a stro
On Thu, Aug 09, 2012 at 08:44:05PM +0200, Emmanuel Dreyfus wrote:
> setjmp and longjmp are claim to not match the requirement because they
> do not allow different stacks for each execution context.
But there is a strong correlation between thread and stack, you can not
switch one without the othe
Joerg Sonnenberger wrote:
> It sounds a lot like you should be using setjmp/longjmp in first place.
> swapcontext works exactly as advertised and e.g. the thread base is part
> of the context.
I play back and forth between tech-kern@netbsd.org and
gluster-de...@nongnu.org:
setjmp and longjmp a
On Thu, Aug 09, 2012 at 04:13:43PM +, Emmanuel Dreyfus wrote:
> I encountered a funny portability problem when working on glusterfs.
> In its 3.3. branch, it makes heavy use of swapcontext() and pthreads
> to get better performance. Unfortunately the code assumes a Linux
> specific behavior : a
Hi
I encountered a funny portability problem when working on glusterfs.
In its 3.3. branch, it makes heavy use of swapcontext() and pthreads
to get better performance. Unfortunately the code assumes a Linux
specific behavior : a thread calling swapcontext() should not affect
other threads. Only t
12 matches
Mail list logo