public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Erich Focht <efocht@ess.nec.de>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] Re: switch_mm race condition with Ingo's scheduler
Date: Fri, 12 Jul 2002 17:26:07 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590701905771@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590698805973@msgid-missing>

> But the only time you might reuse an old context number is when you
> allocate one.  Yes, you will have old entries hanging around in the
> TLB for a while, but you _know_ that the corresponding tasks already
> died and you also know that you'll flush the TLB before re-using one
> of those context numbers.

Context numbers are global, used by all CPUs in common. Suppose
task 123 is newly created and we want a context number for it. Unfortunately
it's time to wrap around context numbers and we reuse the context number
of task 100 which died a short while ago and left over TLB entries on all
CPUs of the machine.

get_new_mmu_context is called on the CPU where task 123 is scheduled first.
We can flush TLB there. But on the other CPUs the stale entries of task 100
survive. If no new context is needed before task 123 gets migrated to
another CPU, it might reuse TLB entries of task 100, which are wrong.
I'm not worried about taking an old context number but of using old TLB
entries when my newly created task with reused context number switches
CPUs. flush_tlb_all() was flushing all TLB entries by sending an IPI but
this can lead to a deadlock... Do I misunderstand something?

Regards,
Erich
 


  parent reply	other threads:[~2002-07-12 17:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-31 10:45 [Linux-ia64] Re: switch_mm race condition with Ingo's scheduler Erich Focht
2002-07-11 21:50 ` David Mosberger
2002-07-12 16:47 ` Erich Focht
2002-07-12 17:02 ` David Mosberger
2002-07-12 17:26 ` Erich Focht [this message]
2002-07-12 17:37 ` David Mosberger
2002-07-12 18:02 ` Grant Grundler
2002-07-12 18:47 ` David Mosberger

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-105590701905771@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