[PATCH] Fix issue 1719, inotify dirstate when dirty (v2: improved matching + extended test)

Simon Heimberg simohe at besonet.ch
Mon Aug 17 02:19:35 CDT 2009


Hello Benoit

Nicolas rejected to "disable" inotify when the dirstate is dirty. (This
was my first fix, a one line patch.)

The bug is currently only triggered with mq (inside of repo.commit). But
I did not check all extensions, especially not the external ones. And I
do not know the feature development.

How can I do benchmarking? There is not perfqpu command in perf.py.
I created a mq patch containing revisions 59bb11a97fe5 to f7c334e810c2
of hg crew. Then I executed "time hg qpu". The results are below. Almost
the same. How can I do better benchmarking?

Inotify enabled:
1.24user 0.22system 0:02.23elapsed 66%CPU (0avgtext+0avgdata
0maxresident)k
208inputs+8560outputs (0major+8887minor)pagefaults 0swaps

Inotify disabled:
1.25user 0.24system 0:01.73elapsed 86%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+7784outputs (0major+8954minor)pagefaults 0swaps

Greetings,
Simon

Am Sonntag, den 16.08.2009, 16:32 +0200 schrieb Benoit Boissinot:
> On Sat, Aug 15, 2009 at 11:50 PM, Simon Heimberg<simohe at besonet.ch> wrote:
> > # HG changeset patch
> > # User Simon Heimberg <simohe at besonet.ch>
> > # Date 1250372350 -7200
> > # Node ID 68874a314191de4a27fbf817fc857d5770a62932
> > # Parent  bde485306b9dd5c8ea8fd9ee939d8879833689d6
> > inotify: when dirstate is dirty, force local state (fix issue1719)
> >
> > The inotify server always returns the dirstate from disc. When the dirstate
> > is modified but not yet written to disc, this is the wrong state. The client
> > fixes the inconsistent states.
> 
> Do we know if this bug is triggered outside of mq? And does it happen with
> one of the "restricted" mq call to status() where it only cares about a small
> subset of the repo?
> 
> Because then it might not be worth adding more complexity, and we could
> juste call super.status() instead. So it would be really great to have some
> benchmarks to see if there's a difference (qpushing a really big mq for
> example, after checking it actually exercises this part of the code).
> 
> regards,
> 
> Benoit


More information about the Mercurial-devel mailing list