linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* active_mm & SMP & TLB flush: possible bug
@ 1999-07-28 12:30 Manfred Spraul
  1999-07-28 15:46 ` Benjamin C.R. LaHaise
  1999-07-28 18:07 ` Kanoj Sarcar
  0 siblings, 2 replies; 5+ messages in thread
From: Manfred Spraul @ 1999-07-28 12:30 UTC (permalink / raw)
  To: linux-mm

I think that active_mm breaks CLEVER_SMP_INVALIDATE
(linux/asm-i386/pgtable.h)
(version 2.3.11)

e.g. flush_tlb():
CPU 1 executes thread A, CPU2 waits in
the idle thread with a lazy TLB context of thread A.

CPU1: flush_tlb() causes no IPI because
current->mm->mm_users is still 1.

if these 2 CPU switch their roles, then we use an outdates
TLB cache.

-------------
BTW, where can I find more details about the active_mm implementation?
specifically, I'd like to know why active_mm was added to
"struct task_struct".
>From my first impression, it's a CPU specific information
(every CPU has exactly one active_mm, threads which are not running have
no
active_mm), so I'd have used a global array[NR_CPUS].


	Manfred
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: active_mm & SMP & TLB flush: possible bug
@ 1999-07-28 16:58 Manfred Spraul
  0 siblings, 0 replies; 5+ messages in thread
From: Manfred Spraul @ 1999-07-28 16:58 UTC (permalink / raw)
  To: Benjamin C.R. LaHaise; +Cc: Linux MM

>> BTW, where can I find more details about the active_mm implementation?
>> specifically, I'd like to know why active_mm was added to
>> "struct task_struct".
>> >From my first impression, it's a CPU specific information
>> (every CPU has exactly one active_mm, threads which are not running have
>> no
>> active_mm), so I'd have used a global array[NR_CPUS].
>
>That soulds like a good idea -- care to offer a patch? =)

I still try to understand the current implementation, and I can't propose a
patch before I understand the current code...

I'll try to write a patch over the weekend.


    Manfred





--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: active_mm & SMP & TLB flush: possible bug
@ 1999-07-28 18:35 Manfred Spraul, Benjamin C.R. LaHaise
  0 siblings, 0 replies; 5+ messages in thread
From: Manfred Spraul, Benjamin C.R. LaHaise @ 1999-07-28 18:35 UTC (permalink / raw)
  To: Benjamin C.R. LaHaise; +Cc: linux-mm

>> BTW, where can I find more details about the active_mm implementation?
>> specifically, I'd like to know why active_mm was added to
>> "struct task_struct".
>> >From my first impression, it's a CPU specific information
>> (every CPU has exactly one active_mm, threads which are not running have
>> no
>> active_mm), so I'd have used a global array[NR_CPUS].
>
>That soulds like a good idea -- care to offer a patch? =)

I know you should not reply twice to one mail, but I noticed that my initial
assumption was wrong:
It seems that the MMU caches can contain data from multiple
"struct mm_struct"'s on the PPC cpu, perhaps this also applies to
other CPU's.
It's Intel specific that the TLB contains data from just one mm_struct.


--
    Manfred


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

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

end of thread, other threads:[~1999-07-28 18:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-28 12:30 active_mm & SMP & TLB flush: possible bug Manfred Spraul
1999-07-28 15:46 ` Benjamin C.R. LaHaise
1999-07-28 18:07 ` Kanoj Sarcar
1999-07-28 16:58 Manfred Spraul
1999-07-28 18:35 Manfred Spraul, Benjamin C.R. LaHaise

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