From: jamal <hadi@cyberus.ca>
To: Eric Paris <eparis@redhat.com>
Cc: David Miller <davem@davemloft.net>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
netdev@vger.kernel.org, viro@zeniv.linux.org.uk,
alan@linux.intel.com, hch@infradead.org, balbir@in.ibm.com
Subject: Re: [PATCH 1/8] networking/fanotify: declare fanotify socket numbers
Date: Fri, 11 Sep 2009 17:21:42 -0400 [thread overview]
Message-ID: <1252704102.25158.36.camel@dogo.mojatatu.com> (raw)
In-Reply-To: <1252697613.2305.38.camel@dhcp231-106.rdu.redhat.com>
On Fri, 2009-09-11 at 15:33 -0400, Eric Paris wrote:
>
> I'm willing to try to make this happen, I'm just sure I see the benefit
> and I don't know anyone who knows the net/netlink code well enough who
> owuld be interested to help.....
>
I can help you on the netlink side but maybe we need to define the
problem scope properly first. I dont know anything about fanotify, but
i then dont need to. Can I re-phrase your problem as follows:
You have kernel code which wishes to communicate information to multiple
listeners in user space. The listeners register some form of filter
(that you term as a monitor) for an object of interest. For a specific
filter you wish to send them events when something happens to
the object they registered for.
Would the above be accurate?
One good place to start is the taskstats code in linux. Look at
Documentation/accounting in the kernel code. Ive also CCed Balbir who
was involved in that work since i think it bears similarity to what you
are trying to achieve conceptually.
To your other statements:
0) A single skb can be used to send to all the listners..
1) Netlink messages wont get lost unless the listener is not keeping up
and the kernel sending it messages ends up filling its queues. In such a
case your event message will be delivered to the 49 other users but
not the overloaded one. You can add sequence numbers to the event
messages you send to the listeners and any gaps in sequences on received
events imply lost events. You can add a mechanism to query your user
space kernel when something like that gets lost.
2) Your architecture has to take care of maintaining the state of what
you want to deliver. So your editing has nothing to do with skbs.
i.e an event happens, you update your state. If you need to send the
event to the listeners, you alloc an skb - populate it with the info;
multicast it to all the listeners. If something else happens, i would
suggest for sake of simplicity you rinse and repeat. Sure, the listener
may get contradicting events - but they should be able to handle it.
I hope this helps...
cheers,
jamal
next prev parent reply other threads:[~2009-09-11 21:24 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 5:25 Eric Paris
2009-09-11 5:26 ` [PATCH 2/8] vfs: introduce FMODE_NONOTIFY Eric Paris
2009-09-11 5:26 ` [PATCH 3/8] fanotify: fscking all notification system Eric Paris
2009-09-11 5:26 ` [PATCH 4/8] fanotify:drop notification if they exist in the outgoing queue Eric Paris
2009-09-11 5:26 ` [PATCH 5/8] fanotify: merge notification events with different masks Eric Paris
2009-09-11 5:26 ` [PATCH 6/8] fanotify: userspace socket Eric Paris
2009-09-11 5:26 ` [PATCH 7/8] fanotify: userspace can add and remove fsnotify inode marks Eric Paris
2009-09-11 5:26 ` [PATCH 8/8] fanotify: send events to userspace over socket reads Eric Paris
2009-09-11 14:08 ` Daniel Walker
2009-09-11 14:15 ` Eric Paris
2009-09-11 14:22 ` Daniel Walker
2009-09-11 14:32 ` Daniel Walker
2009-09-11 14:32 ` [PATCH 1/8] networking/fanotify: declare fanotify socket numbers Andreas Gruenbacher
2009-09-11 16:04 ` Eric Paris
2009-09-11 18:46 ` David Miller
2009-09-11 19:33 ` Eric Paris
2009-09-11 20:46 ` Jamie Lokier
2009-09-11 21:13 ` Eric Paris
2009-09-11 21:27 ` Jamie Lokier
2009-09-11 21:51 ` Eric Paris
2009-09-12 9:41 ` Evgeniy Polyakov
2009-09-14 0:17 ` Jamie Lokier
2009-09-14 14:07 ` Evgeniy Polyakov
2009-09-14 19:08 ` fanotify as syscalls Eric Paris
2009-09-15 20:16 ` Evgeniy Polyakov
2009-09-15 21:54 ` Eric Paris
2009-09-15 23:49 ` Linus Torvalds
2009-09-16 1:26 ` Eric Paris
2009-09-16 7:52 ` Jamie Lokier
2009-09-16 9:48 ` Eric Paris
2009-09-16 12:17 ` Jamie Lokier
2009-09-17 20:07 ` Andreas Gruenbacher
2009-09-18 20:52 ` Eric Paris
2009-09-18 22:00 ` Andreas Gruenbacher
2009-09-19 3:04 ` Eric Paris
2009-09-21 20:04 ` Andreas Gruenbacher
2009-09-21 20:28 ` Jamie Lokier
2009-09-21 21:27 ` Andreas Gruenbacher
2009-09-21 22:00 ` Jamie Lokier
2009-09-21 23:09 ` Andreas Gruenbacher
2009-09-21 23:56 ` Jamie Lokier
2009-09-21 22:18 ` Davide Libenzi
2009-09-21 23:12 ` Jamie Lokier
2009-09-22 14:51 ` Davide Libenzi
2009-09-22 15:31 ` Andreas Gruenbacher
2009-09-22 16:04 ` Davide Libenzi
2009-09-23 8:39 ` Tvrtko Ursulin
2009-09-23 11:20 ` hch
2009-09-23 15:35 ` Davide Libenzi
2009-09-23 21:58 ` hch
2009-09-23 11:32 ` Arjan van de Ven
2009-09-23 15:42 ` Tvrtko Ursulin
2009-09-23 15:51 ` Eric Paris
2009-09-23 21:56 ` hch
2009-09-23 15:26 ` Davide Libenzi
2009-09-23 15:45 ` Tvrtko Ursulin
2009-09-23 17:31 ` Davide Libenzi
2009-09-22 16:11 ` Eric Paris
2009-09-22 16:27 ` Jamie Lokier
2009-09-22 23:43 ` Davide Libenzi
2009-09-22 21:06 ` Eric Paris
2009-09-22 21:38 ` Andreas Gruenbacher
2009-09-16 10:41 ` Alan Cox
2009-09-16 11:41 ` Jamie Lokier
2009-09-16 12:01 ` Alan Cox
2009-09-16 12:56 ` Jamie Lokier
2009-09-16 15:53 ` Eric Paris
2009-09-16 21:49 ` Jamie Lokier
2009-09-16 22:33 ` Eric Paris
2009-09-16 11:30 ` Arnd Bergmann
2009-09-16 12:05 ` Evgeniy Polyakov
2009-09-16 12:27 ` Jamie Lokier
2009-09-17 16:40 ` Linus Torvalds
2009-09-17 17:35 ` Arjan van de Ven
2009-09-17 18:53 ` Eric Paris
2009-09-22 0:15 ` Eric W. Biederman
2009-09-22 0:22 ` Randy Dunlap
2009-09-11 21:21 ` jamal [this message]
2009-09-11 21:42 ` [PATCH 1/8] networking/fanotify: declare fanotify socket numbers Jamie Lokier
2009-09-11 22:52 ` jamal
2009-09-14 0:03 ` Jamie Lokier
2009-09-14 1:26 ` Eric Paris
2009-09-14 13:15 ` jamal
2009-09-12 9:47 ` 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=1252704102.25158.36.camel@dogo.mojatatu.com \
--to=hadi@cyberus.ca \
--cc=alan@linux.intel.com \
--cc=balbir@in.ibm.com \
--cc=davem@davemloft.net \
--cc=eparis@redhat.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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
all inboxes | Powered by JetHome®