An error occurred fetching the project authors.
  1. 22 May, 2004 4 commits
    • Andrew Morton's avatar
      [PATCH] rmap 20 i_mmap_shared into i_mmap · c7a491f0
      Andrew Morton authored
      From: Hugh Dickins <hugh@veritas.com>
      
      Why should struct address_space have separate i_mmap and i_mmap_shared
      prio_trees (separating !VM_SHARED and VM_SHARED vmas)?  No good reason, the
      same processing is usually needed on both.  Merge i_mmap_shared into i_mmap,
      but keep i_mmap_writable count of VM_SHARED vmas (those capable of dirtying
      the underlying file) for the mapping_writably_mapped test.
      
      The VM_MAYSHARE test in the arm and parisc loops is not necessarily what they
      will want to use in the end: it's provided as a harmless example of what might
      be appropriate, but maintainers are likely to revise it later (that parisc
      loop is currently being changed in the parisc tree anyway).
      
      On the way, remove the now out-of-date comments on vm_area_struct size.
      c7a491f0
    • Andrew Morton's avatar
      [PATCH] rmap 16: pretend prio_tree · fc96c90f
      Andrew Morton authored
      From: Hugh Dickins <hugh@veritas.com>
      
      Pave the way for prio_tree by switching over to its interfaces, but actually
      still implement them with the same old lists as before.
      
      Most of the vma_prio_tree interfaces are straightforward.  The interesting one
      is vma_prio_tree_next, used to search the tree for all vmas which overlap the
      given range: unlike the list_for_each_entry it replaces, it does not find
      every vma, just those that match.
      
      But this does leave handling of nonlinear vmas in a very unsatisfactory state:
      for now we have to search again over the maximum range to find all the
      nonlinear vmas which might contain a page, which of course takes away the
      point of the tree.  Fixed in later patch of this batch.
      
      There is no need to initialize vma linkage all over, just do it before
      inserting the vma in list or tree.  /proc/pid/statm had an odd test for its
      shared count: simplified to an equivalent test on vm_file.
      fc96c90f
    • Andrew Morton's avatar
      [PATCH] numa api: Add shared memory support · d31d7a18
      Andrew Morton authored
      From: Andi Kleen <ak@suse.de>
      
      Add support to tmpfs and hugetlbfs to support NUMA API.  Shared memory is a
      bit of a special case for NUMA policy.  Normally policy is associated to VMAs
      or to processes, but for a shared memory segment you really want to share the
      policy.  The core NUMA API has code for that, this patch adds the necessary
      changes to tmpfs and hugetlbfs.
      
      First it changes the custom swapping code in tmpfs to follow the policy set
      via VMAs.
      
      It is also useful to have a "backing store" of policy that saves the policy
      even when nobody has the shared memory segment mapped.  This allows command
      line tools to pre configure policy, which is then later used by programs.
      
      Note that hugetlbfs needs more changes - it is also required to switch it to
      lazy allocation, otherwise the prefault prevents mbind() from working.
      d31d7a18
    • Andrew Morton's avatar
      [PATCH] Convert i_shared_sem back to a spinlock · c0868962
      Andrew Morton authored
      Having a semaphore in there causes modest performance regressions on heavily
      mmap-intensive workloads on some hardware.  Specifically, up to 30% in SDET on
      NUMAQ and big PPC64.
      
      So switch it back to being a spinlock.  This does mean that unmap_vmas() needs
      to be told whether or not it is allowed to schedule away; that's simple to do
      via the zap_details structure.
      
      This change means that there will be high scheuling latencies when someone
      truncates a large file which is currently mmapped, but nobody does that
      anyway.  The scheduling points in unmap_vmas() are mainly for munmap() and
      exit(), and they still will work OK for that.
      
      From: Hugh Dickins <hugh@veritas.com>
      
        Sorry, my premature optimizations (trying to pass down NULL zap_details
        except when needed) have caught you out doubly: unmap_mapping_range_list was
        NULLing the details even though atomic was set; and if it hadn't, then
        zap_pte_range would have missed free_swap_and_cache and pte_clear when pte
        not present.  Moved the optimization into zap_pte_range itself.  Plus
        massive documentation update.
      
      From: Hugh Dickins <hugh@veritas.com>
      
        Here's a second patch to add to the first: mremap's cows can't come home
        without releasing the i_mmap_lock, better move the whole "Subtle point"
        locking from move_vma into move_page_tables.  And it's possible for the file
        that was behind an anonymous page to be truncated while we drop that lock,
        don't want to abort mremap because of VM_FAULT_SIGBUS.
      
        (Eek, should we be checking do_swap_page of a vm_file area against the
        truncate_count sequence?  Technically yes, but I doubt we need bother.)
      
      
      - We cannot hold i_mmap_lock across move_one_page() because
        move_one_page() needs to perform __GFP_WAIT allocations of pagetable pages.
      
      - Move the cond_resched() out so we test it once per page rather than only
        when move_one_page() returns -EAGAIN.
      c0868962
  2. 10 May, 2004 1 commit
    • Andrew Morton's avatar
      [PATCH] Add sysctl to define a hugetlb-capable group · cd053a94
      Andrew Morton authored
      From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>,
            "Seth, Rohit" <rohit.seth@intel.com>
      
      This patch addresses the longstanding problem wherein Oracle needs
      CAP_IPC_LOCK to allocate SHM_HUGETLB shm memory, but people don't want to run
      Oracle as root, and capabilties are busted.
      
      Various ideas with rlimits didn't work out, mainly because these objects live
      beyond the lifetime of the user processes which establish them.
      
      What we do is to create root-writeable /proc/sys/vm/hugetlb_shm_group which
      specifies a single group ID.  Users who belong to that group may allocate
      hugepages for SHM_HUGETLB shm segments.
      
      So the sysadmin will greate a new group, say `hugepageusers', will add the
      oracle user to that group and will write that group's ID into
      /proc/sys/vm/hugetlb_shm_group.
      cd053a94
  3. 26 Apr, 2004 1 commit
    • Andrew Morton's avatar
      [PATCH] hugepage fixes · 6d576c06
      Andrew Morton authored
      From: William Lee Irwin III <wli@holomorphy.com>
      
      mm/hugetlb.c is putting the destructor in head->lru.prev not head[1].mapping;
      fix below along with nuking huge_page_release(), which simply duplicates
      put_page().
      6d576c06
  4. 12 Apr, 2004 1 commit
    • Andrew Morton's avatar
      [PATCH] hugetlb consolidation · c8b976af
      Andrew Morton authored
      From: William Lee Irwin III <wli@holomorphy.com>
      
      The following patch consolidates redundant code in various hugetlb
      implementations.  I took the liberty of renaming a few things, since the
      code was all moved anyway, and it has the benefit of helping to catch
      missed conversions and/or consolidations.
      c8b976af
  5. 18 Mar, 2004 1 commit
  6. 16 Mar, 2004 1 commit
  7. 04 Feb, 2004 2 commits
  8. 19 Jan, 2004 1 commit
    • Andrew Morton's avatar
      [PATCH] bdev: add file.f_mapping · dd503c67
      Andrew Morton authored
      From: viro@parcelfarce.linux.theplanet.co.uk <viro@parcelfarce.linux.theplanet.co.uk>
      
      New field of struct file - ->f_mapping.  We maintain the following:
      file->f_dentry->d_inode->i_mapping == file->f_mapping for all opened files.
      dd503c67
  9. 22 Oct, 2003 1 commit
  10. 01 Oct, 2003 1 commit
    • Andrew Morton's avatar
      [PATCH] Fix memory leak in hugetlbfs · b2a51555
      Andrew Morton authored
      From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      
      The hugetlbfs_fill_super() doesn't free up memory allocated for sbinfo on
      the way out in case of parsing error (and a few others).  This leads to
      memory leak If root tries to mount a hugetlbfs with invalid mount option.
      Here is a patch that fix the problem.
      b2a51555
  11. 23 Sep, 2003 1 commit
    • Andrew Morton's avatar
      [PATCH] Hugetlb FS quota accounting problem · 41cffedc
      Andrew Morton authored
      From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      
      We found a problem in hugetlbfs file system quota when using huge page
      via mmap.  The mmap method in hugetlbfs_file_operation always takes
      quota for every mmap even for pages that are already allocated on that
      inode.  This results in taxing the same hugepage multiple times and
      causing mmap to fail on existing file when quota mistakenly runs out.
      41cffedc
  12. 05 Sep, 2003 1 commit
  13. 14 Aug, 2003 2 commits
    • Andrew Morton's avatar
      [PATCH] hugetlbfs - 'recovering' too many blocks on failure · 2e710fbb
      Andrew Morton authored
      From: Zwane Mwaikambo <zwane@linuxpower.ca>
      
      The code appears to be able to add too many blocks back to
      sbinfo->free_blocks in the failure path. We first do;
      
      len = vma->vm_end - vma->vm_start;
      sbinfo->free_blocks -= len;
      
      but then later do;
      len = (vma->vm_end - vma->vma_start) + (vma->vm_pgoff << HPAGE_SHIFT)
      
      error:
      sbinfo->free_blocks += len;
      2e710fbb
    • Andrew Morton's avatar
      [PATCH] fix hugetlbfs slab corruption on umount · 1befd7a5
      Andrew Morton authored
      From: Zwane Mwaikambo <zwane@linuxpower.ca>
      
      hugetlbfs was accessing super_block->s_fs_info after free'ing it.  This was
      because it was being free'd prematurely.  I have deferred free until
      ->put_super().  I have also removed hugetlbfs_kill_super since it now is
      simply a kill_litter_super.
      1befd7a5
  14. 04 Jul, 2003 1 commit
    • Trond Myklebust's avatar
      [PATCH] Pass 'nameidata' to ->create() · 675b5da0
      Trond Myklebust authored
        - Make the VFS pass the struct nameidata as an optional argument
          to the create inode operation.
        - Patch vfs_create() to take a struct nameidata as an optional
          argument.
      675b5da0
  15. 20 Jun, 2003 2 commits
    • Andrew Morton's avatar
      [PATCH] hugetlbfs:update statfs · b8a105ff
      Andrew Morton authored
      update hugetlbfs_statfs for the statfs64() changes.
      b8a105ff
    • Andrew Morton's avatar
      [PATCH] hugetlbfs: specify size & inodes at mount · 7872c516
      Andrew Morton authored
      From: "Seth, Rohit" <rohit.seth@intel.com>
      
      - Add support for setting the filesystem's maximum size and maximum inode
        count on the mount command line.
      
        This is needed because the system admin can now set the ownership of teh
        fs to non-root users.  We don't want those users to be able to use all of
        the hugepage pool.
      
      - Prroperly update the inode creation/modification time.
      
      - Set the blocksize to HPAGE_SIZE (instead of PAGE_CACHE_SIZE).
      
      - Update Documentation/vm/hugetlbpage.txt.
      7872c516
  16. 07 Jun, 2003 1 commit
  17. 04 Jun, 2003 1 commit
    • Andrew Morton's avatar
      [PATCH] hugetlbfs: mount options and permissions · 07b71f8c
      Andrew Morton authored
      From: "Seth, Rohit" <rohit.seth@intel.com>
      
      This patch enables system administrators to more flexibly assign read/write
      permissions to files in hugetlbfs.  Mount options are added which will
      specify the uid, gid and mode of the filesystem's root directory.
      
      This patch also enables super users to do chown/chgrp on files in hugetlbfs.
      
      Also included in this patch is the support for uid, gid and mode command line
      options for mount command for hugetlbfs.
      
      The following mount options are added to hugetlbfs:
      
      	uid=value gid=value mode=value
      
      The values may be specified in hex (0xNNN), decimal or octal (0NNN).
      07b71f8c
  18. 25 May, 2003 1 commit
    • Andries E. Brouwer's avatar
      [PATCH] change get_sb prototype · 2f124a73
      Andries E. Brouwer authored
      (i) The prototypes for free_vfsmnt(), alloc_vfsmnt(), do_kern_mount()
          so far occurred in several individual c files.  Now they are in
          <linux/mount.h>.
      
      (ii) do_kern_mount() has a third argument name that is typically a
           constant.  It is called with "rootfs", "nfsd", type->name,
           "capifs", "usbdevfs", "binfmt_misc" etc.  So, it should have a
           prototype that expresses this:
      
      	do_kern_mount(const char *fstype, int flags, const char *name, void *data);
      
      This makes the ugly cast
      
      -       return do_kern_mount(type->name, 0, (char *)type->name, NULL);
      +       return do_kern_mount(type->name, 0, type->name, NULL);
      
      go away. Now do_kern_mount() calls type->get_sb(), so also get_sb()
      must have a const third argument. That is what the patch below does.
      
      If I am not mistaken, precisely two filesystems do not treat this
      argument as a constant, namely afs and cifs. A separate patch
      gives some cleanup there.
      2f124a73
  19. 07 May, 2003 1 commit
  20. 04 Mar, 2003 2 commits
    • Seth Rohit's avatar
      [PATCH] ia64: HugeTLB Page patch for IA-64 2.5.60 kernel · 6e7a4839
      Seth Rohit authored
      Please find attached a hugetlb page patch for IA-64 2.5.60 kernel .
      Changes in generic files are mostly backported from 2.5.62 (to get
      hugetlb support functioning properly).
      6e7a4839
    • Andi Kleen's avatar
      [PATCH] dcache/inode hlist patchkit · 18bc0cec
      Andi Kleen authored
       - Inode and dcache Hash table only needs half the memory/cache because
         of using hlists.
       - Simplify dcache-rcu code.  With NULL end markers in the hlists
         is_bucket is not needed anymore.  Also the list walking code
         generates better code on x86 now because it doesn't need to dedicate
         a register for the list head.
       - Reorganize struct dentry to be more cache friendly.  All the state
         accessed for the hash walk is in one chunk now together with the
         inline name (all at the end)
       - Add prefetching for all the list walks.  Old hash lookup code didn't
         use it.
       - Some other minor cleanup.
      18bc0cec
  21. 13 Feb, 2003 2 commits
  22. 06 Feb, 2003 6 commits
    • Andrew Morton's avatar
      [PATCH] Fix hugetlb_vmtruncate_list() · 8a1335e9
      Andrew Morton authored
      This function is quite wrong - has an "=" where it should have a "-" and
      confuses PAGE_SIZE and HPAGE_SIZE in its address and file offset arithmetic.
      8a1335e9
    • Andrew Morton's avatar
      [PATCH] hugetlbfs cleanups · 3cc33271
      Andrew Morton authored
      - Remove quota code.
      
      - Remove extraneous copy-n-paste code from truncate: that's only for
        physically-backed filesystems.
      
      - Whitespace changes.
      3cc33271
    • Andrew Morton's avatar
      [PATCH] hugetlbfs i_size fixes · 05732657
      Andrew Morton authored
      We're expanding hugetlbfs i_size in the wrong place.  If someone attempts to
      mmap more pages than are available, i_size is updated to reflect the
      attempted mapping size.
      
      So set i_size only when pages are successfully added to the mapping.
      
      i_size handling at truncate time is still a bit wrong - if the mapping has
      pages at (say) page offset 100-200 and the mappng is truncated to (say) page
      offset 50, i_size should be set to zero.  But it is instead set to
      50*HPAGE_SIZE.  That's harmless.
      05732657
    • Andrew Morton's avatar
      [PATCH] hugetlbfs: fix truncate · 136963d1
      Andrew Morton authored
      - Opening a hugetlbfs file O_TRUNC calls the generic vmtruncate() functions
        and nukes the kernel.
      
        Give S_ISREG hugetlbfs files a inode_operations, and hence a setattr
        which know how to handle these files.
      
      - Don't permit the user to truncate hugetlbfs files to sizes which are not
        a multiple of HPAGE_SIZE.
      
      - We don't support expanding in ftruncate(), so remove that code.
      136963d1
    • Andrew Morton's avatar
      [PATCH] get_unmapped_area for hugetlbfs · 8ca8cd5b
      Andrew Morton authored
      Having to specify the mapping address is a pain.  Give hugetlbfs files a
      file_operations.get_unmapped_area().
      
      The implementation is in hugetlbfs rather than in arch code because it's
      probably common to several architectures.  If the architecture has special
      needs it can define HAVE_ARCH_HUGETLB_UNMAPPED_AREA and go it alone.  Just
      like HAVE_ARCH_UNMAPPED_AREA.
      8ca8cd5b
    • Andrew Morton's avatar
      [PATCH] give hugetlbfs a set_page_dirty a_op · 6725839b
      Andrew Morton authored
      Seems that nobody has tested direct IO into hugetlb pages yet.  The VFS gets
      upset about running set_page_dirty() against a non-uptodate page.
      
      So give hugetlbfs inodes a private no-op ->set_page_dirty() to isolate them
      from all that.
      6725839b
  23. 14 Jan, 2003 1 commit
    • Andrew Morton's avatar
      [PATCH] hugetlbfs: don't implement read/write file_ops · 1cf1d22a
      Andrew Morton authored
      From Rohit Seth.
      
      We're currently disabling read() and write() against hugetlbfs files via the
      address_space ops.  But that's a bit awkward, and results in reads and writes
      instantiating useless, non-uptodate 4k pagecache against the inodes.
      
      The patch removes the read, write and sendfile file_operations entries.  So
      the caller will get their -EINVAL without us ever having to go to the
      pagecache layer.
      1cf1d22a
  24. 11 Jan, 2003 1 commit
    • Andrew Morton's avatar
      [PATCH] turn i_shared_lock into a semaphore · d9be9136
      Andrew Morton authored
      i_shared_lock is held for a very long time during vmtruncate() and causes
      high scheduling latencies when truncating a file which is mmapped.  I've seen
      100 milliseconds.
      
      So turn it into a semaphore.  It nests inside mmap_sem.
      
      This change is also needed by the shared pagetable patch, which needs to
      unshare pte's on the vmtruncate path - lots of pagetable pages need to
      be allocated and they are using __GFP_WAIT.
      
      The patch also makes unmap_vma() static.
      d9be9136
  25. 03 Jan, 2003 1 commit
  26. 21 Dec, 2002 1 commit
    • Andrew Morton's avatar
      [PATCH] hugetlbfs: set inode->i_size · 74bbb9c7
      Andrew Morton authored
      An `ls' in hugetlbfs currently shows all files having zero size.
      
      So, part-cosmetic, part-informative, we here set i_size to represent the
      index of the highest present page in the mapping, plus one.
      74bbb9c7
  27. 14 Dec, 2002 1 commit
    • Andrew Morton's avatar
      [PATCH] hugetlb fixes · 21c2baef
      Andrew Morton authored
      From Rohit
      
      1) hugetlbfs_zero_setup returns ENOMEM in case the request size can
         not be easily handleed.
      
      2) Preference is given to LOW_MEM while freeing the pages from
         hugetlbpage free list.
      21c2baef