From: Pavel Machek <pavel@suse.cz>
To: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
john@johnmccutchan.com, arnd@arndb.de, mtk.manpages@gmail.com,
hch@lst.de, rlove@rlove.org, linux-api@vger.kernel.org,
linux-kernel@vger.kernel.org, davidn@davidnewall.com,
Eric Paris <eparis@redhat.com>
Subject: Re: [take2] Inotify: nested attributes support.
Date: Thu, 4 Dec 2008 09:43:10 +0100 [thread overview]
Message-ID: <20081204084309.GA2072@elf.ucw.cz> (raw)
In-Reply-To: <20081126082936.GB17525@ioremap.net>
On Wed 2008-11-26 11:29:36, Evgeniy Polyakov wrote:
> On Wed, Nov 26, 2008 at 12:15:38AM -0800, Andrew Morton (akpm@linux-foundation.org) wrote:
> > OK, so we have a super-duper framework which will allow us to add pids
> > (and other things) to inotify messages.
>
> Yup :)
>
> > This still doesn't provide a reason for anyone to be interested in the
> > code! Why do we want pids in inotify messages?
>
> I actually cared only about myself :)
> I started the thread and implementation, because my application has to
> differentiate IO made by itself and any IO made by system (another
> users, crons, whatever else), inotify did not give me that info, so I
> extended it. As of others: PID/TID may be used by watching applications
> to reduce own load to not process own IO, things like beagle may show
> who actually made changes into the file.
Actually, does the kernel even know who initiated the i/o?
Take two threads, both mapping /etc/something , both of them writing
through the mmap. Kernel sees dirty pages so it writes them back, but
which thread is repsonsible for the write?
> > And how does this work give that pids are (no longer) system-wide unique?
>
> It gets pids from the caller's task_struct (via current), so its data is
> as unique as process calling getpid() or syscall(__NR_gettid).
What happens on mmap()?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2008-12-04 8:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-25 19:42 [take2] Inotify: nested attributes support Evgeniy Polyakov
2008-11-25 19:44 ` [take2] Inotify: nested attributes test application Evgeniy Polyakov
2008-11-26 0:24 ` [take2] Inotify: nested attributes support Andrew Morton
2008-11-26 7:42 ` Evgeniy Polyakov
2008-11-26 8:15 ` Andrew Morton
2008-11-26 8:29 ` Evgeniy Polyakov
2008-11-26 8:38 ` Andrew Morton
2008-11-26 8:46 ` Evgeniy Polyakov
2008-11-26 12:47 ` David Newall
2008-11-26 12:51 ` Evgeniy Polyakov
2008-11-26 13:03 ` David Newall
2008-11-26 13:15 ` Evgeniy Polyakov
2008-12-04 8:43 ` Pavel Machek [this message]
2008-12-04 9:09 ` Evgeniy Polyakov
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=20081204084309.GA2072@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=davidn@davidnewall.com \
--cc=eparis@redhat.com \
--cc=hch@lst.de \
--cc=john@johnmccutchan.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=rlove@rlove.org \
--cc=zbr@ioremap.net \
/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