On 03/19, Roland McGrath wrote:
>
> I'm no scheduler expert and I don't know whether the exact placement in
> your change is the optimal one.

Agreed, can't we do a bit more simple patch?

        --- kernel/signal.c
        +++ kernel/signal.c
        @@ -1572,8 +1572,10 @@ static void ptrace_stop(int exit_code, i
                spin_unlock_irq(&current->sighand->siglock);
                read_lock(&tasklist_lock);
                if (may_ptrace_stop()) {
        +               preempt_disable();
                        do_notify_parent_cldstop(current, CLD_TRAPPED);
                        read_unlock(&tasklist_lock);
        +               preempt_enable_no_resched();
                        schedule();
                } else {
                        /*

Yes, the task can be preempted right after spin_unlock(->siglock), but
this is unlikely. We need the "synchronous" wakeup, and this patch helps
as well.



Actually, I don't know which ptrace requests really need to make sure
the tracee was deactivated. Perhaps they can call wait_task_inactive()
themselves? I guess this is bad idea, but most of requests definitely
do not need wait_task_inactive().

Oleg.


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to