tech-kern archive

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

Re: [PATCH] swapcontext vs pthread, round 4



Emmanuel, hi folks,

i'm not sure if i read the patch correctly, but i'd really would like to see
the setcontext()/swapcontext() to not use a system call. IIRC its using the
system call to set the signal masks etc. Can't this mask be kept in userland
only and inspected by the kernel on a signal? Would this make libpthread also
a lot faster? since it doesn't need a system call too? Can this info be stored
in a uncacheable page shared with all CPU cores so no IPI's need to be done
either? Maybe together with other data that needs to be synchronised anyway?

One of the reasons this is important to me is the excessive use of
setcontext()/swapcontext() in NetBSD/usermode. It would be nice if it really
gets down on system calls.

Talking on NetBSD/usermode, i'd really love someone to have a look/audit on
its use of setcontext()/swapcontext() since i know it has some shortcuts that
might be illegal / uncaring. I do get weird panics at time on a setcontext
that are most likely caused by these shortcuts.

With regards,
Reinoud



Home | Main Index | Thread Index | Old Index