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

2008-01-22 Thread Miklos Szeredi
> > > > > > /* > > > + * Scan the PTEs for pages belonging to the VMA and mark them read-only. > > > + * It will force a pagefault on the next write access. > > > + */ > > > +static void vma_wrprotect(struct vm_area_struct *vma) > > > +{ > > > + unsigned long addr; > > > + > > > + for

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

2008-01-22 Thread Miklos Szeredi
/* + * Scan the PTEs for pages belonging to the VMA and mark them read-only. + * It will force a pagefault on the next write access. + */ +static void vma_wrprotect(struct vm_area_struct *vma) +{ + unsigned long addr; + + for (addr = vma-vm_start; addr

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

2008-01-21 Thread Andi Kleen
Anton Salikhmetov <[EMAIL PROTECTED]> writes: You should probably put your design document somewhere in Documentation with a patch. > + * Scan the PTEs for pages belonging to the VMA and mark them read-only. > + * It will force a pagefault on the next write access. > + */ > +static void

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

2008-01-21 Thread Anton Salikhmetov
2008/1/22, Linus Torvalds <[EMAIL PROTECTED]>: > > > On Tue, 22 Jan 2008, Anton Salikhmetov wrote: > > > > /* > > + * Scan the PTEs for pages belonging to the VMA and mark them read-only. > > + * It will force a pagefault on the next write access. > > + */ > > +static void vma_wrprotect(struct

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

2008-01-21 Thread Jesper Juhl
On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > 2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > > On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > > > 2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > > > > Some very pedantic nitpicking below; > > > > > > > > On 22/01/2008,

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

2008-01-21 Thread Linus Torvalds
On Tue, 22 Jan 2008, Anton Salikhmetov wrote: > > /* > + * Scan the PTEs for pages belonging to the VMA and mark them read-only. > + * It will force a pagefault on the next write access. > + */ > +static void vma_wrprotect(struct vm_area_struct *vma) > +{ > + unsigned long addr; > + > +

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

2008-01-21 Thread Jesper Juhl
On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > 2008/1/22, Anton Salikhmetov <[EMAIL PROTECTED]>: > > 2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > > > Some very pedantic nitpicking below; > > > ... > > By the way, if we're talking "pedantic", then: > > >>> > > debian:/tmp$ cat c.c >

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

2008-01-21 Thread Anton Salikhmetov
2008/1/22, Anton Salikhmetov <[EMAIL PROTECTED]>: > 2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > > Some very pedantic nitpicking below; > > > > On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > > > http://bugzilla.kernel.org/show_bug.cgi?id=2645#c40 > > > > > > Update file times at

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

2008-01-21 Thread Anton Salikhmetov
2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > > 2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > > > Some very pedantic nitpicking below; > > > > > > On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > ... > > > > +

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

2008-01-21 Thread Jesper Juhl
On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > 2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > > Some very pedantic nitpicking below; > > > > On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: ... > > > + if (file && (vma->vm_flags & VM_SHARED)) { > > > +

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

2008-01-21 Thread Anton Salikhmetov
2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > Some very pedantic nitpicking below; > > On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > > http://bugzilla.kernel.org/show_bug.cgi?id=2645#c40 > > > > Update file times at write references to memory-mapped files. > > Force file times

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

2008-01-21 Thread Jesper Juhl
Some very pedantic nitpicking below; On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=2645#c40 > > Update file times at write references to memory-mapped files. > Force file times update at the next write reference after > calling the

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

2008-01-21 Thread Anton Salikhmetov
http://bugzilla.kernel.org/show_bug.cgi?id=2645#c40 Update file times at write references to memory-mapped files. Force file times update at the next write reference after calling the msync() system call with the MS_ASYNC flag. Signed-off-by: Anton Salikhmetov <[EMAIL PROTECTED]> ---

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

2008-01-21 Thread Anton Salikhmetov
http://bugzilla.kernel.org/show_bug.cgi?id=2645#c40 Update file times at write references to memory-mapped files. Force file times update at the next write reference after calling the msync() system call with the MS_ASYNC flag. Signed-off-by: Anton Salikhmetov [EMAIL PROTECTED] --- mm/memory.c

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

2008-01-21 Thread Jesper Juhl
Some very pedantic nitpicking below; On 22/01/2008, Anton Salikhmetov [EMAIL PROTECTED] wrote: http://bugzilla.kernel.org/show_bug.cgi?id=2645#c40 Update file times at write references to memory-mapped files. Force file times update at the next write reference after calling the msync()

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

2008-01-21 Thread Anton Salikhmetov
2008/1/22, Jesper Juhl [EMAIL PROTECTED]: Some very pedantic nitpicking below; On 22/01/2008, Anton Salikhmetov [EMAIL PROTECTED] wrote: http://bugzilla.kernel.org/show_bug.cgi?id=2645#c40 Update file times at write references to memory-mapped files. Force file times update at the next

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

2008-01-21 Thread Jesper Juhl
On 22/01/2008, Anton Salikhmetov [EMAIL PROTECTED] wrote: 2008/1/22, Jesper Juhl [EMAIL PROTECTED]: Some very pedantic nitpicking below; On 22/01/2008, Anton Salikhmetov [EMAIL PROTECTED] wrote: ... + if (file (vma-vm_flags VM_SHARED)) { + if

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

2008-01-21 Thread Anton Salikhmetov
2008/1/22, Jesper Juhl [EMAIL PROTECTED]: On 22/01/2008, Anton Salikhmetov [EMAIL PROTECTED] wrote: 2008/1/22, Jesper Juhl [EMAIL PROTECTED]: Some very pedantic nitpicking below; On 22/01/2008, Anton Salikhmetov [EMAIL PROTECTED] wrote: ... + if (file (vma-vm_flags

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

2008-01-21 Thread Anton Salikhmetov
2008/1/22, Anton Salikhmetov [EMAIL PROTECTED]: 2008/1/22, Jesper Juhl [EMAIL PROTECTED]: Some very pedantic nitpicking below; On 22/01/2008, Anton Salikhmetov [EMAIL PROTECTED] wrote: http://bugzilla.kernel.org/show_bug.cgi?id=2645#c40 Update file times at write references to

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

2008-01-21 Thread Jesper Juhl
On 22/01/2008, Anton Salikhmetov [EMAIL PROTECTED] wrote: 2008/1/22, Anton Salikhmetov [EMAIL PROTECTED]: 2008/1/22, Jesper Juhl [EMAIL PROTECTED]: Some very pedantic nitpicking below; ... By the way, if we're talking pedantic, then: debian:/tmp$ cat c.c void f() { for

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

2008-01-21 Thread Linus Torvalds
On Tue, 22 Jan 2008, Anton Salikhmetov wrote: /* + * Scan the PTEs for pages belonging to the VMA and mark them read-only. + * It will force a pagefault on the next write access. + */ +static void vma_wrprotect(struct vm_area_struct *vma) +{ + unsigned long addr; + + for

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

2008-01-21 Thread Jesper Juhl
On 22/01/2008, Anton Salikhmetov [EMAIL PROTECTED] wrote: 2008/1/22, Jesper Juhl [EMAIL PROTECTED]: On 22/01/2008, Anton Salikhmetov [EMAIL PROTECTED] wrote: 2008/1/22, Jesper Juhl [EMAIL PROTECTED]: Some very pedantic nitpicking below; On 22/01/2008, Anton Salikhmetov [EMAIL

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

2008-01-21 Thread Anton Salikhmetov
2008/1/22, Linus Torvalds [EMAIL PROTECTED]: On Tue, 22 Jan 2008, Anton Salikhmetov wrote: /* + * Scan the PTEs for pages belonging to the VMA and mark them read-only. + * It will force a pagefault on the next write access. + */ +static void vma_wrprotect(struct vm_area_struct