From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Mauricio Lin <mauriciolin@gmail.com>
Cc: David Miller <davem@davemloft.net>,
Ulrich Drepper <drepper@redhat.com>,
Andrew Morton <akpm@osdl.org>, netdev <netdev@vger.kernel.org>,
Zach Brown <zach.brown@oracle.com>,
Christoph Hellwig <hch@infradead.org>,
Chase Venters <chase.venters@clientec.com>,
Johann Borck <johann.borck@densedata.com>,
linux-kernel@vger.kernel.org, Jeff Garzik <jeff@garzik.org>
Subject: Re: [take26-resend1 7/8] kevent: Signal notifications.
Date: Tue, 12 Dec 2006 08:45:28 +0300 [thread overview]
Message-ID: <20061212054526.GD14420@2ka.mipt.ru> (raw)
In-Reply-To: <3f250c710612110832i337470cyc1fe0805a8aba2e6@mail.gmail.com>
On Mon, Dec 11, 2006 at 12:32:55PM -0400, Mauricio Lin (mauriciolin@gmail.com) wrote:
> Hi Evgeniy,
Hi Mauricio.
> I have used kobject_uevent() to notify userspace about some events.
> For instance, when memory comsumption reaches a predefined watermark,
> a signal is sent to userspace to allow applications to free resources.
> But I am not sure if kobject_uevent() is the more appropriate way for
> that since if I have many different levels of notifications (using
> kobject_uevent()) from kernel space to user space, so how the
> application could know or differentiate from which level of kernel
> notification the signal was sent from?
>
> The application should perform a specific task according to different
> type of received notification. So I do not know if the current kernel
> provides something like that. Do you know any current kernel (2.6.19)
> implementation for that?
>
> After reading about your Kevent implementation, I guess that your
> patches are able to do what I need, right? Will it be included in the
> mainline kernel? Do you have examples about how can I use your socket
> and/or signal notifications to establish kernel and user space
> communication?
I do not know if it will be included or not, but would like to hear an
opinion of people added to Cc: list on that point.
I have a lot of examples from trivial applications to real-world web
server patched with kevent support. Although some applications might not
compile with the latest kevent sources due to interface parameters
changes, it is easily fixable looking into other examples.
According to your task - yes, it can be done through kevent - you need
to create own kevent subsystem if you plan to use something special,
register it with kevent and start commiting events.
But it is easier to use different notification mechanisms for that task:
I suggest using netlink based connector, gennetlink or kobject_uevent,
although the latter is not the best choice definitely, and create own
protocol embedded into that transports.
> BR,
>
> Mauricio Lin.
--
Evgeniy Polyakov
next prev parent reply other threads:[~2006-12-12 5:46 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2154985aa0591036@2ka.mipt.ru>
2006-12-11 14:50 ` [take26-resend1 0/8] kevent: Generic event handling mechanism Evgeniy Polyakov
2006-12-11 14:50 ` [take26-resend1 1/8] kevent: Description Evgeniy Polyakov
2006-12-11 14:50 ` [take26-resend1 2/8] kevent: Core files Evgeniy Polyakov
2006-12-11 14:50 ` [take26-resend1 3/8] kevent: poll/select() notifications Evgeniy Polyakov
2006-12-11 14:50 ` [take26-resend1 4/8] kevent: Socket notifications Evgeniy Polyakov
2006-12-11 14:50 ` [take26-resend1 5/8] kevent: Timer notifications Evgeniy Polyakov
2006-12-11 14:50 ` [take26-resend1 6/8] kevent: Pipe notifications Evgeniy Polyakov
2006-12-11 14:50 ` [take26-resend1 7/8] kevent: Signal notifications Evgeniy Polyakov
2006-12-11 14:50 ` [take26-resend1 8/8] kevent: Kevent posix timer notifications Evgeniy Polyakov
2006-12-11 16:32 ` [take26-resend1 7/8] kevent: Signal notifications Mauricio Lin
2006-12-12 5:45 ` Evgeniy Polyakov [this message]
2006-12-11 15:16 ` [take26-resend1 0/8] kevent: Generic event handling mechanism Jeff Garzik
2006-12-12 5:39 ` Evgeniy Polyakov
2006-12-12 13:39 ` Jeff Garzik
2006-12-12 7:03 ` [take27 " Evgeniy Polyakov
2006-12-12 7:03 ` [take27 1/8] kevent: Description Evgeniy Polyakov
2006-12-12 7:03 ` [take27 2/8] kevent: Core files Evgeniy Polyakov
2006-12-12 7:03 ` [take27 3/8] kevent: poll/select() notifications Evgeniy Polyakov
2006-12-12 7:03 ` [take27 4/8] kevent: Socket notifications Evgeniy Polyakov
2006-12-12 7:03 ` [take27 5/8] kevent: Timer notifications Evgeniy Polyakov
2006-12-12 7:03 ` [take27 6/8] kevent: Pipe notifications Evgeniy Polyakov
2006-12-12 7:03 ` [take27 7/8] kevent: Signal notifications Evgeniy Polyakov
2006-12-12 7:03 ` [take27 8/8] kevent: Kevent posix timer notifications Evgeniy Polyakov
2006-12-14 7:12 ` [take28 0/8] kevent: Generic event handling mechanism Evgeniy Polyakov
2006-12-14 7:12 ` [take28 1/8] kevent: Description Evgeniy Polyakov
2006-12-14 7:12 ` [take28 2/8] kevent: Core files Evgeniy Polyakov
2006-12-14 7:12 ` [take28 3/8] kevent: poll/select() notifications Evgeniy Polyakov
2006-12-14 7:12 ` [take28 4/8] kevent: Socket notifications Evgeniy Polyakov
2006-12-14 7:12 ` [take28 5/8] kevent: Timer notifications Evgeniy Polyakov
2006-12-14 7:12 ` [take28 6/8] kevent: Pipe notifications Evgeniy Polyakov
2006-12-14 7:12 ` [take28 7/8] kevent: Signal notifications Evgeniy Polyakov
2006-12-14 7:12 ` [take28 8/8] kevent: Kevent posix timer notifications 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=20061212054526.GD14420@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=akpm@osdl.org \
--cc=chase.venters@clientec.com \
--cc=davem@davemloft.net \
--cc=drepper@redhat.com \
--cc=hch@infradead.org \
--cc=jeff@garzik.org \
--cc=johann.borck@densedata.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mauriciolin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=zach.brown@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).