1. 21 10月, 2008 1 次提交
  2. 20 10月, 2008 2 次提交
    • J
      message queues: increase range limits · b231cca4
      Joe Korty 提交于
      Increase the range of various posix message queue limits.
      
      Posix gives the message queue user the ability to 'trade off' the maximum
      size of messages with the number of possible messages that can be 'in
      flight'.  Linux currently makes this trade off more restrictive than it
      needs to be.
      
      In particular, the maximum message size today can be made no smaller than
      8192.  This greatly restricts those applications that would like to have
      the ability to post large numbers of very small messages.
      
      So this task lowers the limit that the maximum message size can be set to,
      from 8192 to 128.  It also lowers the limit that the maximum #number of
      messages in flight can be set to, from 10 to 1.
      
      With these changes the message queue user can make better trade offs
      between #messages and message size, in order to get everything to fit
      within the setrlimit(RLIMIT_MSGQUEUE) limit for that particular user.
      
      This patch also applies the values in
      
      	/proc/sys/fs/mqueue/msg_max
      	/proc/sys/fs/mqueue/msgsize_max
      
      as the defaults for the max #messages allowed and the max message size
      allowed, respectively, for those applications that do not supply these.
      Previously, the defaults were hardwired to 10 and 8192, respectively.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NJoe Korty <joe.korty@ccur.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Manfred Spraul <manfred@colorfullife.com>
      Cc: Nadia Derbey <Nadia.Derbey@bull.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b231cca4
    • L
      SHM_LOCKED pages are unevictable · 89e004ea
      Lee Schermerhorn 提交于
      Shmem segments locked into memory via shmctl(SHM_LOCKED) should not be
      kept on the normal LRU, since scanning them is a waste of time and might
      throw off kswapd's balancing algorithms.  Place them on the unevictable
      LRU list instead.
      
      Use the AS_UNEVICTABLE flag to mark address_space of SHM_LOCKed shared
      memory regions as unevictable.  Then these pages will be culled off the
      normal LRU lists during vmscan.
      
      Add new wrapper function to clear the mapping's unevictable state when/if
      shared memory segment is munlocked.
      
      Add 'scan_mapping_unevictable_page()' to mm/vmscan.c to scan all pages in
      the shmem segment's mapping [struct address_space] for evictability now
      that they're no longer locked.  If so, move them to the appropriate zone
      lru list.
      
      Changes depend on [CONFIG_]UNEVICTABLE_LRU.
      
      [kosaki.motohiro@jp.fujitsu.com: revert shm change]
      Signed-off-by: NLee Schermerhorn <lee.schermerhorn@hp.com>
      Signed-off-by: NRik van Riel <riel@redhat.com>
      Signed-off-by: NKosaki Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      89e004ea
  3. 17 10月, 2008 2 次提交
  4. 27 7月, 2008 2 次提交
  5. 26 7月, 2008 8 次提交
  6. 25 7月, 2008 1 次提交
  7. 13 6月, 2008 1 次提交
    • P
      /proc/sysvipc/shm: fix 32-bit truncation of segment sizes · 6c826818
      Paul Menage 提交于
      sysvipc_shm_proc_show() picks between format strings (based on the
      expected maximum length of a SHM segment) in a way that prevents gcc from
      performing format checks on the seq_printf() parameters.  This hid two
      format errors - shp->shm_segsz and shp->shm_nattach are both unsigned
      long, but were being printed as unsigned int and signed int respectively.
      This leads to 32-bit truncation of SHM segment sizes reported in
      /proc/sysvipc/shm.  (And for nattach, but that's less of a problem for
      most users).
      
      This patch makes the format string directly visible to gcc's format
      specifier checker, and fixes the two broken format specifiers.
      Signed-off-by: NPaul Menage <menage@google.com>
      Cc: Nadia Derbey <Nadia.Derbey@bull.net>
      Cc: Manfred Spraul <manfred@colorfullife.com>
      Cc: Pierre Peiffer <peifferp@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6c826818
  8. 10 6月, 2008 1 次提交
  9. 07 6月, 2008 1 次提交
  10. 06 6月, 2008 1 次提交
  11. 04 5月, 2008 1 次提交
  12. 29 4月, 2008 19 次提交