Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1495993

Re: aio: questions with ioctx_alloc() and large num_possible_cpus()

From Benjamin LaHaise <bcrl@kvack.org>
Newsgroups linux.kernel
Subject Re: aio: questions with ioctx_alloc() and large num_possible_cpus()
Date 2016-10-05 20:20 +0200
Message-ID <soYXo-4WW-9@gated-at.bofh.it> (permalink)
References <soGQN-xH-13@gated-at.bofh.it> <soYE1-4tz-5@gated-at.bofh.it> <soYE1-4tz-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Oct 05, 2016 at 02:58:12PM -0300, Mauricio Faria de Oliveira wrote:
> Hi Benjamin,
> 
> On 10/05/2016 02:41 PM, Benjamin LaHaise wrote:
> >I'd suggest increasing the default limit by changing how it is calculated.
> >The current number came about 13 years ago when machines had orders of
> >magnitude less RAM than they do today.
> 
> Thanks for the suggestion.
> 
> Does the default also have implications other than memory usage?
> For example, concurrency/performance of as much aio contexts running,
> or if userspace could try to exploit some point with a larger number?

Anything's possible when a local user can run code.  It's the same problem 
as determining how much memory can be mlock()ed, or how much i/o a process 
should be allowed to do.  Nothing prevents an app from doing a huge amount 
of readahed() calls to make the system prefetch gigabytes of data.  That 
said, local users tend not to DoS themselves.

> Wondering about it because it can be set based on num_possible_cpus(),
> but that might be really large on high-end systems.

Today's high end systems are tomorrow's desktops...  It probably makes 
sense to implement per-user limits rather than the current global limit, 
and maybe even convert them to an rlimit to better fit in with the 
available frameworks for managing these things.

		-ben

> Regards,
> 
> -- 
> Mauricio Faria de Oliveira
> IBM Linux Technology Center

-- 
"Thought is the essence of where you are now."

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

aio: questions with ioctx_alloc() and large num_possible_cpus() Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com> - 2016-10-05 01:00 +0200
  Re: aio: questions with ioctx_alloc() and large num_possible_cpus() Kent Overstreet <kent.overstreet@gmail.com> - 2016-10-05 08:40 +0200
    Re: aio: questions with ioctx_alloc() and large num_possible_cpus() Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com> - 2016-10-05 19:30 +0200
  Re: aio: questions with ioctx_alloc() and large num_possible_cpus() Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com> - 2016-10-05 20:00 +0200
    Re: aio: questions with ioctx_alloc() and large num_possible_cpus() Benjamin LaHaise <bcrl@kvack.org> - 2016-10-05 20:20 +0200
      Re: aio: questions with ioctx_alloc() and large num_possible_cpus() Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com> - 2016-10-05 21:30 +0200
  Re: aio: questions with ioctx_alloc() and large num_possible_cpus() Benjamin LaHaise <bcrl@kvack.org> - 2016-10-05 20:10 +0200

csiph-web