Linux IA64 platform development
 help / color / mirror / Atom feed
From: Erich Focht <efocht@ess.nec.de>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] switch_mm race condition with Ingo's scheduler
Date: Wed, 30 Jan 2002 16:58:33 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590698805962@msgid-missing> (raw)

Hi,

I found another race condition with the O(1) MQ scheduler from Ingo. The
pattern is the following:

CPU#0:
------
schedule        -> take runqueue #0 lock
  context_switch
    activate_mm
      get_new_mmu_context
        wrap_mmu_context
          flush_tlb_all
            smp_call_function (and wait...)

CPU#1:
------
schedule        -> disable interrupts, take runqueue #1 lock
  load_balance  -> wants to get task from runqueue #0: release rq#1,
                   spinlock on rq #0 (interrupts disabled) => wait forever...


As the interrupts are disabled on CPU#1, the IPI cannot reach CPU#1.

Enabling interrupts while waiting for the rq#0 lock in load_balance is not
an option because it leads to other race conditions (the timer-interrupt
may call sched_tick and load_balance and end up spin-waiting on the same
lock).

Is it really necessary to flush all TLBs when doing a context switch on
one?

Any ideas, solutions?

Thanks,
Erich



             reply	other threads:[~2002-01-30 16:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-30 16:58 Erich Focht [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-10 17:27 [Linux-ia64] switch_mm race condition with Ingo's scheduler Erich Focht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590698805962@msgid-missing \
    --to=efocht@ess.nec.de \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox