On 11/30/18 3:04 PM, Jeff Moyer wrote: > Jens Axboe <axboe@xxxxxxxxx> writes: > >>>> A limit of 4M is imposed as the largest buffer we currently support. >>>> There's nothing preventing us from going larger, but we need some cap, >>>> and 4M seemed like it would definitely be big enough. >>> >>> Doesn't this mean that a user can pin a bunch of memory? Something like >>> 4MB * aio_max_nr? >>> >>> $ sysctl fs.aio-max-nr >>> fs.aio-max-nr = 1048576 >>> >>> If so, it may be a good idea to account the memory under RLIMIT_MEMLOCK. >> >> Yes, it'll need some kind of limiting, right now the limit would indeed >> be aio-max-nr * 4MB. 4G isn't terrible, but... > > Unless my math's wrong, that's 4TiB on my system. ;-) I guess that's a little more terrible ;-) >> RLIMIT_MEMLOCK isn't a bad idea. >> >>> I'm not sure how close you are to proposing this patch set for realz. >>> If it's soon (now?), then CC-ing linux-api and writing man pages would >>> be a good idea. I can help out with the libaio bits if you'd like. I >>> haven't yet had time to take this stuff for a spin, sorry. I'll try to >>> get to that soonish. >> >> I am proposing it for real, not sure how long it'll take to get it >> reviewed and moved forward. Unless I get lucky. 4.22 seems like a more >> viable version than 4.21. >> >> I'll take any help I can get on the API/man page parts. And/or testing! > > OK, I'll add libaio support (including unit tests), write the man page, > and I'll definitely do some testing. I'll start on all that probably in > the latter half of next week. Awesome, that's much appreciated! -- Jens Axboe