closing kqueue descriptor doesn't release associated kernel resources?

Alexey Egorov electreg at list.ru
Mon Oct 28 21:22:17 UTC 2013


Hello all,
I'm porting application from Linux which uses libaio for async disk IO.
On FreeBSD we are using kqueue + posix AIO, but I discovered that closing kqueue descriptor doesn't release associated aio requests - sysctl value vfs.aio.num_queue_count keeps growing each time I'm close kqueue fd without waiting for aio requests to complete, and then at some point when limit is reached program hangs.
Problem getting harder considering that I'm doing IO on raw disk device and can't cancel requests with aio_cancel(2).
Is it a bug? How can I release this requests without terminating process or waiting for all requests to complete?
Thanks.
 


More information about the freebsd-hackers mailing list