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 Mailing List <linux-kernel@...>, <valdis.kletnieks@...>, <riel@...>, <ksm@...>, <staubach@...>, <jesper.juhl@...>, <a.p.zijlstra@...>, Andrew Morton <akpm@...>, <protasnb@...>, <miklos@...>, <r.e.wolff@...>, <hidave.darkstar@...>, <hch@...>
Date: Monday, January 21, 2008 - 10:16 pm

On Tue, 22 Jan 2008, Anton Salikhmetov wrote:

This is extremely expensive over bigger areas, especially sparsely mapped 
ones (it does all the lookups for all four levels over and over and over 
again for eachg page).

I think Peter Zijlstra posted a version that uses the regular kind of 
nested loop (with inline functions to keep the thing nice and clean), 
which gets rid of that.

[ The sad/funny part is that this is all how we *used* to do msync(), back 
  in the days: we're literally going back to the "pre-cleanup" logic. See 
  commit 204ec841fbea3e5138168edbc3a76d46747cc987: "mm: msync() cleanup" 
  for details ]

Quite frankly, I really think you might be better off just doing a

	git revert 204ec841fbea3e5138168edbc3a76d46747cc987

and working from there! I just checked, and it still reverts cleanly, and 
you'd end up with a nice code-base that (a) has gotten years of testing 
and (b) already has the looping-over-the-pagetables code.

			Linus
--
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..., Linus Torvalds, (Mon Jan 21, 10:16 pm)
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)