1. 24 Aug, 2006 2 commits
    • ASANO Masahiro's avatar
      VFS: add lookup hint for network file systems · a634904a
      ASANO Masahiro authored
      I'm trying to speeding up mkdir(2) for network file systems.  A typical
      mkdir(2) calls two inode_operations: lookup and mkdir.  The lookup
      operation would fail with ENOENT in common case.  I think it is unnecessary
      because the subsequent mkdir operation can check it.  In case of creat(2),
      lookup operation is called with the LOOKUP_CREATE flag, so individual
      filesystem can omit real lookup.  e.g.  nfs_lookup().
      
      Here is a sample patch which uses LOOKUP_CREATE and O_EXCL on mkdir,
      symlink and mknod.  This uses the gadget for creat(2).
      
      And here is the result of a benchmark on NFSv3.
        mkdir(2) 10,000 times:
          original  50.5 sec
          patched   29.0 sec
      Signed-off-by: default avatarASANO Masahiro <masano@tnes.nec.co.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      (cherry picked from fab7bf44449b29f9d5572a5dd8adcf7c91d5bf0f commit)
      a634904a
    • Nikita Danilov's avatar
      NFS: Fix a potential deadlock in nfs_release_page · ddeff520
      Nikita Danilov authored
      nfs_wb_page() waits on request completion and, as a result, is not safe to be
      called from nfs_release_page() invoked by VM scanner as part of GFP_NOFS
      allocation. Fix possible deadlock by analyzing gfp mask and refusing to
      release page if __GFP_FS is not set.
      Signed-off-by: default avatarNikita Danilov <danilov@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      (cherry picked from 374d969debfb290bafcb41d28918dc6f7e43ce31 commit)
      ddeff520
  2. 18 Aug, 2006 8 commits
  3. 17 Aug, 2006 22 commits
  4. 16 Aug, 2006 7 commits
  5. 15 Aug, 2006 1 commit
    • Hans de Goede's avatar
      [PATCH] PATCH: 1 line 2.6.18 bugfix: modpost-64bit-fix.patch · e0e92632
      Hans de Goede authored
      There is a small but annoying bug in scripts/mod/file2alias.c which causes
      it to generate invalid aliases for input devices on 64 bit archs. This causes
      joydev.ko to not be automaticly loaded when inserting a joystick, resulting in
      a non working joystick (for the average user).
      
      In scripts/mod/file2alias.c is the following code for generating the input
      aliases:
      static void do_input(char *alias,
                           kernel_ulong_t *arr, unsigned int min, unsigned int max)
      {
              unsigned int i;
      
              for (i = min; i < max; i++)
                      if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG)))
                              sprintf(alias + strlen(alias), "%X,*", i);
      }
      
      On 32 bits systems, this correctly generates "0,*" for the first alias, "8,*"
      for the second etc.
      
      However on 64 bits it generates: "0,*20,*" resp "8,*28,*" Notice how it adds 20
      + first entry (hex) ! to the list of hex codes, which is 32 more then the first
      entry, thus is because the bit test above wraps at 32 bits instead of 64.
      
      scripts/mod/file2alias.c, line 379 reads:
                      if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG)))
      That should be:
                      if (arr[i / BITS_PER_LONG] & (1L << (i%BITS_PER_LONG)))
      
      Notice the added 'L' after the 1, otherwise that is an 32 bit int instead of a
      64 bit long, and when that int gets shifted >= 32 times, appearantly the number
      by which to shift is wrapped at 5 bits ( % 32) causing it to test a bit 32 bits
      too low.
      
      The patch below makes the nescesarry 1 char change :)
      Signed-off-by: default avatarHans de Goede <j.w.r.degoede@hhs.nl>
      Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e0e92632