1. 28 Oct, 2004 4 commits
    • Hugh Dickins's avatar
      [PATCH] statm: shared = rss - anon_rss · 8586febd
      Hugh Dickins authored
      The third "shared" field of /proc/$pid/statm in 2.4 was a count of pages in
      the mm whose page_count is more than 1 (oddly, including pages shared just
      with swapcache).  That's too costly to calculate each time, so 2.6 changed
      it to the total file-backed extent.  But Andrea knows apps and users
      surprised when (rss - shared) goes negative: we need to provide an rss-like
      statistic, close to the 2.4 interpretation.
      
      Something that's quick and easy to maintain accurately is mm->anon_rss, the
      count of anonymous pages in the mm.  Then shared = rss - anon_rss gives a
      pretty good and meaningful approximation to 2.4's intention: wli confirms
      that this will be useful to Oracle too.
      
      Where to show it?  I think it's best to treat this as a bugfix and show it
      in the third field of /proc/$pid/statm, after resident, as before - there's
      no evidence that the total file-backed extent was found useful.
      
      Albert would like other fields to revert to page counts, but that's a lot
      harder: if mprotect can change the category of a page, then it can't be
      accounted as simply as this.  Only go that route if real need shown.
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Acked-by: default avatarWilliam Irwin <wli@holomorphy.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      8586febd
    • Hugh Dickins's avatar
      [PATCH] statm: __vm_stat_accounting · da63671a
      Hugh Dickins authored
      The procfs shared_vm accounting in do_mmap_pgoff didn't balance with munmap
      in the case of shared anonymous: because file comes in NULL, whereas
      vm_file gets set at the end by shmem_zero_setup.
      
      Update file; and update vm_flags (a driver is likely to add VM_IO or
      VM_RESERVED, modifying reserved_vm); and update pgoff (doesn't affect
      procfs accounting, but could affect vma_merge - though at present all
      drivers which modify vm_pgoff set a VM_SPECIAL which prevents merging). 
      And do that __vm_stat_account before advancing to make_pages_present.
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Acked-by: default avatarWilliam Irwin <wli@holomorphy.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      da63671a
    • Hugh Dickins's avatar
      [PATCH] shmem NUMA policy spinlock · 64450ca0
      Hugh Dickins authored
      The NUMA policy for shared memory or tmpfs page allocation was protected by
      a semaphore.  It helps to improve scalability if we change that to a
      spinlock (and there's only one place that needs to drop and reacquire). 
      Oh, and don't even bother to get the spinlock while the tree is empty.
      Acked-by: default avatarAndi Kleen <ak@suse.de>
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      64450ca0
    • David Howells's avatar
      [PATCH] move key_init to security_initcall · 81fc7a04
      David Howells authored
      During system boot many probes, etc.  will generate upcalls to userspace
      via call_usermodehelper().  This has the effect of calling execve() before
      the key subsystem has been initialized, and thus Oopsing on a NULL key_jar
      during key_alloc().  Move key_init to security_initcall so that it's called
      along with other security initialization routines which have similar
      requirements.
      Signed-off-by: default avatarChris Wright <chrisw@osdl.org>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      81fc7a04
  2. 27 Oct, 2004 28 commits
  3. 28 Oct, 2004 1 commit
  4. 27 Oct, 2004 7 commits