From mboxrd@z Thu Jan 1 00:00:00 1970 From: Evgeniy Polyakov Subject: Re: [take2] Inotify: nested attributes support. Date: Thu, 4 Dec 2008 12:09:00 +0300 Message-ID: <20081204090900.GA4615@ioremap.net> References: <20081125194234.GA24449@ioremap.net> <20081125162434.4feacbbf.akpm@linux-foundation.org> <20081126074239.GA17525@ioremap.net> <20081126001538.4b1c7c99.akpm@linux-foundation.org> <20081126082936.GB17525@ioremap.net> <20081204084309.GA2072@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20081204084309.GA2072-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Pavel Machek Cc: Andrew Morton , john-jueV0HHMeujJJrXXpGQQMAC/G2K4zDHf@public.gmane.org, arnd-r2nGTMty4D4@public.gmane.org, mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, hch-jcswGhMUV9g@public.gmane.org, rlove-L7G0xEPcOZbYtjvyW6yDsg@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, davidn-KzQzY1MbaKjAHznzqCTclw@public.gmane.org, Eric Paris List-Id: linux-api@vger.kernel.org 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. > > > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756759AbYLDJJW (ORCPT ); Thu, 4 Dec 2008 04:09:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752536AbYLDJJG (ORCPT ); Thu, 4 Dec 2008 04:09:06 -0500 Received: from cs-studio.ru ([195.178.208.66]:55668 "EHLO tservice.net.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751428AbYLDJJD (ORCPT ); Thu, 4 Dec 2008 04:09:03 -0500 Date: Thu, 4 Dec 2008 12:09:00 +0300 From: Evgeniy Polyakov To: Pavel Machek Cc: Andrew Morton , 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 Subject: Re: [take2] Inotify: nested attributes support. Message-ID: <20081204090900.GA4615@ioremap.net> References: <20081125194234.GA24449@ioremap.net> <20081125162434.4feacbbf.akpm@linux-foundation.org> <20081126074239.GA17525@ioremap.net> <20081126001538.4b1c7c99.akpm@linux-foundation.org> <20081126082936.GB17525@ioremap.net> <20081204084309.GA2072@elf.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081204084309.GA2072@elf.ucw.cz> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 04, 2008 at 09:43:10AM +0100, Pavel Machek (pavel@suse.cz) 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. > > > 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