Kqueue write event position?

Vlad Galu dudu at dudu.ro
Thu Nov 23 10:22:14 UTC 2006


On 11/23/06, Ivan Voras <ivoras at 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at 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.


More information about the freebsd-hackers mailing list