Re: Kevent EV_DROP notification support

2013-07-24 Thread Adrian Chadd
I now work at a place where I have to care about this. So, if someone provides me with a sane implementation and API description, I'll review and commit it. -adrian On 24 July 2013 09:48, Paul LeoNerd wrote: > Did we ever reach a consensus about this issue? We discussed it > somewhat and more

Kevent EV_DROP notification support

2013-07-24 Thread LeoNerd
Did we ever reach a consensus about this issue? We discussed it somewhat and more or less came to a conclusion that "yes this would be nice". Has anyone got as far as to step up and say they'll implement something yet? I have some good ideas on testing it and making use of it from userland, code a

Re: Managing userland data pointers in kqueue/kevent

2013-05-19 Thread Jilles Tjoelker
On Wed, May 15, 2013 at 01:34:58PM +0100, Paul LeoNerd Evans wrote: > On Wed, 15 May 2013 13:29:59 +0100 > Paul "LeoNerd" Evans wrote: > > Is that not the exact thing I suggested? > > The "extension to create register a kevent to catch these events" is >

Re: Managing userland data pointers in kqueue/kevent

2013-05-18 Thread Dirk Engling
g will cause the old event to be returned with the EV_DROPPED mechanism proposed. This can also be used to fulfill property (b). kqueue is an efficient store for the per-event-data. In an event base application, I usually allocate resources per new session, pass the metadata via udata to kevent an

Re: Managing userland data pointers in kqueue/kevent

2013-05-15 Thread LeoNerd
On Wed, 15 May 2013 13:29:59 +0100 Paul "LeoNerd" Evans wrote: > Is that not the exact thing I suggested? > > The "extension to create register a kevent to catch these events" is > that you put the EV_DROPWATCH bit flag in the event at the time you > register

Re: Managing userland data pointers in kqueue/kevent

2013-05-15 Thread LeoNerd
On Wed, 15 May 2013 02:14:55 -0400 Julian Elischer wrote: > I would suggest that one answer would be to create an extension to > register a > kevent to catch these events.. > > (the knote_drop()) > > The returned event could have all the appropriate information for the

Re: Managing userland data pointers in kqueue/kevent

2013-05-14 Thread Julian Elischer
ran into the problem needing EV_DROPWATCH/EV_DROPPED was because I was trying to fix Perl's IO::KQueue. IO::KQueue tries to wrap kqueue/kevent for Perl, allowing the userland Perl code to store an arbitrary Perl data pointer in the udata field. This data is reference-counted. Userland might let

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread LeoNerd
to the problem needing EV_DROPWATCH/EV_DROPPED was because I was trying to fix Perl's IO::KQueue. IO::KQueue tries to wrap kqueue/kevent for Perl, allowing the userland Perl code to store an arbitrary Perl data pointer in the udata field. This data is reference-counted. Userland might let the ke

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread LeoNerd
On Mon, 13 May 2013 11:10:44 -0700 Adrian Chadd wrote: > ... also, want to code up a test implementation? > > And some stress testing cases to throw in the regression tree? I already mostly fixed Perl's IO::KQueue wrapper to use this hypothetical feature, I can easily provide that somewhere for

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread Adrian Chadd
Just as a data point, I managed 50,000 + connections, at 5,000 + a second, doing a gigabit + of traffic, mid-2000s, with the userland management of all of the socket/disk FD stuff. The biggest overhead at the time was actually the read/write copyin/copyout, NOT the locking overhead of managing thi

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread Eugen-Andrei Gavriloaie
I also have a large project (crtmpserver) which makes heavy use of socket FDs (with my little Token workaround) and timers. Currently, can handle 2k streaming connections simultaneously, all of them full duplex. I would gladly patch it to use this new feature!!! -- Eugen-Andrei Gavriloaie

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread Eugen-Andrei Gavriloaie
es are re-used. Especially in MT environments. Imagine one >>>> kqueue call taking place in thread A and another one in thread B. Both >>>> threads waiting for events. >>> >>> .. so don't do that. I mean, you're already having to write your code &

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread Adrian Chadd
... also, want to code up a test implementation? And some stress testing cases to throw in the regression tree? I'll help shephard this in if this all works out. thanks, Adrian ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/ma

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread Adrian Chadd
On 13 May 2013 10:53, Paul LeoNerd wrote: > [I'm not currently on the list so please forgive the manually-crafted > reply] > >> I'm confused as to why this is still an issue. Sure, fix the kqueue >> semantics and do it in a way that doesn't break backwards >> compatibility. > > I suggested that. A

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread Adrian Chadd
go. The >>> FD values are re-used. Especially in MT environments. Imagine one kqueue >>> call taking place in thread A and another one in thread B. Both threads >>> waiting for events. >> >> .. so don't do that. I mean, you're already having to write

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread LeoNerd
[I'm not currently on the list so please forgive the manually-crafted reply] > I'm confused as to why this is still an issue. Sure, fix the kqueue > semantics and do it in a way that doesn't break backwards > compatibility. I suggested that. Add a user->kernel flag EV_DROPWATCH which, if pres

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread LeoNerd
On Mon, 13 May 2013 18:19:43 +0300 Eugen-Andrei Gavriloaie wrote: > I'm pretty sure this user data pointer is also breaking a well known > pointer management paradigm, but I just can't remember which. > Regardless, it has all the ingredients for memory leaks and/or, the > worst one, use of corpse

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread Eugen-Andrei Gavriloaie
r one in thread B. Both threads >> waiting for events. > > .. so don't do that. I mean, you're already having to write your code > to _not_ touch FDs in other threads. I've done this before, it isn't > that hard and it doesn't hurt performance. Why not? T

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread Adrian Chadd
... holy crap. On 13 May 2013 08:37, Eugen-Andrei Gavriloaie wrote: > Hi, > > Well, Paul already asked this question like 3-4 times now. Even insisting on > it. I will also ask it again: > If user code is responsible of tracking down the data associated with the > signalled entity, what is the

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread Eugen-Andrei Gavriloaie
Hi, Well, Paul already asked this question like 3-4 times now. Even insisting on it. I will also ask it again: If user code is responsible of tracking down the data associated with the signalled entity, what is the point of having user data? Is rendered completely useless… Not to mention, that

Re: Managing userland data pointers in kqueue/kevent

2013-05-13 Thread Adrian Chadd
... or you could just track the per-descriptor / per-object stuff in userland, and use the FD/signal as an index into the state you need. adding thread happiness on top of that is trivial. Done/done. Adrian On 13 May 2013 08:19, Eugen-Andrei Gavriloaie wrote: > Hello to all, > > I'm trying

Managing userland data pointers in kqueue/kevent

2013-05-13 Thread Eugen-Andrei Gavriloaie
Hello to all, I'm trying to reply to this thread: http://lists.freebsd.org/pipermail/freebsd-hackers/2010-November/033565.html I also faced this very difficult task of tracking down the user data registered into kq. I end up having some "Tokens" instances which I never deallocate but always re-

Re: [Kevent]

2012-05-25 Thread Rayson Ho
://www.scalablelogic.com/ On Fri, May 25, 2012 at 5:22 PM, enrico d'urso wrote: > > Hi, I'm Italian , so sorry for my bad English. > > I would understand something about Kevent function. > > Please, look this code: > > nev = kevent( kqueue_descr, events_list, how_many_target

[Kevent]

2012-05-25 Thread enrico d'urso
Hi, I'm Italian , so sorry for my bad English. I would understand something about Kevent function. Please, look this code: nev = kevent( kqueue_descr, events_list, how_many_targets,events_trig, how_many_targets,&tmout); When kevent returns and nev is >0, nev is equal to ready de

Re: Using kevent for signalling user app from kernel

2011-12-22 Thread arrowdodger
On Thu, Dec 22, 2011 at 10:03 AM, Sushanth Rai wrote: > Hi, > > I'm planning to use kqueue/kevent mechanism to notify a user application > from the kernel. Basically I set up a file descriptor for read event from > the user application by calling kevent(). Now, I would

Re: Using kevent for signalling user app from kernel

2011-12-22 Thread John Baldwin
On Thursday, December 22, 2011 1:03:31 am Sushanth Rai wrote: > Hi, > > I'm planning to use kqueue/kevent mechanism to notify a user application from the kernel. Basically I set up a file descriptor for read event from the user application by calling kevent(). Now, I would like

Using kevent for signalling user app from kernel

2011-12-21 Thread Sushanth Rai
Hi, I'm planning to use kqueue/kevent mechanism to notify a user application from the kernel. Basically I set up a file descriptor for read event from the user application by calling kevent(). Now, I would like to wake-up the process from within the kernel. The wake-up will happen due t

Re: Managing userland data pointers in kqueue/kevent

2010-11-15 Thread Paul LeoNerd Evans
On Mon, Nov 15, 2010 at 12:51:57PM -0800, Julian Elischer wrote: > "keep more information associated with each kevent and use the user > cookie to > match them" this is what it was for. > it's a tool, not an answer. Given this tool you should be able to > get wha

Re: Managing userland data pointers in kqueue/kevent

2010-11-15 Thread Julian Elischer
umber that you hash on a hash table. if the kernel returns a number that is out of date you won't find it and you can ignore it. If the kernel returns a number you are currently tracking. then you use the item associated with that entry. I'm really not sure I understand where this is goi

Re: Managing userland data pointers in kqueue/kevent

2010-11-15 Thread Paul LeoNerd Evans
On Mon, Nov 15, 2010 at 11:37:23AM -0800, Julian Elischer wrote: > I don't think it was thought of in the context of reference counted items. This problem has nothing to do with reference counting, and all to do with resource ownership. Consider in the totally C-based world, no refcounts, just ma

Re: Managing userland data pointers in kqueue/kevent

2010-11-15 Thread Julian Elischer
On 11/15/10 10:38 AM, Paul LeoNerd Evans wrote: On Mon, Nov 15, 2010 at 10:33:25AM -0800, Julian Elischer wrote: it was provided for pretty much what you are using it for, so that the userland caller could easily associate the returning event with some private information about the event. This

Re: Managing userland data pointers in kqueue/kevent

2010-11-15 Thread Paul LeoNerd Evans
ence on > > > the > > > specified object (e.g. a file descriptor) and will know to drop the > > > associated > > > data when the file descriptor is closed. That is, think of the kevent as > > > a > > > member of an eventable object rather than a se

Re: Managing userland data pointers in kqueue/kevent

2010-11-15 Thread John Baldwin
will know to drop the > > associated > > data when the file descriptor is closed. That is, think of the kevent as a > > member of an eventable object rather than a separate object that has a > > reference to the eventable object. When the eventable object's reference &g

Re: Managing userland data pointers in kqueue/kevent

2010-11-15 Thread Paul LeoNerd Evans
On Mon, Nov 15, 2010 at 10:33:25AM -0800, Julian Elischer wrote: > it was provided for pretty much what you are using it for, so that > the userland caller could > easily associate the returning event with some private information > about the event. This was indeed the impression I got. With refer

Re: Managing userland data pointers in kqueue/kevent

2010-11-15 Thread Julian Elischer
descriptor is closed. That is, think of the kevent as a member of an eventable object rather than a separate object that has a reference to the eventable object. When the eventable object's reference count drops to zero in userland, then the kevent should be deleted, either via EV_DELETE, or impli

Re: Managing userland data pointers in kqueue/kevent

2010-11-15 Thread Paul LeoNerd Evans
think of the kevent as a > member of an eventable object rather than a separate object that has a > reference to the eventable object. When the eventable object's reference > count drops to zero in userland, then the kevent should be deleted, either > via > EV_DELETE, or

Re: Managing userland data pointers in kqueue/kevent

2010-11-15 Thread John Baldwin
On Friday, November 12, 2010 1:40:00 pm Paul LeoNerd Evans wrote: > I'm trying to build a high-level language wrapper around kqueue/kevent, > specifically, a Perl wrapper. > > (In fact I am trying to fix this bug: > http://rt.cpan.org/Public/Bug/Display.html?id=61481 > )

Managing userland data pointers in kqueue/kevent

2010-11-12 Thread Paul LeoNerd Evans
I'm trying to build a high-level language wrapper around kqueue/kevent, specifically, a Perl wrapper. (In fact I am trying to fix this bug: http://rt.cpan.org/Public/Bug/Display.html?id=61481 ) My plan is to use the void *udata field of a kevent watcher to store a pointer to some

kevent notes implementation

2007-07-27 Thread Daniel Molina Wegener
Hello, I was looking the code of kqueue(2)/kevent(2), also the manual pages. Is there any reason why NOTE_OPEN, NOTE_CLOSE and NOTE_READ aren't implemented yet. What may be considered in these KNOTEs implementation? Best regards. -- .O. | Daniel Molina Wegener | C/C++ Deve

Re: kevent and unix dgram socket problem

2007-04-03 Thread Robert Watson
On Tue, 3 Apr 2007, Jason Carroll wrote: // create the local address, bind & listen struct sockaddr_un addr; memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_LOCAL; strncpy(addr.sun_path, "usock", UN_PATH_LEN - 1); assert(bind(fd, (sockaddr*) &addr, sizeof(sockaddr_un)) ==

kevent and unix dgram socket problem

2007-04-03 Thread Jason Carroll
ket to the AF_INET domain, I see the correct behavior with kevent(). I distilled the problem into two files that I included. listen.cc creates a unix socket and blocks for data on a kevent() call. write.cc sends a brief message to the same unix socket. I've seen the problem on 6-STABLE

Re: Use of kqueue/kevent NOTE_EXTEND fflag in VFS

2007-02-07 Thread Florent Thoumie
Ali Mashtizadeh wrote: > I saw in the past several people have asked if theres a way to monitor all > file operations (not limited to a set of Vnodes). Is this likely to be > implemented any time soon? Or is there a good alternative? If I understand correctly what you're looking for, then you want

Re: Use of kqueue/kevent NOTE_EXTEND fflag in VFS

2007-02-06 Thread Ali Mashtizadeh
I saw in the past several people have asked if theres a way to monitor all file operations (not limited to a set of Vnodes). Is this likely to be implemented any time soon? Or is there a good alternative? On 2/6/07, Florent Thoumie <[EMAIL PROTECTED]> wrote: I'd like to use NOTE_EXTEND in the f

Use of kqueue/kevent NOTE_EXTEND fflag in VFS

2007-02-06 Thread Florent Thoumie
I'd like to use NOTE_EXTEND in the following cases: create, link, mkdir, mknod, rename, symlink for the parent vnode or the destination parent vnode (in the rename case). The rationale is that there's no way (or I don't see it) to know if a file/directory is removed or created when monitoring a di

save process exit status in kevent NOTE_EXIT

2006-11-17 Thread Jared Yanovich
Any reason why this may be a bad idea? I think it'd be useful for a pwait(1)-like utility (from Solaris). Index: lib/libc/sys/kqueue.2 === RCS file: /home/ncvs/src/lib/libc/sys/kqueue.2,v retrieving revision 1.44 diff -u -p -r1.44 kq

Re: kqueue/kevent and directories (Was: Equivalent of POLLERR for kqueue.)

2006-01-04 Thread Igor Sysoev
On Tue, 13 Dec 2005, John-Mark Gurney wrote: Vaclav Haisman wrote this message on Wed, Dec 14, 2005 at 01:12 +0100: On Tue, 13 Dec 2005, Vaclav Haisman wrote: Is there equivalent of POLLERR for kqueue()? Or is EV_EOF the only thing? I would like to use kqueue/kevent for sockets but error

Re: kqueue/kevent and directories (Was: Equivalent of POLLERR for kqueue.)

2005-12-13 Thread John-Mark Gurney
Vaclav Haisman wrote this message on Wed, Dec 14, 2005 at 01:12 +0100: > On Tue, 13 Dec 2005, Vaclav Haisman wrote: > > >Is there equivalent of POLLERR for kqueue()? Or is EV_EOF the only thing? > >I would like to use kqueue/kevent for sockets but error condition > >sign

kqueue/kevent and directories (Was: Equivalent of POLLERR for kqueue.)

2005-12-13 Thread Vaclav Haisman
On Tue, 13 Dec 2005, Vaclav Haisman wrote: Is there equivalent of POLLERR for kqueue()? Or is EV_EOF the only thing? I would like to use kqueue/kevent for sockets but error condition signaling is not clear to me from manpage. Vaclav Haisman Another unclear area for me is how do changes in

Re: Kevent(2) doesn't notify about EVFILT_WRITE filter event

2005-12-04 Thread Dmitry Agaphonov
JMG> > clients interact to server A via UNIX-domain sockets too. Server A JMG> > uses kqueue(2) to handle clients and server B. JMG> > JMG> > When about 20 clients start requesting server A without delay, kevent(2) JMG> > doesn't notify about requested EVFILT_WRITE

Re: Kevent(2) doesn't notify about EVFILT_WRITE filter event

2005-12-01 Thread John-Mark Gurney
uses kqueue(2) to handle clients and server B. > > When about 20 clients start requesting server A without delay, kevent(2) > doesn't notify about requested EVFILT_WRITE after only few small > requests. > > > Dumping kevent(2) changelist and eventlist gives the followi

Kevent(2) doesn't notify about EVFILT_WRITE filter event

2005-12-01 Thread Dmitry Agaphonov
requesting server A without delay, kevent(2) doesn't notify about requested EVFILT_WRITE after only few small requests. Dumping kevent(2) changelist and eventlist gives the following: Server A asks for write event (with EV_ONESHOT flag set) to server B: [13:45:36][DBG] Changing SysEvent: ide

Re: kevent and related stuff

2003-11-10 Thread John-Mark Gurney
andi payn wrote this message on Thu, Oct 30, 2003 at 07:54 -0800: > * The kevent mechanism doesn't monitor directories in a sufficient way > to make fam happy. If you change a file in a directory that you're > watching, unlike imon or dnotify, kevent won't see anything

Re: kevent and related stuff

2003-10-31 Thread andi payn
fcntl, it > > instead works by periodically stating all of the files it's > > watching--which is obviously not as good. The fam FAQ suggests that > > FreeBSD users should adapt fam to use the kevent interface. > > Yes. The "file access monitor" tool is the cla

Re: kevent and related stuff

2003-10-31 Thread andi payn
On Thu, 2003-10-30 at 22:33, Ruben de Groot wrote: > On Thu, Oct 30, 2003 at 07:54:07AM -0800, andi payn typed: > > [...] > > > * I think (but I'm not sure) that kevent doesn't notify at all if the > > only change to a file is its ATIME. If I'm right, this

Re: kevent and related stuff

2003-10-31 Thread Terry Lambert
it > instead works by periodically stating all of the files it's > watching--which is obviously not as good. The fam FAQ suggests that > FreeBSD users should adapt fam to use the kevent interface. Yes. The "file access monitor" tool is the classic argument. > I looked

kevent and related stuff

2003-10-30 Thread andi payn
#x27;s watching--which is obviously not as good. The fam FAQ suggests that FreeBSD users should adapt fam to use the kevent interface. I looked into kevent, and it seems like there are a number of problems that lead me to suspect that this is a really stupid idea. And yet, I'd assume that someone

RE: Race in kevent

2003-07-11 Thread Harti Brandt
On Thu, 10 Jul 2003, John Baldwin wrote: JB> JB>On 10-Jul-2003 Harti Brandt wrote: JB>> On Wed, 9 Jul 2003, John Baldwin wrote: JB>> JB>> JB>On 09-Jul-2003 Harti Brandt wrote: JB>> JB>> JB>> JB>> Hi, JB>> JB>> JB>> JB>>

RE: Race in kevent

2003-07-10 Thread John Baldwin
On 10-Jul-2003 Harti Brandt wrote: > On Wed, 9 Jul 2003, John Baldwin wrote: > > JB>On 09-Jul-2003 Harti Brandt wrote: > JB>> > JB>> Hi, > JB>> > JB>> I just had a crash while typing ^C to a program that has a kevent timer > JB>>

Re: Race in kevent

2003-07-10 Thread Harti Brandt
On Wed, 9 Jul 2003, Eric Jacobs wrote: EJ>On Wed, 9 Jul 2003 15:28:38 +0200 (CEST) EJ> EJ>I didn't think of it in my original post, but perhaps we need a EJ>"thissoftcheck" pointer that works analogously to "nextsoftcheck", EJ>except that instead of being advanced to the next entry in the queue, E

RE: Race in kevent

2003-07-10 Thread Harti Brandt
On Wed, 9 Jul 2003, John Baldwin wrote: JB>On 09-Jul-2003 Harti Brandt wrote: JB>> JB>> Hi, JB>> JB>> I just had a crash while typing ^C to a program that has a kevent timer JB>> running. The crash was: JB>> JB>> callout_stop JB>> callout_reset

RE: Race in kevent

2003-07-09 Thread John Baldwin
On 09-Jul-2003 Harti Brandt wrote: > > Hi, > > I just had a crash while typing ^C to a program that has a kevent timer > running. The crash was: > > callout_stop > callout_reset > filt_timerexpire > softclock > > and callout_stop was accessing freed memor

Re: Race in kevent

2003-07-09 Thread Eric Jacobs
On Wed, 9 Jul 2003 15:28:38 +0200 (CEST) Harti Brandt <[EMAIL PROTECTED]> wrote: > Hi, > > I just had a crash while typing ^C to a program that has a kevent timer > running. The crash was: > > callout_stop > callout_reset > filt_timerexpire > softclock > &g

Race in kevent

2003-07-09 Thread Harti Brandt
Hi, I just had a crash while typing ^C to a program that has a kevent timer running. The crash was: callout_stop callout_reset filt_timerexpire softclock and callout_stop was accessing freed memory (0xdeadc0e2). After looking some time at the filt_timerdetach, callout_stop and softclock I

Re: kqueue/kevent support in scsi device drivers

2003-06-12 Thread Jayasheela Bhat
Valentin Nechayev <[EMAIL PROTECTED]> wrote: Fri, May 30, 2003 at 12:14:50, jaya_bhat100 (Jayasheela Bhat) wrote about "kqueue/kevent support in scsi device drivers": JB> At present, kevent is supported for vnode, fifos, pipes and sockets, I believe. JB> I would like to use

Re: kqueue/kevent support in scsi device drivers

2003-05-31 Thread Valentin Nechayev
Fri, May 30, 2003 at 12:14:50, jaya_bhat100 (Jayasheela Bhat) wrote about "kqueue/kevent support in scsi device drivers": JB> At present, kevent is supported for vnode, fifos, pipes and sockets, I believe. JB> I would like to use kevent notification in scsi devices. But the d

kqueue/kevent support in scsi device drivers

2003-05-30 Thread Jayasheela Bhat
Hi All, At present, kevent is supported for vnode, fifos, pipes and sockets, I believe. I would like to use kevent notification in scsi devices. But the drivers scsi_xx.c do not support it. Whether I can implement it in scsi device driver using KNOTE? I was going through tty.c where KNOTE is

kevent kernel expert.

2003-02-13 Thread Alfred Perlstein
I have come across several (major imo) problems with the kevent(2) and need to have contact with someone that understands the implementation, specifically how kqueues are attached to filedesc structures. This has to deal with security as well as SMP lock down issues. Please respond privately

Re: New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC

2002-10-28 Thread Adrian Filipi-Martin
On Sun, 27 Oct 2002, Juli Mallett wrote: > * De: Maxim Sobolev <[EMAIL PROTECTED]> [ Data: 2002-10-27 ] > [ Subjecte: Re: New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC ] > > On Sat, Oct 26, 2002 at 06:09:31PM -0700, Nate Lawson wrote: > > > On Thu, 24 Oc

Re: New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC

2002-10-27 Thread Maxim Sobolev
On Sun, Oct 27, 2002 at 01:24:19AM -0700, Juli Mallett wrote: > * De: Maxim Sobolev <[EMAIL PROTECTED]> [ Data: 2002-10-27 ] > [ Subjecte: Re: New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC ] > > On Sun, Oct 27, 2002 at 01:04:29AM -0700, Juli Mallett wrote: > &g

Re: New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC

2002-10-27 Thread Terry Lambert
Juli Mallett wrote: > > EVFILT_PROC operates on pids, while NOTE_{START,STOP}EXEC operate on > > vnodes - it is the main difference. Currently, you can't reliably > > get a notification when kernes started executing some arbitrary > > executable from your fs. > > This is not a job for the kernel,

Re: New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC

2002-10-27 Thread Juli Mallett
* De: Maxim Sobolev <[EMAIL PROTECTED]> [ Data: 2002-10-27 ] [ Subjecte: Re: New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC ] > On Sun, Oct 27, 2002 at 01:04:29AM -0700, Juli Mallett wrote: > > * De: Maxim Sobolev <[EMAIL PROTECTED]> [ Data: 2002-10-27 ] > &

Re: New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC

2002-10-27 Thread Maxim Sobolev
On Sun, Oct 27, 2002 at 01:04:29AM -0700, Juli Mallett wrote: > * De: Maxim Sobolev <[EMAIL PROTECTED]> [ Data: 2002-10-27 ] > [ Subjecte: Re: New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC ] > > On Sat, Oct 26, 2002 at 06:09:31PM -0700, Nate Lawson wrote: > &g

Re: New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC

2002-10-27 Thread Juli Mallett
* De: Maxim Sobolev <[EMAIL PROTECTED]> [ Data: 2002-10-27 ] [ Subjecte: Re: New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC ] > On Sat, Oct 26, 2002 at 06:09:31PM -0700, Nate Lawson wrote: > > On Thu, 24 Oct 2002, Maxim Sobolev wrote: > > > Please review the p

Re: New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC

2002-10-26 Thread Nate Lawson
own, couldn't you use waitpid()? Or a kevent() of EVFILT_PROC with NOTE_EXIT/NOTE_FORK? I'm not sure I see the need for this. Comments below. > +.It NOTE_STOPEXEC > +Execution of the file referenced by the descriptor ended. Triggered > when > +the process associated with t

New kevent types: NOTE_STARTEXEC and NOTE_STOPEXEC

2002-10-24 Thread Maxim Sobolev
Folks, Please review the patch, which adds two new types of events - NOTE_STARTEXEC and NOTE_STOPEXEC, that could be used to get notification when the image starts or stops executing. For example, it could be used to monitor that a daemon is up and running and notify administrator when for some re

Re: kevent and pipes interaction on 4.6-STABLE

2002-08-26 Thread Dominic Marks
On Tue, Aug 27, 2002 at 12:41:21AM +0100, Ian Dowse wrote: > In message <20020826225851.GA93947@gallium>, Dominic Marks writes: > >+static int kq = -1; > >+ int kq, rv, idx; > >kevent(0x3,0xbfbfedbc,0x1,0x0,0x0,0x0) = 0 (0x0) > >kevent(0x809abc0,0x0,

Re: kevent and pipes interaction on 4.6-STABLE

2002-08-26 Thread Terry Lambert
Dominic Marks wrote: > I'm attempting the junior userland hacker task of replacing select in > make with kevent. I have written the code and it is, as far as I know > correct. > > The problem is that this code doesn't work. An example being the > following: The pro

Re: kevent and pipes interaction on 4.6-STABLE

2002-08-26 Thread Ian Dowse
In message <20020826225851.GA93947@gallium>, Dominic Marks writes: >+static int kq = -1; >+int kq, rv, idx; >kevent(0x3,0xbfbfedbc,0x1,0x0,0x0,0x0) = 0 (0x0) >kevent(0x809abc0,0x0,0x0,0xbfbfede0,0x8,0x0) ERR#9 'Bad file descriptor' Look at the abo

Re: kevent and pipes interaction on 4.6-STABLE

2002-08-26 Thread Dominic Marks
Hey, The best time to find and fix problems in code is just after you've submitted it to a public forum. It is also the worst time. :-) 1. Removed pointless traversal on kevent structures in Job_CatchOutput which I was doing before. Now all kevent objects store the address of their assigne

Re: kevent and pipes interaction on 4.6-STABLE

2002-08-26 Thread Dominic Marks
On Mon, Aug 26, 2002 at 11:17:27PM +0100, Dominic Marks wrote: One thing I forgot to mention, but which I don't think (hope) matters is that I'm building make from checked out -CURRENT source on my -STABLE workstation. That's why the diff is against -CURRENT and the subject mentions 4.6-STABLE.

kevent and pipes interaction on 4.6-STABLE

2002-08-26 Thread Dominic Marks
Hey, I'm attempting the junior userland hacker task of replacing select in make with kevent. I have written the code and it is, as far as I know correct. The problem is that this code doesn't work. An example being the following: > cd /usr/src > /usr/obj/usr/home/dom/code/src/u

successful use of NOTE_LOWAT in kevent?

2002-05-17 Thread Kip Macy
Has any successfully used the NOTE_LOWAT feature described in the kevent man page? -Kip __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with

Re: kevent subsystem

2002-05-10 Thread Terry Lambert
Robert Watson wrote: > This looks much more like a syslog/audit/... mechanism, and not really > much like keven, which is about applications getting event notification on > system objects. You might be interested in talking to Andrew Reiter > <[EMAIL PROTECTED]> about his work on the TrustedBSD a

Re: kevent subsystem

2002-05-10 Thread Terry Lambert
Ramkumar Chinchani wrote: > I am asking more in terms of the posix event logging mechanism being > implemented in Linux 2.5.x kernel. > > http://evlog.sourceforge.net/ > > How does the kevent mechanism of event notification and handling compare > to this scheme? The POS

Re: kevent subsystem

2002-05-10 Thread Robert Watson
f the posix event logging mechanism being > implemented in Linux 2.5.x kernel. > > http://evlog.sourceforge.net/ > > How does the kevent mechanism of event notification and handling compare > to this scheme? > > It appears to me that the Linux event logging merely suppor

Re: kevent subsystem

2002-05-10 Thread Ramkumar Chinchani
I am asking more in terms of the posix event logging mechanism being implemented in Linux 2.5.x kernel. http://evlog.sourceforge.net/ How does the kevent mechanism of event notification and handling compare to this scheme? It appears to me that the Linux event logging merely supports logging

Re: kevent subsystem

2002-05-09 Thread Terry Lambert
Ramkumar Chinchani wrote: > Has the POSIX event standard implemeted in FreeBSD? POSIX events are logged to > a file. Which would give a better performance, assuming kevent can register more > events? Are you talking about POSIX persistent queueing, of the type not implemented by

kevent subsystem

2002-05-09 Thread Ramkumar Chinchani
Has the POSIX event standard implemeted in FreeBSD? POSIX events are logged to a file. Which would give a better performance, assuming kevent can register more events? Thanks. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: kevent() in another thread

2002-01-19 Thread Doug White
On Thu, 17 Jan 2002, Floris 'Tamama' van Gog wrote: > I read that kevent/kqueue weren't very thread-safe. Where did you read this? kqueue/kevent are perfectly threadsafe. Now, whether kevent is useful in threads is a totally different matter Doug White

kevent() in another thread

2002-01-16 Thread Floris 'Tamama' van Gog
Hi, I have made a small servent (client + server) that uses kqueue()/kevent(). This works like a charm. However now I want to connect from another thread to a server, and add a kevent on the socket. I read that kevent/kqueue weren't very thread-safe. Is this safely possible, or would I ne

Re: select kevent aio_read

2001-08-03 Thread Bill Fumerola
On Fri, Aug 03, 2001 at 09:04:31PM -0700, Hans Zaunere wrote: > I am new to this level of programming so please bare > with me. I am curious as the differences between > kevent and select and when to use either one. After > reading the man pages, they seem to provide abou

select kevent aio_read

2001-08-03 Thread Hans Zaunere
Hello, I am new to this level of programming so please bare with me. I am curious as the differences between kevent and select and when to use either one. After reading the man pages, they seem to provide about the same functionality. What advantages do each have, and why would one choose one

Does /dev/bpf work with kevent?

2001-08-03 Thread Josh M Osborne
I'm attempting to use kevent with /dev/bpf to check to see if it is ready for reads, but it seems to always return ready to read, but the reads get EAGAIN. Does /dev/bpf not work with kevent? Or should I look elsewhere for my bug (like forgetting some random ioctl)? If you can't us

Re: Does /dev/bpf work with kevent?

2001-08-03 Thread Josh M Osborne
On Fri, Aug 03, 2001 at 01:51:20PM -0400, Garance A Drosihn wrote: [.../dev/bpf...kevent...EAGAIN...] > Are you trying this on current or stable? current has a bug fix > to bpf which still hasn't been merged to stable. 4.3-RELEASE, and 4.3-STABLE To Unsubscribe: send mail to [EMAI

Re: Does /dev/bpf work with kevent?

2001-08-03 Thread Garrett Rooney
On Fri, Aug 03, 2001 at 01:51:20PM -0400, Garance A Drosihn wrote: > At 10:26 AM -0400 8/3/01, Josh M Osborne wrote: > >I'm attempting to use kevent with /dev/bpf to check to see if it > >is ready for reads, but it seems to always return ready to read, > >but the rea

Re: KEvent doesnt return and KEvent sample tr... 

2001-05-03 Thread Dominic Marks
Many thanks. I see where I was going wrong now. Dominic Marks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in

Re: KEvent doesnt return and KEvent sample troubles

2001-05-02 Thread Jonathan Lemon
In article [EMAIL PROTECTED]> you write: >I've been looking to start using the KEvent system and I've been >experimenting with it. However I've been having several problems, with my >own code as well as samples from http://www.flugsvamp.org. AAARGH. /me hastily go

Re: KEvent doesnt return and KEvent sample troubles

2001-05-02 Thread Doug White
On Wed, 2 May 2001, Dominic Marks wrote: > I've been looking to start using the KEvent system and I've been > experimenting with it. However I've been having several problems, with my > own code as well as samples from http://www.flugsvamp.org. > > It appears I

Re: KEvent doesnt return and KEvent sample troubles

2001-05-02 Thread Mikko Tyolajarvi
In local.freebsd.hackers you write: >>* Dominic Marks <[EMAIL PROTECTED]> [010502 14:29] wrote: >> > I've been looking to start using the KEvent system and I've been >> > experimenting with it. However I've been having several problems, with &g

Re: KEvent doesnt return and KEvent sample troubles

2001-05-02 Thread Dominic Marks
>* Dominic Marks <[EMAIL PROTECTED]> [010502 14:29] wrote: > > I've been looking to start using the KEvent system and I've been > > experimenting with it. However I've been having several problems, with >my > > own code as well as samples from h

  1   2   >