mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Neil Horman <nhorman@tuxdriver.com>,
	Oleg Nesterov <oleg@redhat.com>
Subject: Re: Resource limits interface proposal [was: pull request for  writable limits]
Date: Thu, 6 May 2010 08:37:11 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.00.1005060827520.901@i5.linux-foundation.org> (raw)
In-Reply-To: <m2jb6fcc0a1005052339h3dd5c77cwd762c65a23180638@mail.gmail.com>



On Thu, 6 May 2010, Alexey Dobriyan wrote:

> On Wed, May 5, 2010 at 6:08 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > Ok, I'm not entirely sure we need to care specially about INFINITY,
> > _especially_ since INF is really rather big in 64 bits. So to some degree,
> > making things 64-bit is _less_ likely to make INFINITIES a problem.
> 
> I'm _sure_, someone will mention bloat and performance degradation
> on 32-bit, so there will be config option for 32-bit in-kernel limits.
> And if there will be config option, infinities are better be separated.

Umm. Why?

Adding an INF field will make it essentially impossible to use that thing 
as a compatibility function, and/or together with the legacy rlimit() 
system call. And that is going to be 99.999% of all uses.

I don't think you understand how system calls work. People don't use 
Linux-only features. It's been shown over and over and over again. People 
use the standard interfaces, and they don't _have_ that INF field. We can 
extend ranges by just updating structures (see "stat()" and friends) and a 
recompile will make it use higher limits, but we can't make programs use 
new features.

So there is _no_ upside. There would be _no_ programs ever using it. 

Whether the internal limits for the kernel are 32-bit or not makes 
absolutely zero difference. And my argument is that _if_ they are 64-bit, 
that makes the INF field even _less_ interesting. So they go from "zero 
practical difference" in 32-bit to "f*ck it, nobody can _possibly_ care 
even in theory" in 64-bit.

If the internal limits are 32-bit, then you just turn any 64-bit value 
larger than the (32-bit) RLIM_INFINITY into a RLIM_INFINITY. And that's as 
good as you can get with mixing with the legacy interface anyway.

		Linus

  reply	other threads:[~2010-05-06 15:39 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07 16:52 [PULL] pull request for writable limits for 2.6.33-rc1 Jiri Slaby
2009-12-09 19:25 ` [PULL] pull request for writable limits for 2.6.33-rc0 Jiri Slaby
2009-12-11 11:05   ` [git pull -resend] " Jiri Slaby
2009-12-23  9:40     ` Jiri Slaby
2010-01-02 21:40   ` [PULL] " Jiri Kosina
2010-01-02 21:52     ` Ingo Molnar
2010-01-04 21:59       ` Jiri Kosina
2010-01-04 10:47   ` [PULL] pull request for limits FIXES for 2.6.33-rc Jiri Slaby
2010-01-04 10:48     ` [PATCH 1/3] SECURITY: selinux, fix update_rlimit_cpu parameter Jiri Slaby
2010-01-04 10:48     ` [PATCH 2/3] resource: move kernel function inside __KERNEL__ Jiri Slaby
2010-01-04 10:48     ` [PATCH 3/3] resource: add helpers for fetching rlimits Jiri Slaby
2010-01-05 15:50     ` [PATCH 1/3] SECURITY: selinux, fix update_rlimit_cpu parameter David Howells
2010-03-05 16:53 ` [git pull] pull request for writable limits for 2.6.34-rc0 Jiri Slaby
2010-03-20 19:20   ` Linus Torvalds
2010-03-21  1:45     ` Neil Horman
2010-03-21  6:06     ` Alexey Dobriyan
2010-03-21 18:38       ` Linus Torvalds
2010-03-24 17:02         ` Jiri Slaby
2010-04-14  9:31           ` Jiri Slaby
2010-05-05 12:12         ` Resource limits interface proposal [was: pull request for writable limits] Jiri Slaby
2010-05-05 15:08           ` Linus Torvalds
2010-05-06  6:39             ` Alexey Dobriyan
2010-05-06 15:37               ` Linus Torvalds [this message]
2010-05-07  8:55                 ` [PATCH 01/11] rlimits: security, add task_struct to setrlimit Jiri Slaby
2010-05-07  8:55                 ` [PATCH 02/11] rlimits: add task_struct to update_rlimit_cpu Jiri Slaby
2010-05-07  8:55                 ` [PATCH 03/11] rlimits: make sure ->rlim_max never grows in sys_setrlimit Jiri Slaby
2010-05-07  8:55                 ` [PATCH 04/11] rlimits: split sys_setrlimit Jiri Slaby
2010-05-07  8:55                 ` [PATCH 05/11] rlimits: allow setrlimit to non-current tasks Jiri Slaby
2010-05-07  8:55                 ` [PATCH 06/11] rlimits: do security check under task_lock Jiri Slaby
2010-05-07  8:55                 ` [PATCH 07/11] rlimits: add rlimit64 structure Jiri Slaby
2010-05-07  8:55                 ` [PATCH 08/11] rlimits: redo do_setrlimit to more generic do_prlimit Jiri Slaby
2010-05-07  8:55                 ` [PATCH 09/11] rlimits: switch getrlimit to do_prlimit Jiri Slaby
2010-05-07  9:02                   ` [PATCH v2 09/11] rlimits: switch more rlimit syscalls " Jiri Slaby
2010-05-07  9:05                     ` Jiri Slaby
2010-05-07  8:55                 ` [PATCH " Jiri Slaby
2010-05-07  8:55                 ` [PATCH 10/11] rlimits: implement prlimit64 syscall Jiri Slaby
2010-05-07  8:55                 ` [PATCH 11/11] unistd: add __NR_prlimit64 syscall numbers Jiri Slaby
2010-05-06 15:46             ` Resource limits interface proposal [was: pull request for writable limits] Jiri Slaby
2010-03-24 17:04     ` [git pull] pull request for writable limits for 2.6.34-rc0 Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.1005060827520.901@i5.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=oleg@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome