From: Arjan van de Ven <arjan@infradead.org>
To: Theodore Tso <tytso@mit.edu>
Cc: Ingo Molnar <mingo@elte.hu>, Jeff Garzik <jeff@garzik.org>,
Wu Fengguang <fengguang.wu@intel.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>,
Al Viro <viro@ZenIV.linux.org.uk>,
Frederic Weisbecker <fweisbec@gmail.com>,
auke-jan.h.kok@intel.com
Subject: Re: [PATCH] vfs: Add a trace point in the mark_inode_dirty function
Date: Wed, 11 Nov 2009 18:15:29 -0800 [thread overview]
Message-ID: <20091111181529.64ff5d1d@infradead.org> (raw)
In-Reply-To: <20091111182925.GH13262@mit.edu>
On Wed, 11 Nov 2009 13:29:25 -0500
Theodore Tso <tytso@mit.edu> wrote:
> If you really want to avoid that, one relatively lightweight thing we
> could do, which would avoid needing to dump the entire pathname out,
> would be to print out the triple (devno, dir_ino, file_ino), and then
> provide a privileged syscall which translates this to a user-visible
> pathname. It won't be necessarily the pathname which the user used to
> open the file (since there might be links, and bind mounts, et. al),
> but if the goal is to give one of the user-friendly names of the inode
> (as opposed to _the_ pathname used to open the file), it's quite
> sufficient.
here's the problem. PowerTOP wants to tell you "application FOO caused
the disk to spin up. BAD APPLICATION." And then give a suggestion as to
which file in question was involved, to give the developer a hint as to
what to fix. Oh and this has to be done 30 seconds after the actual
dirty happened of course (since clearly we don't want to wake a cpu up
or interfere with the running system).
What the patch does is perfectly fine for that. Your "solution" to get a
filename 30 seconds later with debugfs involves spinning up the disk...
... exactly the kind of thing this trace point wants to avoid in the
first place!
(and for those who say "yeah but the file may have been renamed". I
don't care! I want to show the filename that the app dirtied! Not what
name that file is right now, 30 seconds later. At least, I want to show
enough so that the developer of the app knows how to fix his pile of
power-eating-dung.
Fixing an OS this way (and yes I have used this patch to fix Moblin and
other partner linux OSes) saves around 0.5 Watts or so. Quite worth it
in terms of battery life.
I would like to turn this around: The current patch is sufficient for my
real-world usecase. I am still looking for the "other" mythical usecase
that would need an inode number instead.... lets put it this way: if
one of those comes around it's trivial to extend the trace data in an
ABI compatible way to include that. Until then.. it's just bloat.
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
next prev parent reply other threads:[~2009-11-12 2:14 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-26 5:53 [PATCH] vfs: Add a trace point in the mark_inode_dirty function Arjan van de Ven
2009-10-26 6:03 ` Andrew Morton
2009-10-26 6:55 ` Arjan van de Ven
2009-10-27 16:01 ` Jason Baron
2009-11-11 2:01 ` Wu Fengguang
2009-11-11 6:34 ` Arjan van de Ven
2009-11-11 6:40 ` Wu Fengguang
2009-11-11 7:42 ` Jeff Garzik
2009-11-11 7:45 ` Ingo Molnar
2009-11-11 7:56 ` Jeff Garzik
2009-11-11 11:15 ` Ingo Molnar
2009-11-11 17:27 ` Kok, Auke
2009-11-11 18:29 ` Theodore Tso
2009-11-11 18:56 ` Ingo Molnar
2009-11-12 2:15 ` Arjan van de Ven [this message]
2009-11-11 16:19 ` Arjan van de Ven
2009-11-11 23:10 ` Frank Ch. Eigler
2009-11-11 23:37 ` Kok, Auke
2009-11-12 7:22 ` Ingo Molnar
2009-11-20 10:43 ` Christoph Hellwig
2009-11-20 10:51 ` Ingo Molnar
2009-11-20 14:45 ` Arjan van de Ven
2009-11-20 16:05 ` Jamie Lokier
2009-11-20 16:45 ` Arjan van de Ven
2009-11-11 2:33 ` Li Zefan
2009-11-15 19:00 ` Arjan van de Ven
2009-11-16 0:56 ` Li Zefan
-- strict thread matches above, loose matches on Subject: below --
2010-11-26 20:56 Arjan van de Ven
2010-11-28 17:52 ` Christoph Hellwig
2010-11-28 18:43 ` Arjan van de Ven
2010-11-29 1:41 ` KOSAKI Motohiro
2010-11-29 4:54 ` Arjan van de Ven
2010-11-29 5:15 ` KOSAKI Motohiro
2010-11-29 14:21 ` Steven Rostedt
2010-11-29 14:41 ` Mathieu Desnoyers
2010-11-29 16:31 ` Steven Rostedt
2010-11-30 0:37 ` KOSAKI Motohiro
2010-11-29 3:53 ` Nick Piggin
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=20091111181529.64ff5d1d@infradead.org \
--to=arjan@infradead.org \
--cc=auke-jan.h.kok@intel.com \
--cc=fengguang.wu@intel.com \
--cc=fweisbec@gmail.com \
--cc=hch@infradead.org \
--cc=jeff@garzik.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tytso@mit.edu \
--cc=viro@ZenIV.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).