1. 12 Oct, 2006 1 commit
  2. 30 Sep, 2006 1 commit
  3. 10 Jul, 2006 1 commit
    • Jens Axboe's avatar
      [PATCH] splice: fix problems with sys_tee() · aadd06e5
      Jens Axboe authored
      
      Several issues noticed/fixed:
      
      - We cannot reliably block in link_pipe() while holding both input and output
        mutexes. So do preparatory checks before locking down both mutexes and doing
        the link.
      
      - The ipipe->nrbufs vs i check was bad, because we could have dropped the
        ipipe lock in-between. This causes us to potentially look at unknown
        buffers if we were racing with someone else reading this pipe.
      Signed-off-by: default avatarJens Axboe <axboe@suse.de>
      aadd06e5
  4. 23 Jun, 2006 1 commit
  5. 04 May, 2006 4 commits
  6. 02 May, 2006 3 commits
  7. 01 May, 2006 5 commits
    • Jens Axboe's avatar
      [PATCH] vmsplice: allow user to pass in gift pages · 7afa6fd0
      Jens Axboe authored
      
      If SPLICE_F_GIFT is set, the user is basically giving this pages away to
      the kernel. That means we can steal them for eg page cache uses instead
      of copying it.
      
      The data must be properly page aligned and also a multiple of the page size
      in length.
      Signed-off-by: default avatarJens Axboe <axboe@suse.de>
      7afa6fd0
    • Jens Axboe's avatar
      [PATCH] pipe: enable atomic copying of pipe data to/from user space · f6762b7a
      Jens Axboe authored
      
      The pipe ->map() method uses kmap() to virtually map the pages, which
      is both slow and has known scalability issues on SMP. This patch enables
      atomic copying of pipe pages, by pre-faulting data and using kmap_atomic()
      instead.
      
      lmbench bw_pipe and lat_pipe measurements agree this is a Good Thing. Here
      are results from that on a UP machine with highmem (1.5GiB of RAM), running
      first a UP kernel, SMP kernel, and SMP kernel patched.
      
      Vanilla-UP:
      Pipe bandwidth: 1622.28 MB/sec
      Pipe bandwidth: 1610.59 MB/sec
      Pipe bandwidth: 1608.30 MB/sec
      Pipe latency: 7.3275 microseconds
      Pipe latency: 7.2995 microseconds
      Pipe latency: 7.3097 microseconds
      
      Vanilla-SMP:
      Pipe bandwidth: 1382.19 MB/sec
      Pipe bandwidth: 1317.27 MB/sec
      Pipe bandwidth: 1355.61 MB/sec
      Pipe latency: 9.6402 microseconds
      Pipe latency: 9.6696 microseconds
      Pipe latency: 9.6153 microseconds
      
      Patched-SMP:
      Pipe bandwidth: 1578.70 MB/sec
      Pipe bandwidth: 1579.95 MB/sec
      Pipe bandwidth: 1578.63 MB/sec
      Pipe latency: 9.1654 microseconds
      Pipe latency: 9.2266 microseconds
      Pipe latency: 9.1527 microseconds
      Signed-off-by: default avatarJens Axboe <axboe@suse.de>
      f6762b7a
    • Jens Axboe's avatar
      [PATCH] splice: call handle_ra_miss() on failure to lookup page · e27dedd8
      Jens Axboe authored
      
      Notify the readahead logic of the missing page. Suggested by
      Oleg Nesterov.
      Signed-off-by: default avatarJens Axboe <axboe@suse.de>
      e27dedd8
    • Jens Axboe's avatar
      [PATCH] pipe: introduce ->pin() buffer operation · f84d7519
      Jens Axboe authored
      
      The ->map() function is really expensive on highmem machines right now,
      since it has to use the slower kmap() instead of kmap_atomic(). Splice
      rarely needs to access the virtual address of a page, so it's a waste
      of time doing it.
      
      Introduce ->pin() to take over the responsibility of making sure the
      page data is valid. ->map() is then reduced to just kmap(). That way we
      can also share a most of the pipe buffer ops between pipe.c and splice.c
      Signed-off-by: default avatarJens Axboe <axboe@suse.de>
      f84d7519
    • Jens Axboe's avatar
      [PATCH] splice: fix bugs in pipe_to_file() · 0568b409
      Jens Axboe authored
      
      Found by Oleg Nesterov <oleg@tv-sign.ru>, fixed by me.
      
      - Only allow full pages to go to the page cache.
      - Check page != buf->page instead of using PIPE_BUF_FLAG_STOLEN.
      - Remember to clear 'stolen' if add_to_page_cache() fails.
      
      And as a cleanup on that:
      
      - Make the bottom fall-through logic a little less convoluted. Also make
        the steal path hold an extra reference to the page, so we don't have
        to differentiate between stolen and non-stolen at the end.
      Signed-off-by: default avatarJens Axboe <axboe@suse.de>
      0568b409
  8. 30 Apr, 2006 1 commit
  9. 27 Apr, 2006 2 commits
  10. 26 Apr, 2006 4 commits
  11. 20 Apr, 2006 1 commit
  12. 19 Apr, 2006 5 commits
  13. 11 Apr, 2006 8 commits
  14. 10 Apr, 2006 3 commits
    • Ingo Molnar's avatar
      [PATCH] splice: add optional input and output offsets · 529565dc
      Ingo Molnar authored
      
      add optional input and output offsets to sys_splice(), for seekable file
      descriptors:
      
       asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
                                  int fd_out, loff_t __user *off_out,
                                  size_t len, unsigned int flags);
      
      semantics are straightforward: f_pos will be updated with the offset
      provided by user-space, before the splice transfer is about to begin.
      Providing a NULL offset pointer means the existing f_pos will be used
      (and updated in situ).  Providing an offset for a pipe results in
      -ESPIPE. Providing an invalid offset pointer results in -EFAULT.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarJens Axboe <axboe@suse.de>
      529565dc
    • Ingo Molnar's avatar
      [PATCH] introduce a "kernel-internal pipe object" abstraction · 3a326a2c
      Ingo Molnar authored
      
      separate out the 'internal pipe object' abstraction, and make it
      usable to splice. This cleans up and fixes several aspects of the
      internal splice APIs and the pipe code:
      
       - pipes: the allocation and freeing of pipe_inode_info is now more symmetric
         and more streamlined with existing kernel practices.
      
       - splice: small micro-optimization: less pointer dereferencing in splice
         methods
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      
      Update XFS for the ->splice_read/->splice_write changes.
      Signed-off-by: default avatarJens Axboe <axboe@suse.de>
      3a326a2c
    • Jens Axboe's avatar
      [PATCH] splice: be smarter about calling do_page_cache_readahead() · 0b749ce3
      Jens Axboe authored
      
      We don't want to call into the read-ahead logic unless we are at the
      start of a page, _or_ we have multiple pages to read.
      Signed-off-by: default avatarJens Axboe <axboe@suse.de>
      0b749ce3