linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
  • [parent not found: <5ygDT-6LK-3@gated-at.bofh.it>]
  • * Rationale for RLIMIT_MEMLOCK?
    @ 2006-01-23 10:56 Matthias Andree
      2006-01-23 11:05 ` Arjan van de Ven
      0 siblings, 1 reply; 37+ messages in thread
    From: Matthias Andree @ 2006-01-23 10:56 UTC (permalink / raw)
      To: Linux-Kernel mailing list
    
    Greetings,
    
    debugging an application problem that used to mlockall(...FUTURE) and
    failed with a subsequent mmap(), I came across the manual page for
    setrlimit (see below for the relevant excerpt). I have several questions
    concerning the rationale:
    
    1. What is the reason we're having special treatment
       for the super-user here?
    
    2. Why is it the opposite of what 2.6.8.1 and earlier did?
    
    3. Why is this inconsistent with all other RLIMIT_*?
       Neither of which cares if a process is privileged or not.
    
    4. Is the default hard limit of 32 kB initialized by the kernel or
       by some script in SUSE 10.0? If it's the kernel: why is the limit so
       low, and why isn't just the soft limit set?
    
       "[...]
        RLIMIT_MEMLOCK
          The maximum number of bytes of memory that may  be  locked  into
          RAM.  In effect this limit is rounded down to the nearest multi-
          ple of the system page size.  This limit  affects  mlock(2)  and
          mlockall(2)  and  the mmap(2) MAP_LOCKED operation.  Since Linux
          2.6.9 it also affects the shmctl(2) SHM_LOCK operation, where it
          sets a maximum on the total bytes in shared memory segments (see
          shmget(2)) that may be locked by the real user ID of the calling
          process.   The  shmctl(2) SHM_LOCK locks are accounted for sepa-
          rately  from  the  per-process  memory  locks   established   by
          mlock(2),  mlockall(2),  and  mmap(2)  MAP_LOCKED; a process can
          lock bytes up to this limit in each of these two categories.  In
          Linux  kernels before 2.6.9, this limit controlled the amount of
          memory that could be locked  by  a  privileged  process.   Since
          Linux 2.6.9, no limits are placed on the amount of memory that a
          privileged process may lock, and this limit instead governs  the
          amount of memory that an unprivileged process may lock. [...]"
       (getrlimit(2), man-pages-2.07)
    
    -- 
    Matthias Andree
    
    ^ permalink raw reply	[flat|nested] 37+ messages in thread

    end of thread, other threads:[~2006-02-07 10:57 UTC | newest]
    
    Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <5y7B5-1dw-15@gated-at.bofh.it>
         [not found] ` <5y7KL-1DZ-31@gated-at.bofh.it>
         [not found]   ` <5yddh-1pA-47@gated-at.bofh.it>
         [not found]     ` <5ydni-1Qq-3@gated-at.bofh.it>
         [not found]       ` <5yek1-3iP-53@gated-at.bofh.it>
         [not found]         ` <5yeth-3us-33@gated-at.bofh.it>
         [not found]           ` <5yf5O-4iF-19@gated-at.bofh.it>
         [not found]             ` <5yfI4-5kU-11@gated-at.bofh.it>
         [not found]               ` <5ygE4-6LK-35@gated-at.bofh.it>
         [not found]                 ` <5yhqg-7ZR-5@gated-at.bofh.it>
         [not found]                   ` <5yi2X-zm-7@gated-at.bofh.it>
    2006-01-24  9:14                     ` CD writing in future Linux (stirring up a hornets' nest) (was: Rationale for RLIMIT_MEMLOCK?) Bodo Eggert
    2006-01-24 14:38                       ` Joerg Schilling
    2006-01-24 17:44                         ` CD writing in future Linux (stirring up a hornets' nest) Bodo Eggert
         [not found]               ` <5ygDT-6LK-3@gated-at.bofh.it>
         [not found]                 ` <5yscc-68j-5@gated-at.bofh.it>
         [not found]                   ` <5ysvk-6JI-5@gated-at.bofh.it>
         [not found]                     ` <5ysvk-6JI-3@gated-at.bofh.it>
         [not found]                       ` <5yEn7-7Or-21@gated-at.bofh.it>
         [not found]                         ` <5yUUI-6JR-15@gated-at.bofh.it>
    2006-01-26  0:12                           ` Rationale for RLIMIT_MEMLOCK? Bodo Eggert
    2006-01-23 10:56 Matthias Andree
    2006-01-23 11:05 ` Arjan van de Ven
    2006-01-23 16:54   ` Matthias Andree
    2006-01-23 17:00     ` Arjan van de Ven
    2006-01-23 18:01       ` Matthias Andree
    2006-01-23 18:13         ` Arjan van de Ven
    2006-01-23 18:55           ` Matthias Andree
    2006-01-23 19:38             ` Joerg Schilling
    2006-01-23 20:30               ` Lee Revell
    2006-01-23 21:21                 ` CD writing in future Linux (stirring up a hornets' nest) (was: Rationale for RLIMIT_MEMLOCK?) Matthias Andree
    2006-01-23 21:26                   ` Lee Revell
    2006-01-23 21:45                     ` Joerg Schilling
    2006-01-23 22:00                       ` Lee Revell
    2006-01-23 21:30                   ` Lee Revell
    2006-01-23 22:03                   ` Joerg Schilling
    2006-01-24 13:58                   ` Joerg Schilling
    2006-01-24 17:42                   ` Jan Engelhardt
    2006-01-25 14:04                     ` Joerg Schilling
    2006-01-25 14:21                       ` Jens Axboe
    2006-01-25 14:47                         ` Jan Engelhardt
    2006-01-25 14:55                           ` Jens Axboe
    2006-01-25 14:58                             ` Jens Axboe
    2006-01-25 17:00                             ` Joerg Schilling
    2006-01-25 17:23                               ` Jens Axboe
    2006-01-25 16:57                           ` Joerg Schilling
    2006-01-25 17:20                             ` Jens Axboe
    2006-01-25 20:16                             ` Lee Revell
    2006-01-26 21:06                             ` Jan Engelhardt
    2006-01-26 21:33                               ` Vadim Lobanov
    2006-01-26 21:48                                 ` Gene Heskett
    2006-01-26 21:34                               ` Vadim Lobanov
    2006-01-26 12:32                       ` Pavel Machek
    2006-02-02 17:17                     ` Luke-Jr
    2006-02-03 14:08                       ` Jan Engelhardt
    2006-02-03 16:50                         ` Joerg Schilling
    2006-02-03 17:24                         ` Luke-Jr
    2006-02-06 13:51                           ` Joerg Schilling
    2006-02-06 14:01                             ` Matthias Andree
    2006-02-06 15:06                             ` Peter Read
    2006-02-06 17:25                               ` Joerg Schilling
    2006-02-07 10:57                                 ` Matthias Andree
    2006-02-06 17:40                             ` Luke-Jr
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for NNTP newsgroup(s).