Date: Mon, 28 Oct 2013 15:07:37 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Alexey Egorov <electreg@list.ru> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: closing kqueue descriptor doesn't release associated kernel resources? Message-ID: <CAJ-VmonpbNJnCVYaHzK7TvSi_1FtYK9MoGSdrg=uUtLHx59w4Q@mail.gmail.com> In-Reply-To: <1382995311.800352930@f402.i.mail.ru> References: <1382995311.800352930@f402.i.mail.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi! Yes. The POSIX AIO API puts the responsibility on the programmer to correctly terminate requests: * aborting them with aio_cancel() (and it succeeding), or * waiting for them to complete. So yes, you're going to have to track them and correctly abort/complete the requests. Thanks, -adrian On 28 October 2013 14:21, Alexey Egorov <electreg@list.ru> wrote: > > 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 v= fs.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 a= nd 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. > > _______________________________________________ > 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= "
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonpbNJnCVYaHzK7TvSi_1FtYK9MoGSdrg=uUtLHx59w4Q>