1. 24 7月, 2014 1 次提交
  2. 30 4月, 2013 1 次提交
  3. 10 4月, 2013 1 次提交
  4. 23 2月, 2013 1 次提交
  5. 01 11月, 2011 1 次提交
  6. 21 7月, 2011 1 次提交
    • J
      fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers · 02c24a82
      Josef Bacik 提交于
      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.
      Thanks,
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      02c24a82
  7. 21 1月, 2011 1 次提交
  8. 13 10月, 2010 1 次提交
  9. 16 9月, 2010 1 次提交
  10. 28 5月, 2010 1 次提交
  11. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      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.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      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
        file.
      
      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
         files.
      
      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
         necessary.
      
      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: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  12. 24 11月, 2009 1 次提交
  13. 02 10月, 2009 1 次提交
  14. 28 9月, 2009 1 次提交
  15. 19 9月, 2009 1 次提交
  16. 20 8月, 2009 1 次提交
  17. 11 3月, 2009 2 次提交
  18. 23 2月, 2009 1 次提交
  19. 13 1月, 2009 1 次提交
  20. 21 12月, 2008 1 次提交
    • B
      powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED · 64b3d0e8
      Benjamin Herrenschmidt 提交于
      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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      64b3d0e8
  21. 21 11月, 2008 1 次提交
    • J
      powerpc/spufs: Fix spinning in spufs_ps_fault on signal · 60657263
      Jeremy Kerr 提交于
      Currently, we can end up in an infinite loop if we get a signal
      while the kernel has faulted in spufs_ps_fault. Eg:
      
       alarm(1);
      
       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: NJeremy Kerr <jk@ozlabs.org>
      60657263
  22. 21 10月, 2008 4 次提交
    • J
      powerpc/spufs: Use kmalloc rather than kzalloc for switch log buffer · 837ef884
      Jeremy Kerr 提交于
      No need to zero the entire buffer, just the head and tail indices.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      837ef884
    • J
      powerpc/spufs: Don't spu_acquire_saved unnecessarily in regs read · f027faa2
      Jeremy Kerr 提交于
      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: NJeremy Kerr <jk@ozlabs.org>
      f027faa2
    • J
      powerpc/spufs: Don't require full buffer in switch_log read · 14f693ee
      Jeremy Kerr 提交于
      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
      read.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      14f693ee
    • J
      powerpc/spufs: Use state_mutex for switch_log locking, and prevent multiple openers · f5ed0eb6
      Jeremy Kerr 提交于
      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: NJeremy Kerr <jk@ozlabs.org>
      f5ed0eb6
  23. 25 7月, 2008 1 次提交
  24. 09 7月, 2008 5 次提交
  25. 30 6月, 2008 1 次提交
  26. 15 5月, 2008 1 次提交
  27. 30 4月, 2008 1 次提交
  28. 19 4月, 2008 1 次提交
  29. 01 4月, 2008 1 次提交
  30. 28 3月, 2008 1 次提交
  31. 27 2月, 2008 1 次提交
    • J
      [POWERPC] spufs: fix context destruction during psmap fault · d5883137
      Jeremy Kerr 提交于
      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: NJeremy Kerr <jk@ozlabs.org>
      d5883137
  32. 09 2月, 2008 1 次提交