lkml.org 
[lkml]   [2009]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch] aio: remove aio-max-nr and instead use the memlock rlimit to limit the number of pages pinned for the aio completion ring
Date
Avi Kivity <avi@redhat.com> writes:

> Jeff Moyer wrote:
>> Hi,
>>
>> Believe it or not, I get numerous questions from customers about the
>> suggested tuning value of aio-max-nr. aio-max-nr limits the total
>> number of io events that can be reserved, system wide, for aio
>> completions. Each time io_setup is called, a ring buffer is allocated
>> that can hold nr_events I/O completions. That ring buffer is then
>> mapped into the process' address space, and the pages are pinned in
>> memory. So, the reason for this upper limit (I believe) is to keep a
>> malicious user from pinning all of kernel memory. Now, this sounds like
>> a much better job for the memlock rlimit to me, hence the following
>> patch.
>>
>
> Is it not possible to get rid of the pinning entirely? Pinning
> interferes with page migration which is important for NUMA, among
> other issues.

aio_complete is called from interrupt handlers, so can't block faulting
in a page. Zach mentions there is a possibility of handing completions
off to a kernel thread, with all of the performance worries and extra
bookkeeping that go along with such a scheme (to help frame my concerns,
I often get lambasted over .5% performance regressions).

I'm happy to look into such a scheme, should anyone show me data that
points to this NUMA issue as an actual performance problem today. In
the absence of such data, I simply can't justify the work at the moment.

Thanks for taking a look!

-Jeff


\
 
 \ /
  Last update: 2009-03-09 18:59    [W:0.106 / U:0.028 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site