Thread (14 messages) 14 messages, 4 authors, 2008-12-04

Re: [take2] Inotify: nested attributes support.

flat view

From: Evgeniy Polyakov <hidden>
Date: 2008-12-04 09:09:22
Also in: lkml

On Thu, Dec 04, 2008 at 09:43:10AM +0100, Pavel Machek (pavel-AlSwsSmVLrQ@public.gmane.org) wrote:
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?
It depends. If write will be done with write() syscall, caller will be
stored. Otherwise inotify does not hook into page fault code afaics.
quoted
quoted
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()?
mmap() syscall is not processed by inotify.

-- 
	Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help