[Linux-ia64] Re: O(1) MQ scheduler J9 patch for IA64 -> K3 patch

From: Erich Focht <focht_at_ess.nec.de>
Date: 2002-02-09 04:37:02
On Thu, 7 Feb 2002, David Mosberger wrote:

>   Erich> I had to add a function smp_call_function_nowait which sends
>   Erich> an IPI and returns immediately in order to get rid of a
>   Erich> IA64-specific race condition when the mmu_context wraps
>   Erich> around. Now it makes a very stable and fast impression,
>   Erich> interactive work is even possible while doing a "hackbench
>   Erich> 55" and ping flooding the machine... Tested on 2 CPU BigSur,
>   Erich> 4 CPU LION, 16 CPU AzusA.
> 
> Hmmh, I'm a bit worried that this is a fragile solution.  It would
> break if there ever was a scenario where a task migrated from one CPU
> to another while the target CPU has interrupts disabled.  I do not
> think this can happen with Ingo's current scheduler but I'd prefer a
> more robust solution.
> 
> A somewhat cheesy solution might be to have a per-CPU flag that
> indicates whether a CPU should flush its TLB before switching to the
> next task.  We could check for this in activate_mm().  Do you want to
> try this?

OK, I also feel better with the new solution. Didn't want to put it into
the runqueues because it really is an IA-64 problem. It's
architecture-specific and the CPU flags are in ia64_ctx. The context
wrapping is so seldom that the single lock protecting the CPU mask
shouldn't matter. But if somebody decides to use this mechanism generally
for flush_tlb_all() we'd have to change it...

Besides this: the attached patch is for the latest version of the
O(1) scheduler (K3). It has a different sys_sched_yield() from Ingo's
because that one has a problem with more than 8 CPUs. Also the
set_cpus_allowed() function has the limitation that it just works if the
current process tries to change its mask.

Best regards,
Erich




Received on Fri Feb 08 09:36:57 2002

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:07 EST