Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Nov 2006 12:22:09 +0200
From:      "Vlad Galu" <dudu@dudu.ro>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Kqueue write event position?
Message-ID:  <ad79ad6b0611230222x21e68c8bxe86da349ffd7f7ec@mail.gmail.com>
In-Reply-To: <ek3p31$i69$1@sea.gmane.org>
References:  <ek2ca4$sft$1@sea.gmane.org> <ad79ad6b0611221309q85e37e5p224ba93d0b9c9b5@mail.gmail.com> <ek3p31$i69$1@sea.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/23/06, Ivan Voras <ivoras@fer.hr> wrote:
> Vlad Galu wrote:
>
> >   It seems to me you would have to propagate that info along the
> > VOP_WRITE_POST->VFS_KNOTE_LOCKED->VN_KNOTE->knote() chain. Since
> > knote() is generic and is used for all types of notifications, you can
> > probably roll down your own replacement and call it from VN_KNOTE. Of
> > course, there probably is a better way :)
>
> Before I get any further with this, can anyone predict what would be the
> impact of monitoring a large number of files (50,000 or more) with
> kqueue? For kqueue to work, each file would have to be opened (and take
> up one file descriptor).

   My guess is that it won't be remarcably high. However, you can
create those files, add them to your notification list and randomly
write bytes to them, to see how your system performs. One more
suggestion, I think it would be better if, in case you extend the
vnode API, you only send the size of the write in the data field of
the kevent structure and you store the offset in your program and
adding the size to it everytime an event occurs.

> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>


-- 
If it's there, and you can see it, it's real.
If it's not there, and you can see it, it's virtual.
If it's there, and you can't see it, it's transparent.
If it's not there, and you can't see it, you erased it.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ad79ad6b0611230222x21e68c8bxe86da349ffd7f7ec>