public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [Lse-tech] Re: CPU affinity & IPI latency (FIX)_
@ 2001-07-17 18:28 Hubertus Franke
  2001-07-19 16:56 ` Davide Libenzi
  0 siblings, 1 reply; 6+ messages in thread
From: Hubertus Franke @ 2001-07-17 18:28 UTC (permalink / raw)
  To: Davide Libenzi; +Cc: linux-kernel, lse-tech



This only applies only to the idle thread and it says that the idle
thread actively monitors its need_resched flag and hence will
instantly call schedule() at that point. Hence there won't be any
delay either for IPI or for waiting to return from the kernel.

You might be right that the problem situation still arises, because
the idle_thread needs to content again for the lock.
Let me ask the otherway around, why do we HAVE to put it in ?
And if I missed something here, we put it outside the <if> clause.


Hubertus Franke
Enterprise Linux Group (Mgr),  Linux Technology Center (Member Scalability)
, OS-PIC (Chair)
email: frankeh@us.ibm.com
(w) 914-945-2003    (fax) 914-945-4425   TL: 862-2003



Davide Libenzi <davidel@xmailserver.org>@lists.sourceforge.net on
07/17/2001 02:11:55 PM

Sent by:  lse-tech-admin@lists.sourceforge.net


To:   Hubertus Frnake <frankeh@watson.ibm.com>
cc:   linux-kernel@vger.kernel.org, lse-tech@lists.sourceforge.net,
      ak@suse.de
Subject:  Re: [Lse-tech] Re: CPU affinity & IPI latency (FIX)_




On 17-Jul-2001 Hubertus Frnake wrote:
> In an attempt to inline the code, somehow the tabs got lost. So here is
the
> attached correct patch fo 2.4.5. Please try and let me know whether you
> see your problems disappear and/or others arise.
> The sketchy writeup is still the same.

What is the reason You don't set the resched task in the fast path ?

        best_cpu = p->processor;
        if (can_schedule(p, best_cpu)) {
                tsk = idle_task(best_cpu);
                if ((cpu_curr(best_cpu) == tsk) &&
                    (cpu_resched(best_cpu) == NULL)) {
                        int need_resched;
send_now_idle:
                        /*
                         * If need_resched == -1 then we can skip sending
                         * the IPI altogether, tsk->need_resched is
                         * actively watched by the idle thread.
                         */
                        need_resched = tsk->need_resched;
                        tsk->need_resched = 1;
                        if ((best_cpu != this_cpu) && !need_resched) {
>>>>                            cpu_resched(best_cpu) = p;
                                smp_send_reschedule(best_cpu);
                        }
                        return;
                }
        }



- Davide


_______________________________________________
Lse-tech mailing list
Lse-tech@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/lse-tech




^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <OF46AE0C03.7FA13916-ON85256A8C.005E4CEB@pok.ibm.com>]

end of thread, other threads:[~2001-07-19 16:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <OF51487F8A.564A5A7D-ON85256A8C.0063C208@pok.ibm.com>
2001-07-17 18:12 ` [Lse-tech] Re: CPU affinity & IPI latency (FIX)_ Hubertus Franke
2001-07-17 18:28 Hubertus Franke
2001-07-19 16:56 ` Davide Libenzi
     [not found] <OF46AE0C03.7FA13916-ON85256A8C.005E4CEB@pok.ibm.com>
2001-07-17 17:33 ` Hubertus Frnake
2001-07-17 18:00   ` Davide Libenzi
2001-07-17 18:11   ` Davide Libenzi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox