linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* removing flush_tlb_mm as a generic hook ?
@ 2007-07-09  3:47 Benjamin Herrenschmidt
  2007-07-09  6:36 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 12+ messages in thread
From: Benjamin Herrenschmidt @ 2007-07-09  3:47 UTC (permalink / raw)
  To: linux-mm; +Cc: Linux Kernel list

Hi folks !

While toying around with various MM callbacks, I found out that
flush_tlb_mm() as a generic hook provided by the archs has been mostly
obsoleted by the mmu_gather stuff.

(I'm not talking about archs internally wanting to implement it and use
it as a tlb_flush(), I'm talking about possibly making that optional :-)

I see two remaining users:

 - fs/proc/task_mmu.c, which I easily converted to use the mmu_gather
(I'll send a patch if people agree it's worth doing)

 - kernel/fork.c uses it to flush the "old" mm. That's the "meat".

I wonder if it's worth pursuing, that is converting copy_page_range to
use an mmu_gather on the source instead of using flush_tlb_mm. It might
allow some archs that can't just "flush all" easily but have to go
through every PTE individually to improve things a bit on fork, and it
allow them to remove the flush_tlb_mm() logic.

There is one reason why it's not a trivial conversion though, is that
copy_page_range() calls copy_hugetlb_page_range() for huge pages, and
I'm not sure about mixing up the hugetlb stuff with the mmu_gather
stuff, I need to do a bit more code auditing to figure out whether
that's an ok thing to do.

Nothing very urgent or important, it's just that one less hook seems
like a good idea ;-)

Cheers,
Ben.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2007-07-09 12:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-09  3:47 removing flush_tlb_mm as a generic hook ? Benjamin Herrenschmidt
2007-07-09  6:36 ` Benjamin Herrenschmidt
2007-07-09  6:45   ` [RFC/PATCH] Use mmu_gather for fork() instead of flush_tlb_mm() Benjamin Herrenschmidt
2007-07-09  7:39     ` Nick Piggin
2007-07-09  9:12       ` Benjamin Herrenschmidt
2007-07-09  9:29         ` Nick Piggin
2007-07-09  9:47           ` Benjamin Herrenschmidt
2007-07-09 10:12             ` Nick Piggin
2007-07-09 10:18               ` Nick Piggin
2007-07-09 12:37                 ` Benjamin Herrenschmidt
2007-07-09 12:32               ` Benjamin Herrenschmidt
2007-07-09  6:46   ` [RFC/PATCH] Use mmu_gather for /proc stuff " Benjamin Herrenschmidt

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