Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Anton Salikhmetov <salikhmetov@...>
Cc: <linux-mm@...>, <jakob@...>, <linux-kernel@...>, <valdis.kletnieks@...>, <riel@...>, <ksm@...>, <staubach@...>, <jesper.juhl@...>, <torvalds@...>
Date: Tuesday, January 22, 2008 - 12:39 am

Anton Salikhmetov <salikhmetov@gmail.com> writes:

You should probably put your design document somewhere in Documentation
with a patch.


This means on i386 with highmem ptes you will map/flush tlb/unmap each
PTE individually. You will do 512 times as much work as really needed
per PTE leaf page.

The performance critical address space walkers use a different design
pattern that avoids this.


Flushing TLBs unbatched can also be very expensive because if the MM is
shared by several CPUs you'll have a inter-processor interrupt for 
each iteration. They are quite costly even on smaller systems.

It would be better if you did a single flush_tlb_range() at the end.
This means on x86 this will currently always do a full flush, but that's
still better than really slowing down in the heavily multithreaded case.

-Andi
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -v7 0/2] Fixing the issue with memory-mapped file times, Anton Salikhmetov, (Mon Jan 21, 8:32 pm)
Re: [PATCH -v7 0/2] Fixing the issue with memory-mapped file..., Anton Salikhmetov, (Mon Jan 21, 9:40 pm)
[PATCH -v7 2/2] Update ctime and mtime for memory-mapped files, Anton Salikhmetov, (Mon Jan 21, 8:32 pm)
Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped..., Andi Kleen, (Tue Jan 22, 12:39 am)
Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped..., Anton Salikhmetov, (Mon Jan 21, 10:39 pm)
Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped..., Anton Salikhmetov, (Mon Jan 21, 9:51 pm)
Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped..., Anton Salikhmetov, (Mon Jan 21, 9:57 pm)
Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped..., Anton Salikhmetov, (Mon Jan 21, 10:07 pm)
[PATCH -v7 1/2] Massive code cleanup of sys_msync(), Anton Salikhmetov, (Mon Jan 21, 8:32 pm)