2008/1/25, Randy Dunlap <[EMAIL PROTECTED]>:
> On Wed, 23 Jan 2008 02:21:20 +0300 Anton Salikhmetov wrote:
>
> > Add a document, which describes how the POSIX requirements on updating
> > memory-mapped file times are addressed in Linux.
>
> Hi Anton,
>
2008/1/25, Randy Dunlap [EMAIL PROTECTED]:
On Wed, 23 Jan 2008 02:21:20 +0300 Anton Salikhmetov wrote:
Add a document, which describes how the POSIX requirements on updating
memory-mapped file times are addressed in Linux.
Hi Anton,
Just a few small comments below...
Signed-off
2008/1/23, Linus Torvalds <[EMAIL PROTECTED]>:
>
>
> On Wed, 23 Jan 2008, Anton Salikhmetov wrote:
> >
> > Update ctime and mtime for memory-mapped files at a write access on
> > a present, read-only PTE, as well as at a write on a non-present PTE.
>
2008/1/23, Linus Torvalds <[EMAIL PROTECTED]>:
>
>
> On Wed, 23 Jan 2008, Anton Salikhmetov wrote:
> > +
> > + if (pte_dirty(*pte) && pte_write(*pte)) {
>
> Not correct.
>
> You still need to check "pte_present()" before y
2008/1/23, Miklos Szeredi <[EMAIL PROTECTED]>:
> > > Also, it still doesn't make sense to me why we'd not need to walk the
> > > rmap, it is all the same file after all.
> >
> > It's the same file, but not the same memory map. It basically depends
> > on how you define msync:
> >
> > a) sync
2008/1/23, Peter Zijlstra <[EMAIL PROTECTED]>:
>
> On Wed, 2008-01-23 at 02:21 +0300, Anton Salikhmetov wrote:
>
> > +static void vma_wrprotect_pmd_range(struct vm_area_struct *vma, pmd_t *pmd,
> > + unsigned long start, unsigned long end)
> >
2008/1/23, Miklos Szeredi <[EMAIL PROTECTED]>:
> > Ah, OK, this is becuase mmap doesn't actually set up the page tables
> > by default. Try adding MAP_POPULATE to the flags.
>
> Here's an updated version of the program, with an added a '-r' option,
> that performs a read access on the mapping
ed file times are addressed in Linux.
> >
> > Signed-off-by: Anton Salikhmetov <[EMAIL PROTECTED]>
> > ---
> > Documentation/vm/00-INDEX |2 +
> > Documentation/vm/msync.txt | 117
> >
> > 2 files ch
.
Signed-off-by: Anton Salikhmetov [EMAIL PROTECTED]
---
Documentation/vm/00-INDEX |2 +
Documentation/vm/msync.txt | 117
2 files changed, 119 insertions(+), 0 deletions(-)
diff --git a/Documentation/vm/00-INDEX b/Documentation
2008/1/23, Miklos Szeredi [EMAIL PROTECTED]:
Ah, OK, this is becuase mmap doesn't actually set up the page tables
by default. Try adding MAP_POPULATE to the flags.
Here's an updated version of the program, with an added a '-r' option,
that performs a read access on the mapping before
2008/1/23, Peter Zijlstra [EMAIL PROTECTED]:
On Wed, 2008-01-23 at 02:21 +0300, Anton Salikhmetov wrote:
+static void vma_wrprotect_pmd_range(struct vm_area_struct *vma, pmd_t *pmd,
+ unsigned long start, unsigned long end)
+{
+ while (start end
2008/1/23, Miklos Szeredi [EMAIL PROTECTED]:
Also, it still doesn't make sense to me why we'd not need to walk the
rmap, it is all the same file after all.
It's the same file, but not the same memory map. It basically depends
on how you define msync:
a) sync _file_ on region
2008/1/23, Linus Torvalds [EMAIL PROTECTED]:
On Wed, 23 Jan 2008, Anton Salikhmetov wrote:
+
+ if (pte_dirty(*pte) pte_write(*pte)) {
Not correct.
You still need to check pte_present() before you can test any other
bits. For a non-present pte, none of the other bits
2008/1/23, Linus Torvalds [EMAIL PROTECTED]:
On Wed, 23 Jan 2008, Anton Salikhmetov wrote:
Update ctime and mtime for memory-mapped files at a write access on
a present, read-only PTE, as well as at a write on a non-present PTE.
Ok, this one I'm applying. I agree that it leaves MS_ASYNC
Use the PAGE_ALIGN() macro instead of "manual" alignment.
Improve readability of the loop, which traverses the process
memory regions. Make code more symmetric and possibly boost
performance on some RISC CPUs by moving variable assignments.
Signed-off-by: Anton Salikhmetov <[EM
Add a document, which describes how the POSIX requirements on updating
memory-mapped file times are addressed in Linux.
Signed-off-by: Anton Salikhmetov <[EMAIL PROTECTED]>
---
Documentation/vm/00-INDEX |2 +
Documentation/vm/msync.txt | 117 +
Update ctime and mtime for memory-mapped files at a write access on
a present, read-only PTE, as well as at a write on a non-present PTE.
Signed-off-by: Anton Salikhmetov <[EMAIL PROTECTED]>
---
mm/memory.c |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/mm/me
This is the eighth version of my solution for the bug #2645:
http://bugzilla.kernel.org/show_bug.cgi?id=2645
Since the previous version, the following has changed:
1) based on Linus' comment, a more efficient PTE walker implemented;
2) the design document added to the kernel documentation.
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/msync.c | 92 +--
1 files changed, 82 insertions(
Update ctime and mtime for memory-mapped files at a write access on
a present, read-only PTE, as well as at a write on a non-present PTE.
Signed-off-by: Anton Salikhmetov [EMAIL PROTECTED]
---
mm/memory.c |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/mm/memory.c b
This is the eighth version of my solution for the bug #2645:
http://bugzilla.kernel.org/show_bug.cgi?id=2645
Since the previous version, the following has changed:
1) based on Linus' comment, a more efficient PTE walker implemented;
2) the design document added to the kernel documentation.
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/msync.c | 92 +--
1 files changed, 82 insertions(+), 10 deletions
Use the PAGE_ALIGN() macro instead of manual alignment.
Improve readability of the loop, which traverses the process
memory regions. Make code more symmetric and possibly boost
performance on some RISC CPUs by moving variable assignments.
Signed-off-by: Anton Salikhmetov [EMAIL PROTECTED]
---
mm
Add a document, which describes how the POSIX requirements on updating
memory-mapped file times are addressed in Linux.
Signed-off-by: Anton Salikhmetov [EMAIL PROTECTED]
---
Documentation/vm/00-INDEX |2 +
Documentation/vm/msync.txt | 117
2
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.
> &g
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_b
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 2
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 me
2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>:
> On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote:
> > This is the seventh version of my solution for the bug #2645:
> >
> > http://bugzilla.kernel.org/show_bug.cgi?id=2645
> >
> > Since the previ
This is the seventh version of my solution for the bug #2645:
http://bugzilla.kernel.org/show_bug.cgi?id=2645
Since the previous version, the following has changed: based on
Linus' comment, SMP-safe PTE update implemented.
Discussions, which followed my past submissions, showed that it was
Use the PAGE_ALIGN() macro instead of "manual" alignment.
Improve readability of the loop, which traverses the process
memory regions. Make code more symmetric and possibly boost
performance on some RISC CPUs by moving variable assignments.
Signed-off-by: Anton Salikhmetov <[EM
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]>
-
2008/1/21, Peter Staubach <[EMAIL PROTECTED]>:
> Linus Torvalds wrote:
> > On Fri, 18 Jan 2008, Ingo Oeser wrote:
> >
> >> Can we get "if the write to the page hits the disk, the mtime has hit the
> >> disk
> >> already no less than SOME_GRANULARITY before"?
> >>
> >> That is very important for
2008/1/21, Peter Staubach [EMAIL PROTECTED]:
Linus Torvalds wrote:
On Fri, 18 Jan 2008, Ingo Oeser wrote:
Can we get if the write to the page hits the disk, the mtime has hit the
disk
already no less than SOME_GRANULARITY before?
That is very important for computer forensics. Esp.
This is the seventh version of my solution for the bug #2645:
http://bugzilla.kernel.org/show_bug.cgi?id=2645
Since the previous version, the following has changed: based on
Linus' comment, SMP-safe PTE update implemented.
Discussions, which followed my past submissions, showed that it was
Use the PAGE_ALIGN() macro instead of manual alignment.
Improve readability of the loop, which traverses the process
memory regions. Make code more symmetric and possibly boost
performance on some RISC CPUs by moving variable assignments.
Signed-off-by: Anton Salikhmetov [EMAIL PROTECTED]
---
mm
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
2008/1/22, Jesper Juhl [EMAIL PROTECTED]:
On 22/01/2008, Anton Salikhmetov [EMAIL PROTECTED] wrote:
This is the seventh version of my solution for the bug #2645:
http://bugzilla.kernel.org/show_bug.cgi?id=2645
Since the previous version, the following has changed: based on
Linus
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
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
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
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 *vma
2008/1/19, Linus Torvalds <[EMAIL PROTECTED]>:
>
>
> On Sat, 19 Jan 2008, Anton Salikhmetov wrote:
> >
> > The page_check_address() function is called from the
> > page_mkclean_one() routine as follows:
>
> .. and the page_mkclean_one() functio
2008/1/19, Linus Torvalds <[EMAIL PROTECTED]>:
>
>
> On Sat, 19 Jan 2008, Anton Salikhmetov wrote:
> >
> > Before using pte_wrprotect() the vma_wrprotect() routine uses the
> > pte_offset_map_lock() macro to get the PTE and to acquire the ptl
> > s
2008/1/18, Linus Torvalds <[EMAIL PROTECTED]>:
>
>
> On Fri, 18 Jan 2008, Anton Salikhmetov wrote:
> >
> > The current solution doesn't hit the performance at all when compared to
> > the competitor POSIX-compliant systems. It is faster and does even more
>
2008/1/18, Linus Torvalds <[EMAIL PROTECTED]>:
>
>
> On Fri, 18 Jan 2008, Miklos Szeredi wrote:
> >
> > What I'm saying is that the times could be left un-updated for a long
> > time if program doesn't do munmap() or msync(MS_SYNC) for a long time.
>
> Sure.
>
> But in those circumstances, the
2008/1/18, Miklos Szeredi <[EMAIL PROTECTED]>:
> > 4. Performance test was done using the program available from the
> > following link:
> >
> > http://bugzilla.kernel.org/attachment.cgi?id=14493
> >
> > Result: the impact of the changes was negligible for files of a few
> > hundred megabytes.
>
>
2008/1/18, Peter Zijlstra <[EMAIL PROTECTED]>:
>
> On Fri, 2008-01-18 at 11:15 +0100, Peter Zijlstra wrote:
> > On Fri, 2008-01-18 at 10:51 +0100, Miklos Szeredi wrote:
> >
> > > > diff --git a/mm/msync.c b/mm/msync.c
> > > > index a4de868..a49af28 100644
> > > > --- a/mm/msync.c
> > > > +++
2008/1/18, Miklos Szeredi <[EMAIL PROTECTED]>:
> > 4. Performance test was done using the program available from the
> > following link:
> >
> > http://bugzilla.kernel.org/attachment.cgi?id=14493
> >
> > Result: the impact of the changes was negligible for files of a few
> > hundred megabytes.
>
>
2008/1/18, Miklos Szeredi <[EMAIL PROTECTED]>:
> > unsigned long end;
> > - struct mm_struct *mm = current->mm;
> > + int error, unmapped_error;
> > struct vm_area_struct *vma;
> > - int unmapped_error = 0;
> > - int error = -EINVAL;
> > + struct mm_struct *mm;
> >
2008/1/18, Miklos Szeredi [EMAIL PROTECTED]:
4. Performance test was done using the program available from the
following link:
http://bugzilla.kernel.org/attachment.cgi?id=14493
Result: the impact of the changes was negligible for files of a few
hundred megabytes.
Could you also
2008/1/18, Miklos Szeredi [EMAIL PROTECTED]:
unsigned long end;
- struct mm_struct *mm = current-mm;
+ int error, unmapped_error;
struct vm_area_struct *vma;
- int unmapped_error = 0;
- int error = -EINVAL;
+ struct mm_struct *mm;
+ error =
2008/1/18, Peter Zijlstra [EMAIL PROTECTED]:
On Fri, 2008-01-18 at 11:15 +0100, Peter Zijlstra wrote:
On Fri, 2008-01-18 at 10:51 +0100, Miklos Szeredi wrote:
diff --git a/mm/msync.c b/mm/msync.c
index a4de868..a49af28 100644
--- a/mm/msync.c
+++ b/mm/msync.c
@@ -13,11
2008/1/19, Linus Torvalds [EMAIL PROTECTED]:
On Sat, 19 Jan 2008, Anton Salikhmetov wrote:
The page_check_address() function is called from the
page_mkclean_one() routine as follows:
.. and the page_mkclean_one() function is totally different.
Lookie here, this is the correct
2008/1/19, Linus Torvalds [EMAIL PROTECTED]:
On Sat, 19 Jan 2008, Anton Salikhmetov wrote:
Before using pte_wrprotect() the vma_wrprotect() routine uses the
pte_offset_map_lock() macro to get the PTE and to acquire the ptl
spinlock. Why did you say that this code was not SMP-safe
2008/1/18, Linus Torvalds [EMAIL PROTECTED]:
On Fri, 18 Jan 2008, Anton Salikhmetov wrote:
The current solution doesn't hit the performance at all when compared to
the competitor POSIX-compliant systems. It is faster and does even more
than the POSIX standard requires.
Your current
2008/1/18, Miklos Szeredi [EMAIL PROTECTED]:
4. Performance test was done using the program available from the
following link:
http://bugzilla.kernel.org/attachment.cgi?id=14493
Result: the impact of the changes was negligible for files of a few
hundred megabytes.
Could you also
2008/1/18, Linus Torvalds [EMAIL PROTECTED]:
On Fri, 18 Jan 2008, Miklos Szeredi wrote:
What I'm saying is that the times could be left un-updated for a long
time if program doesn't do munmap() or msync(MS_SYNC) for a long time.
Sure.
But in those circumstances, the programmer cannot
Updating file times at write references to memory-mapped files and
forcing 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 |6 ++
mm/msync.c
This is the sixth version of my solution for the bug #2645:
http://bugzilla.kernel.org/show_bug.cgi?id=2645
New since the previous version:
1) a few cosmetic changes according to the latest feedback
for the cleanup patch;
2) implementation of the following suggestion by Miklos Szeredi:
Using the PAGE_ALIGN() macro instead of "manual" alignment and
improved readability of the loop traversing the process memory regions.
Signed-off-by: Anton Salikhmetov <[EMAIL PROTECTED]>
---
mm/msync.c | 77
1 f
2008/1/17, Miklos Szeredi <[EMAIL PROTECTED]>:
> > The do_wp_page() function is called in mm/memory.c after locking PTE.
> > And the file_update_time() routine calls the filesystem operation that can
> > sleep. It's not accepted, I guess.
>
> do_wp_page() is called with the pte lock but drops it,
2008/1/17, Miklos Szeredi <[EMAIL PROTECTED]>:
> > > I'm not sure this auto-updating is really needed (POSIX doesn't
> > > mandate it).
> >
> > Peter Shtaubach, author of the first solution for this bug,
> > and Jacob Ostergaard, the reporter of this bug, insist the "auto-update"
> > feature to be
2008/1/17, Miklos Szeredi <[EMAIL PROTECTED]>:
> > 2008/1/17, Miklos Szeredi <[EMAIL PROTECTED]>:
> > > > > 4. Recording the time was the file data changed
> > > > >
> > > > > Finally, I noticed yet another issue with the previous version of my
> > > > > patch.
> > > > > Specifically, the time
2008/1/17, Rogier Wolff <[EMAIL PROTECTED]>:
> On Thu, Jan 17, 2008 at 04:16:47PM +0300, Anton Salikhmetov wrote:
> > 2008/1/17, Miklos Szeredi <[EMAIL PROTECTED]>:
> > > > > 4. Recording the time was the file data changed
> > > > >
> > >
2008/1/17, Miklos Szeredi <[EMAIL PROTECTED]>:
> > > 4. Recording the time was the file data changed
> > >
> > > Finally, I noticed yet another issue with the previous version of my
> > > patch.
> > > Specifically, the time stamps were set to the current time of the moment
> > > when syncing but
ality seems to be there now. As a next step, I think
> you should try to simplify the patch, removing everything, that is not
> strictly necessary.
>
> >
> > Signed-off-by: Anton Salikhmetov <[EMAIL PROTECTED]>
> > ---
> > fs
2008/1/17, Miklos Szeredi <[EMAIL PROTECTED]>:
> > Substantial code cleanup of the sys_msync() function:
> >
> > 1) using the PAGE_ALIGN() macro instead of "manual" alignment;
> > 2) improved readability of the loop traversing the process memory regions.
2008/1/17, Miklos Szeredi [EMAIL PROTECTED]:
Substantial code cleanup of the sys_msync() function:
1) using the PAGE_ALIGN() macro instead of manual alignment;
2) improved readability of the loop traversing the process memory regions.
Signed-off-by: Anton Salikhmetov [EMAIL PROTECTED
the patch, removing everything, that is not
strictly necessary.
Signed-off-by: Anton Salikhmetov [EMAIL PROTECTED]
---
fs/buffer.c |3 ++
fs/fs-writeback.c |2 +
fs/inode.c | 43 +++--
fs/sync.c |2
2008/1/17, Miklos Szeredi [EMAIL PROTECTED]:
2008/1/17, Miklos Szeredi [EMAIL PROTECTED]:
4. Recording the time was the file data changed
Finally, I noticed yet another issue with the previous version of my
patch.
Specifically, the time stamps were set to the current
2008/1/17, Miklos Szeredi [EMAIL PROTECTED]:
4. Recording the time was the file data changed
Finally, I noticed yet another issue with the previous version of my
patch.
Specifically, the time stamps were set to the current time of the moment
when syncing but not the write
2008/1/17, Miklos Szeredi [EMAIL PROTECTED]:
I'm not sure this auto-updating is really needed (POSIX doesn't
mandate it).
Peter Shtaubach, author of the first solution for this bug,
and Jacob Ostergaard, the reporter of this bug, insist the auto-update
feature to be implemented.
2008/1/17, Rogier Wolff [EMAIL PROTECTED]:
On Thu, Jan 17, 2008 at 04:16:47PM +0300, Anton Salikhmetov wrote:
2008/1/17, Miklos Szeredi [EMAIL PROTECTED]:
4. Recording the time was the file data changed
Finally, I noticed yet another issue with the previous version of my
2008/1/17, Miklos Szeredi [EMAIL PROTECTED]:
The do_wp_page() function is called in mm/memory.c after locking PTE.
And the file_update_time() routine calls the filesystem operation that can
sleep. It's not accepted, I guess.
do_wp_page() is called with the pte lock but drops it, so that's
This is the sixth version of my solution for the bug #2645:
http://bugzilla.kernel.org/show_bug.cgi?id=2645
New since the previous version:
1) a few cosmetic changes according to the latest feedback
for the cleanup patch;
2) implementation of the following suggestion by Miklos Szeredi:
Using the PAGE_ALIGN() macro instead of manual alignment and
improved readability of the loop traversing the process memory regions.
Signed-off-by: Anton Salikhmetov [EMAIL PROTECTED]
---
mm/msync.c | 77
1 files changed, 36
Updating file times at write references to memory-mapped files and
forcing 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 |6 ++
mm/msync.c | 52
and mtime when needed;
4) updating time stamps for mapped files in sys_msync() and do_fsync();
5) implementing lazy ctime and mtime update.
Signed-off-by: Anton Salikhmetov <[EMAIL PROTECTED]>
---
fs/buffer.c |3 ++
fs/fs-writeback.c |2 +
fs/inode.c
Substantial code cleanup of the sys_msync() function:
1) using the PAGE_ALIGN() macro instead of "manual" alignment;
2) improved readability of the loop traversing the process memory regions.
Signed-off-by: Anton Salikhmetov <[EMAIL PROTECTED]>
---
m
This is the fifth version of my solution for the bug #2645:
http://bugzilla.kernel.org/show_bug.cgi?id=2645
New since the previous version:
1) the case of retouching an already-dirty page pointed out
by Miklos Szeredi has been correctly addressed;
2) a few cosmetic changes according to the
2008/1/16, Rogier Wolff <[EMAIL PROTECTED]>:
>
> Hi,
>
> I wrote a small app yesterday that updates a file by mmapping the
> file (RW), changing the thing around, and then exiting.
>
> This did not trigger a change in the mtime of the file. Thus rsync
> didn't pick up that the file had changed.
>
2008/1/16, Rogier Wolff [EMAIL PROTECTED]:
Hi,
I wrote a small app yesterday that updates a file by mmapping the
file (RW), changing the thing around, and then exiting.
This did not trigger a change in the mtime of the file. Thus rsync
didn't pick up that the file had changed.
I
2008/1/15, Miklos Szeredi <[EMAIL PROTECTED]>:
> > 1. Introduction
> >
> > This is the fourth version of my solution for the bug #2645:
> >
> > http://bugzilla.kernel.org/show_bug.cgi?id=2645
> >
> > Changes since the previous version:
> >
> > 1) the case of retouching an already-dirty page
2008/1/15, Christoph Hellwig <[EMAIL PROTECTED]>:
> On Tue, Jan 15, 2008 at 08:28:48PM +0100, Peter Zijlstra wrote:
> > Notice that error is already -EINVAL, so a simple goto should suffice.
>
> Yes, for the start of the function you can basically leave it as-is.
>
OK, I will do as you suggest.
2008/1/15, Randy Dunlap <[EMAIL PROTECTED]>:
> On Tue, 15 Jan 2008 22:02:54 +0300 Anton Salikhmetov wrote:
>
> > 2008/1/15, Christoph Hellwig <[EMAIL PROTECTED]>:
> > > On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote:
>
> > > &g
2008/1/15, Christoph Hellwig <[EMAIL PROTECTED]>:
> On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote:
> > +++ b/mm/msync.c
> > @@ -1,24 +1,25 @@
> > /*
> > * linux/mm/msync.c
> > *
> > + * The msync() system call.
&g
2008/1/15, Christoph Hellwig <[EMAIL PROTECTED]>:
> On Tue, Jan 15, 2008 at 07:02:45PM +0300, Anton Salikhmetov wrote:
> > +/*
> > + * Update the ctime and mtime stamps for memory-mapped block device files.
> > + */
> > +static void bd_inode_update_time(struct
2008/1/15, Peter Zijlstra <[EMAIL PROTECTED]>:
>
> On Tue, 2008-01-15 at 19:02 +0300, Anton Salikhmetov wrote:
>
> > diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> > index 3d3848f..53d0e34 100644
> > --- a/mm/page-writeback.c
> > +++ b/mm/page-wr
1. Introduction
This is the fourth version of my solution for the bug #2645:
http://bugzilla.kernel.org/show_bug.cgi?id=2645
Changes since the previous version:
1) the case of retouching an already-dirty page pointed out
by Miklos Szeredi has been addressed;
2) the file metadata are updated
Substantial code cleanup of the sys_msync() function:
1) using the PAGE_ALIGN() macro instead of "manual" alignment;
2) improved readability of the loop traversing the process memory regions.
Signed-off-by: Anton Salikhmetov <[EMAIL PROTECTED]>
---
m
9 Linus Torvalds
*
* Massive code cleanup.
+ * Updating the ctime and mtime stamps for memory-mapped files.
* Copyright (C) 2008 Anton Salikhmetov <[EMAIL PROTECTED]>
*/
@@ -22,6 +23,10 @@
* Nor does it mark the relevant pages dirty (it used to up to 2.6.17).
* Now it doesn't d
2008/1/15, Miklos Szeredi <[EMAIL PROTECTED]>:
> > Thanks for your review, Peter and Miklos!
> >
> > I overlooked this case when AS_MCTIME flag has been turned off and the
> > page is still dirty.
> >
> > On the other hand, the words "shall be marked for update" may be
> > considered as just
2008/1/15, Miklos Szeredi [EMAIL PROTECTED]:
Thanks for your review, Peter and Miklos!
I overlooked this case when AS_MCTIME flag has been turned off and the
page is still dirty.
On the other hand, the words shall be marked for update may be
considered as just setting the AS_MCTIME
cleanup.
+ * Updating the ctime and mtime stamps for memory-mapped files.
* Copyright (C) 2008 Anton Salikhmetov [EMAIL PROTECTED]
*/
@@ -22,6 +23,10 @@
* Nor does it mark the relevant pages dirty (it used to up to 2.6.17).
* Now it doesn't do anything, since dirty pages are properly tracked
1. Introduction
This is the fourth version of my solution for the bug #2645:
http://bugzilla.kernel.org/show_bug.cgi?id=2645
Changes since the previous version:
1) the case of retouching an already-dirty page pointed out
by Miklos Szeredi has been addressed;
2) the file metadata are updated
Substantial code cleanup of the sys_msync() function:
1) using the PAGE_ALIGN() macro instead of manual alignment;
2) improved readability of the loop traversing the process memory regions.
Signed-off-by: Anton Salikhmetov [EMAIL PROTECTED]
---
mm/msync.c | 79
2008/1/15, Peter Zijlstra [EMAIL PROTECTED]:
On Tue, 2008-01-15 at 19:02 +0300, Anton Salikhmetov wrote:
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 3d3848f..53d0e34 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -997,35 +997,39 @@ int
2008/1/15, Christoph Hellwig [EMAIL PROTECTED]:
On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote:
+++ b/mm/msync.c
@@ -1,24 +1,25 @@
/*
* linux/mm/msync.c
*
+ * The msync() system call.
* Copyright (C) 1994-1999 Linus Torvalds
+ *
+ * Massive code
2008/1/15, Christoph Hellwig [EMAIL PROTECTED]:
On Tue, Jan 15, 2008 at 07:02:45PM +0300, Anton Salikhmetov wrote:
+/*
+ * Update the ctime and mtime stamps for memory-mapped block device files.
+ */
+static void bd_inode_update_time(struct inode *inode, struct timespec *ts
1 - 100 of 166 matches
Mail list logo