| To: | hadi@xxxxxxxxxx |
|---|---|
| Subject: | Re: [RFC, PATCH] netlink based mq_notify(SIGEV_THREAD) |
| From: | Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> |
| Date: | Sat, 03 Apr 2004 22:43:39 +0200 |
| Cc: | netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Michal Wronski <wrona@xxxxxxxxxxxxxxxx>, Krzysztof Benedyczak <golbi@xxxxxxxxxxxxxxxx> |
| In-reply-to: | <1081023487.2037.19.camel@jzny.localdomain> |
| References: | <406F13A1.4030201@colorfullife.com> <1081023487.2037.19.camel@jzny.localdomain> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.4.1) Gecko/20031114 |
jamal wrote: On Sat, 2004-04-03 at 14:42, Manfred Spraul wrote: No - this part is wrong. - something (in glibc/userspace??) is signalled by the kernel to do This is correct. mq_notify is a function from the posix message queue interface: It allows user space to request that a notification should be sent if a new message is waiting in the message queue. There are two options for the notification: a signal or a callback that should be called in the context of a new thread. Signals are trivial, but calling a function in the context of a new thread is tricky: the kernel can't create new user space threads. Thus the kernel interface for mq_notify with sigev_notify==SIGEV_THREAD is an asynchroneous interface: the initial syscall just registers something and if a message arrives in the queue, then a notice is sent to user space. glibc must then create a SuS compatible interface on top of that. The problem is how should I sent the information that a message is waiting to user space? The current implementation in Andrew's -mm tree uses single shot file descriptor - it works, but it's resource hungry. Yes. then all events are unicast to this fd. I am assuming you dont need to Correct, always only one process interested in the notification. I'm looking for the simplest interface to send 32 byte cookies from kernel to user space. The final send must be non-blocking, setup can block. Someone recommended that I should look at netlink. netlink_unicast was nearly perfect, except that I had to split setup and sending into two functions.Attached is a new proposal: -- Manfred |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [RFC, PATCH] netlink based mq_notify(SIGEV_THREAD), jamal |
|---|---|
| Next by Date: | Re: [RFC, PATCH] netlink based mq_notify(SIGEV_THREAD), jamal |
| Previous by Thread: | Re: [RFC, PATCH] netlink based mq_notify(SIGEV_THREAD), jamal |
| Next by Thread: | Re: [RFC, PATCH] netlink based mq_notify(SIGEV_THREAD), jamal |
| Indexes: | [Date] [Thread] [Top] [All Lists] |