1. 26 Sep, 2012 2 commits
    • Mikulas Patocka's avatar
      percpu-rw-semaphore: fix documentation typos · e6b5c082
      Mikulas Patocka authored
      One more patch for this thing, fixing some typos in the documentation.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    • Mikulas Patocka's avatar
      blockdev: turn a rw semaphore into a percpu rw semaphore · 62ac665f
      Mikulas Patocka authored
      This avoids cache line bouncing when many processes lock the semaphore
      for read.
      New percpu lock implementation
      The lock consists of an array of percpu unsigned integers, a boolean
      variable and a mutex.
      When we take the lock for read, we enter rcu read section, check for a
      "locked" variable. If it is false, we increase a percpu counter on the
      current cpu and exit the rcu section. If "locked" is true, we exit the
      rcu section, take the mutex and drop it (this waits until a writer
      finished) and retry.
      Unlocking for read just decreases percpu variable. Note that we can
      unlock on a difference cpu than where we locked, in this case the
      counter underflows. The sum of all percpu counters represents the number
      of processes that hold the lock for read.
      When we need to lock for write, we take the mutex, set "locked" variable
      to true and synchronize rcu. Since RCU has been synchronized, no
      processes can create new read locks. We wait until the sum of percpu
      counters is zero - when it is, there are no readers in the critical
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
  2. 20 Sep, 2012 1 commit
    • Martin K. Petersen's avatar
      block: Implement support for WRITE SAME · 4363ac7c
      Martin K. Petersen authored
      The WRITE SAME command supported on some SCSI devices allows the same
      block to be efficiently replicated throughout a block range. Only a
      single logical block is transferred from the host and the storage device
      writes the same data to all blocks described by the I/O.
      This patch implements support for WRITE SAME in the block layer. The
      blkdev_issue_write_same() function can be used by filesystems and block
      drivers to replicate a buffer across a block range. This can be used to
      efficiently initialize software RAID devices, etc.
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Acked-by: default avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
  3. 09 Sep, 2012 1 commit
    • Kent Overstreet's avatar
      block: Kill bi_destructor · 4254bba1
      Kent Overstreet authored
      Now that we've got generic code for freeing bios allocated from bio
      pools, this isn't needed anymore.
      This patch also makes bio_free() static, since without bi_destructor
      there should be no need for it to be called anywhere else.
      bio_free() is now only called from bio_put, so we can refactor those a
      bit - move some code from bio_put() to bio_free() and kill the redundant
      bio->bi_next = NULL.
      v5: Switch to BIO_KMALLOC_POOL ((void *)~0), per Boaz
      v6: BIO_KMALLOC_POOL now NULL, drop bio_free's EXPORT_SYMBOL
      v7: No #define BIO_KMALLOC_POOL anymore
      Signed-off-by: default avatarKent Overstreet <koverstreet@google.com>
      CC: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
  4. 29 Aug, 2012 1 commit
  5. 27 Aug, 2012 1 commit
  6. 23 Aug, 2012 1 commit
  7. 21 Aug, 2012 2 commits
  8. 20 Aug, 2012 1 commit
  9. 17 Aug, 2012 1 commit
  10. 16 Aug, 2012 1 commit
  11. 14 Aug, 2012 1 commit
  12. 11 Aug, 2012 1 commit
  13. 10 Aug, 2012 1 commit
  14. 09 Aug, 2012 3 commits
  15. 07 Aug, 2012 1 commit
  16. 04 Aug, 2012 1 commit
  17. 03 Aug, 2012 1 commit
  18. 01 Aug, 2012 9 commits
  19. 31 Jul, 2012 10 commits