1. 23 Feb, 2013 1 commit
  2. 31 Oct, 2011 1 commit
  3. 21 Jul, 2011 1 commit
    • Josef Bacik's avatar
      fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers · 02c24a82
      Josef Bacik authored
      Btrfs needs to be able to control how filemap_write_and_wait_range() is called
      in fsync to make it less of a painful operation, so push down taking i_mutex and
      the calling of filemap_write_and_wait() down into the ->fsync() handlers.  Some
      file systems can drop taking the i_mutex altogether it seems, like ext3 and
      ocfs2.  For correctness sake I just pushed everything down in all cases to make
      sure that we keep the current behavior the same for everybody, and then each
      individual fs maintainer can make up their mind about what to do from there.
      Acked-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
  4. 21 Jan, 2011 1 commit
  5. 13 Oct, 2010 1 commit
  6. 16 Sep, 2010 1 commit
  7. 28 May, 2010 1 commit
  8. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      The script does the followings.
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
      The conversion was done in the following steps.
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
      6. percpu.h was updated not to include slab.h.
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
  9. 24 Nov, 2009 1 commit
  10. 01 Oct, 2009 1 commit
  11. 27 Sep, 2009 1 commit
  12. 18 Sep, 2009 1 commit
  13. 20 Aug, 2009 1 commit
  14. 11 Mar, 2009 2 commits
  15. 22 Feb, 2009 1 commit
  16. 13 Jan, 2009 1 commit
  17. 21 Dec, 2008 1 commit
    • Benjamin Herrenschmidt's avatar
      powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED · 64b3d0e8
      Benjamin Herrenschmidt authored
      Currently, we never set _PAGE_COHERENT in the PTEs, we just OR it in
      in the hash code based on some CPU feature bit.  We also manipulate
      _PAGE_NO_CACHE and _PAGE_GUARDED by hand in all sorts of places.
      This changes the logic so that instead, the PTE now contains
      _PAGE_COHERENT for all normal RAM pages thay have I = 0 on platforms
      that need it.  The hash code clears it if the feature bit is not set.
      It also adds some clean accessors to setup various valid combinations
      of access flags and change various bits of code to use them instead.
      This should help having the PTE actually containing the bit
      combinations that we really want.
      I also removed _PAGE_GUARDED from _PAGE_BASE on 44x and instead
      set it explicitely from the TLB miss.  I will ultimately remove it
      completely as it appears that it might not be needed after all
      but in the meantime, having it in the TLB miss makes things a
      lot easier.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: default avatarKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
  18. 20 Nov, 2008 1 commit
    • Jeremy Kerr's avatar
      powerpc/spufs: Fix spinning in spufs_ps_fault on signal · 60657263
      Jeremy Kerr authored
      Currently, we can end up in an infinite loop if we get a signal
      while the kernel has faulted in spufs_ps_fault. Eg:
       write(fd, some_spu_psmap_register_address, 4);
      - the write's copy_from_user will fault on the ps mapping, and
      signal_pending will be non-zero. Because returning from the fault
      handler will never clear TIF_SIGPENDING, so we'll just keep faulting,
      resulting in an unkillable process using 100% of CPU.
      This change returns VM_FAULT_SIGBUS if there's a fatal signal pending,
      letting us escape the loop.
      Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
  19. 21 Oct, 2008 4 commits
    • Jeremy Kerr's avatar
      powerpc/spufs: Use kmalloc rather than kzalloc for switch log buffer · 837ef884
      Jeremy Kerr authored
      No need to zero the entire buffer, just the head and tail indices.
      Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
    • Jeremy Kerr's avatar
      powerpc/spufs: Don't spu_acquire_saved unnecessarily in regs read · f027faa2
      Jeremy Kerr authored
      With most file readers (eg cat, dd), reading a context's regs file will
      result in two reads: the first to read the data, and the second to
      return EOF. Because each read performs a spu_acquire_saved, we end up
      descheduling and re-scheduling the context twice.
      This change does a simple check to see if we'd return EOF before
      calling spu_acquire_saved(), saving the extra schedule operation.
      Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
    • Jeremy Kerr's avatar
      powerpc/spufs: Don't require full buffer in switch_log read · 14f693ee
      Jeremy Kerr authored
      Currently, read() on the sputrace log will block until the read buffer
      is full. This makes it difficult to retrieve the end of the buffer, as
      the user will need to read with the right-sized buffer.
      In a similar method as 91553a1b5e0df006a3573a88d98ee7cd48a3818a, this
      change makes the switch_log return if there has already been data
      Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
    • Jeremy Kerr's avatar
      powerpc/spufs: Use state_mutex for switch_log locking, and prevent multiple openers · f5ed0eb6
      Jeremy Kerr authored
      Currently, we use ctx->mapping_lock and ctx->switch_log->lock for the
      context switch log. The mapping lock only prevents concurrent open()s,
      so we require the switch_lock->lock for reads.
      Since writes to the switch log buffer occur on context switches, we're
      better off synchronising with the state_mutex, which is held during a
      switch. Since we're serialised througout the buffer reads and writes,
      we can use the state mutex to protect open and release too, and
      can now kfree() the log buffer on release. This allows us to perform
      the switch log notify without taking any extra locks.
      Because the buffer is only present while the file is open, we can use
      it to prevent multiple simultaneous openers.
      Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
  20. 24 Jul, 2008 1 commit
  21. 09 Jul, 2008 5 commits
  22. 30 Jun, 2008 1 commit
  23. 15 May, 2008 1 commit
  24. 30 Apr, 2008 1 commit
  25. 19 Apr, 2008 1 commit
  26. 01 Apr, 2008 1 commit
  27. 28 Mar, 2008 1 commit
  28. 27 Feb, 2008 1 commit
    • Jeremy Kerr's avatar
      [POWERPC] spufs: fix context destruction during psmap fault · d5883137
      Jeremy Kerr authored
      We have a small window where a spu context may be destroyed while
      we're servicing a page fault (from another thread) to the context's
      problem state mapping.
      After we up_read() the mmap_sem, it's possible that the context is
      destroyed by its owning thread, and so the later references to ctx
      are invalid. This can maifest as a deadlock on the (now free()-ed)
      context state mutex.
      This change adds a reference to the context before we release the
      mmap_sem, so that the context cannot be destroyed.
      Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
  29. 08 Feb, 2008 3 commits
  30. 06 Feb, 2008 1 commit