Re: [PATCH -tip] introduce sys_membarrier(): process-wide memory barrier (v9)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mathieu Desnoyers
Date: Tuesday, March 16, 2010 - 7:16 am

* Ingo Molnar (mingo@elte.hu) wrote:

OK, I guess "conceptually broken" would be more precise in this case. ;)


That could be an interesting approach to hook into the scheduler "return to
userspace" path. We have to consider that this signal should probably have a
very high priority if we expect it to effectively nest over other signal
handlers.

But it does not address the hook needed upon entry into the scheduler context
switch. I fear this one might be a bit harder to do without tons of extra
overhead.


Hrm, it makes we wonder if this optimization would not add a slight overhead to
the scheduler. By allowing this kind of enable/disable flag, we would have to
check for blocked signal delivery upon each return to userspace. With the
current system call used for masking signals, this check can accurately be done
only in the signal-related system calls. (but maybe the scheduler already has to
take part of this burden for other reasons I'm not aware of). But yes,
independently of the SA_RUNNING topic, this optimization might very well be
worth it. I've actually been thinking along the same lines for a enable-disable
"thread migration" flag too, but that's a completely different topic (and has
impact on scheduler migration and cpu hotplug, so it's not as easy as it seems).


That could work for return to userspace, any clever idea about how to deal with
the hook to call upon entry into context switch ?

Thanks,

Mathieu



-- 
Mathieu Desnoyers
Operating System Efficiency Consultant
EfficiOS Inc.
http://www.efficios.com
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -tip] introduce sys_membarrier(): process-wide memo ..., Mathieu Desnoyers, (Thu Feb 25, 4:23 pm)
Re: [PATCH -tip] introduce sys_membarrier(): process-wide ..., Mathieu Desnoyers, (Mon Mar 1, 7:25 am)
Re: [PATCH -tip] introduce sys_membarrier(): process-wide ..., Mathieu Desnoyers, (Tue Mar 2, 4:07 pm)
Re: [PATCH -tip] introduce sys_membarrier(): process-wide ..., Mathieu Desnoyers, (Thu Mar 4, 8:52 am)
Re: [PATCH -tip] introduce sys_membarrier(): process-wide ..., Mathieu Desnoyers, (Thu Mar 4, 9:03 am)
Re: [PATCH -tip] introduce sys_membarrier(): process-wide ..., Mathieu Desnoyers, (Thu Mar 4, 10:56 am)
Re: [PATCH -tip] introduce sys_membarrier(): process-wide ..., Mathieu Desnoyers, (Tue Mar 9, 9:16 pm)
Re: [PATCH -tip] introduce sys_membarrier(): process-wide ..., Mathieu Desnoyers, (Mon Mar 15, 1:53 pm)
Re: [PATCH -tip] introduce sys_membarrier(): process-wide ..., Mathieu Desnoyers, (Tue Mar 16, 6:05 am)
Re: [PATCH -tip] introduce sys_membarrier(): process-wide ..., Mathieu Desnoyers, (Tue Mar 16, 6:35 am)
Re: [PATCH -tip] introduce sys_membarrier(): process-wide ..., Mathieu Desnoyers, (Tue Mar 16, 7:16 am)