All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Hugh Dickins <hugh@veritas.com>
Cc: Peter Staubach <staubach@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] memory mapped files not updating timestamps
Date: Thu, 18 May 2006 12:52:22 +0200	[thread overview]
Message-ID: <1147949542.21805.4.camel@lappy> (raw)
In-Reply-To: <Pine.LNX.4.64.0605171954010.16979@blonde.wat.veritas.com>

On Wed, 2006-05-17 at 20:24 +0100, Hugh Dickins wrote:
> On Wed, 17 May 2006, Peter Staubach wrote:

> > The changes add support to detect when the modification time needs to be
> > updated by placing a hook in __set_pages_dirty_buffers and
> > __set_pages_dirty_nobuffers.  One of these two routines will be invoked
> > when the dirty bit is detected in the pte.  The hook sets a new bit in the
> > address_space mapping struct indicating that the file which is associated
> > with that part of the address space needs to have its modification and
> > change time attributes updated.
> 
> You're adding a little overhead to every set_page_dirty, when the vast
> majority (ordinary writes) don't need it: their mctime update is already
> well taken care of.  (Or should we be deleting the code that does that?
> I think I'd rather not dare.)

It would make the code more symetric.

> I think you'd do better to target those places where set_page_dirty is
> called on a mapped page - and do the file_update_time at that point -
> or as near to that point as is sensible/permitted given the locking
> (vma->vm_file gives you the file without needing inode_update_time).

> Peter Zijlstra has patches relating to dirty mmaps in the -mm tree
> at present: I need to take a look at those, and I'll see if it would
> make sense to factor in this mctime issue on top of those - you may
> want to do the same.

Look for the callsites of set_page_dirty_balance(), those two points are
where writable file pages are dirtied.

PeterZ


  reply	other threads:[~2006-05-18 10:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-17 15:16 [PATCH] memory mapped files not updating timestamps Peter Staubach
2006-05-17 19:24 ` Hugh Dickins
2006-05-18 10:52   ` Peter Zijlstra [this message]
2006-05-18 22:13     ` Peter Staubach
2006-05-31 17:53 ` Peter Staubach
2006-05-31 19:38   ` Eric Dumazet
2006-05-31 20:38     ` Peter Staubach
2006-06-19  4:33   ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1147949542.21805.4.camel@lappy \
    --to=a.p.zijlstra@chello.nl \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=staubach@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.