From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:33443 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726696AbeLAJPT (ORCPT ); Sat, 1 Dec 2018 04:15:19 -0500 From: Jeff Moyer To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, hch@lst.de Subject: Re: [PATCH 27/27] aio: add support for pre-mapped user IO buffers References: <20181130165646.27341-1-axboe@kernel.dk> <20181130165646.27341-28-axboe@kernel.dk> <8dc2ea1d-b6a4-728b-7550-87d32240989c@kernel.dk> Date: Fri, 30 Nov 2018 17:04:34 -0500 In-Reply-To: <8dc2ea1d-b6a4-728b-7550-87d32240989c@kernel.dk> (Jens Axboe's message of "Fri, 30 Nov 2018 14:57:58 -0700") Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Jens Axboe 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. ;-) > 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. >> The speedups are pretty impressive! > > That's why I put them in there, maybe that'd get peoples attention :-) Indeed. :) Cheers, Jeff