public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] SMP TLB flushes
@ 2000-08-31 17:57 Manfred Spraul
  2000-08-31 18:40 ` Stephan.Zeisset
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Manfred Spraul @ 2000-08-31 17:57 UTC (permalink / raw)
  To: linux-ia64

Is it correct that the SMP part of the SMP flushing code is still
missing? I'm just noisy and I don't understand yet how the ia64 cpu is
supposed to perform tlb flushes.

* ptc.g only gets the address and the size as parameters, but not a
region id. What if cpu 1 (running kswapd, arbitrary thread context)
wants to flush a page from another thread, and that thread is running on
cpu 2?

* could you add a big warning to start_lazy_tlb [kernel/exit.c] that the
function is unsafe?
Both ppc and ia64 scan the task list and assume that they can find each
mm_struct. If someone actually uses start_lazy_tlb, then that would be
incorrect.

Btw, the i386 tlb flush contained a single instruction race (read x,
write y instead of write y, read x) and this was enough for corruptions
- I overlooked one problem with concurrent tlb flushes and thread
switches.

Please cc me, I'm not subscribed to the list.

--
	Manfred


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [Linux-ia64] SMP TLB flushes
  2000-08-31 17:57 [Linux-ia64] SMP TLB flushes Manfred Spraul
@ 2000-08-31 18:40 ` Stephan.Zeisset
  2000-08-31 18:56 ` David Mosberger
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Stephan.Zeisset @ 2000-08-31 18:40 UTC (permalink / raw)
  To: linux-ia64

As for the ptc.g, the region id comes from the region register that
is selected through bits [63:61] of the address.

-----Original Message-----
From: Manfred Spraul [mailto:manfred@colorfullife.com]
Sent: Thursday, August 31, 2000 10:57 AM
To: linux-ia64@linuxia64.org
Subject: [Linux-ia64] SMP TLB flushes


Is it correct that the SMP part of the SMP flushing code is still
missing? I'm just noisy and I don't understand yet how the ia64 cpu is
supposed to perform tlb flushes.

* ptc.g only gets the address and the size as parameters, but not a
region id. What if cpu 1 (running kswapd, arbitrary thread context)
wants to flush a page from another thread, and that thread is running on
cpu 2?

* could you add a big warning to start_lazy_tlb [kernel/exit.c] that the
function is unsafe?
Both ppc and ia64 scan the task list and assume that they can find each
mm_struct. If someone actually uses start_lazy_tlb, then that would be
incorrect.

Btw, the i386 tlb flush contained a single instruction race (read x,
write y instead of write y, read x) and this was enough for corruptions
- I overlooked one problem with concurrent tlb flushes and thread
switches.

Please cc me, I'm not subscribed to the list.

--
	Manfred

_______________________________________________
Linux-IA64 mailing list
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Linux-ia64] SMP TLB flushes
  2000-08-31 17:57 [Linux-ia64] SMP TLB flushes Manfred Spraul
  2000-08-31 18:40 ` Stephan.Zeisset
@ 2000-08-31 18:56 ` David Mosberger
  2000-08-31 19:04 ` Rao, Goutham
  2000-08-31 22:28 ` Manfred Spraul
  3 siblings, 0 replies; 5+ messages in thread
From: David Mosberger @ 2000-08-31 18:56 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Thu, 31 Aug 2000 19:57:11 +0200, Manfred Spraul <manfred@colorfullife.com> said:

  Manfred> * could you add a big warning to start_lazy_tlb
  Manfred> [kernel/exit.c] that the function is unsafe?  Both ppc and
  Manfred> ia64 scan the task list and assume that they can find each
  Manfred> mm_struct. If someone actually uses start_lazy_tlb, then
  Manfred> that would be incorrect.

Why are you asking on the IA-64 list for this change?  It's in a
platform-independent file so it's up to Linus to decide what to do
with that function.  It's presently unused and if it's not safe, why
not get rid of it?

	--david


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [Linux-ia64] SMP TLB flushes
  2000-08-31 17:57 [Linux-ia64] SMP TLB flushes Manfred Spraul
  2000-08-31 18:40 ` Stephan.Zeisset
  2000-08-31 18:56 ` David Mosberger
@ 2000-08-31 19:04 ` Rao, Goutham
  2000-08-31 22:28 ` Manfred Spraul
  3 siblings, 0 replies; 5+ messages in thread
From: Rao, Goutham @ 2000-08-31 19:04 UTC (permalink / raw)
  To: linux-ia64

Hi,
ptc.g gets RID from bits 63:61 of the address used in the purge instruction.

Thanks
Goutham

-----Original Message-----
From: Manfred Spraul [mailto:manfred@colorfullife.com]
Sent: Thursday, August 31, 2000 10:57 AM
To: linux-ia64@linuxia64.org
Subject: [Linux-ia64] SMP TLB flushes


Is it correct that the SMP part of the SMP flushing code is still
missing? I'm just noisy and I don't understand yet how the ia64 cpu is
supposed to perform tlb flushes.

* ptc.g only gets the address and the size as parameters, but not a
region id. What if cpu 1 (running kswapd, arbitrary thread context)
wants to flush a page from another thread, and that thread is running on
cpu 2?

* could you add a big warning to start_lazy_tlb [kernel/exit.c] that the
function is unsafe?
Both ppc and ia64 scan the task list and assume that they can find each
mm_struct. If someone actually uses start_lazy_tlb, then that would be
incorrect.

Btw, the i386 tlb flush contained a single instruction race (read x,
write y instead of write y, read x) and this was enough for corruptions
- I overlooked one problem with concurrent tlb flushes and thread
switches.

Please cc me, I'm not subscribed to the list.

--
	Manfred

_______________________________________________
Linux-IA64 mailing list
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Linux-ia64] SMP TLB flushes
  2000-08-31 17:57 [Linux-ia64] SMP TLB flushes Manfred Spraul
                   ` (2 preceding siblings ...)
  2000-08-31 19:04 ` Rao, Goutham
@ 2000-08-31 22:28 ` Manfred Spraul
  3 siblings, 0 replies; 5+ messages in thread
From: Manfred Spraul @ 2000-08-31 22:28 UTC (permalink / raw)
  To: linux-ia64

Stephan.Zeisset@intel.com wrote:
> 
> As for the ptc.g, the region id comes from the region register that
> is selected through bits [63:61] of the address.
> 

That means flush_tlb_range on SMP should

* acquire ptcg_lock
* change the region register to mm->...
* ptc.g
* restore the region register from current->active_mm->...
* release the spinlock.


Thanks for your answer,

	Manfred


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-08-31 22:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-31 17:57 [Linux-ia64] SMP TLB flushes Manfred Spraul
2000-08-31 18:40 ` Stephan.Zeisset
2000-08-31 18:56 ` David Mosberger
2000-08-31 19:04 ` Rao, Goutham
2000-08-31 22:28 ` Manfred Spraul

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