linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/15] SCSI XCOPY support for the kernel and device mapper
@ 2014-07-15 19:34 Mikulas Patocka
  2014-07-15 19:34 ` [PATCH 1/15] block copy: initial XCOPY offload support Mikulas Patocka
                   ` (15 more replies)
  0 siblings, 16 replies; 23+ messages in thread
From: Mikulas Patocka @ 2014-07-15 19:34 UTC (permalink / raw)
  To: Alasdair G. Kergon, Mike Snitzer, Jonathan Brassow,
	Edward Thornber, Martin K. Petersen, Jens Axboe,
	Christoph Hellwig
  Cc: dm-devel, linux-kernel, linux-scsi

This patch series makes it possible to use SCSI XCOPY offload for the 
block layer and device mapper.

It is based on Martin Petersen's work
https://git.kernel.org/cgit/linux/kernel/git/mkp/linux.git/commit/?h=xcopy&id=0bdeed274e16b3038a851552188512071974eea8,
but it is changed significantly so that it is possible to propagate XCOPY
bios through the device mapper stack.

The basic architecture is this: in the function blkdev_issue_copy we
create two bios, one for read and one for write (with bi_rw READ|REQ_COPY
and WRITE|REQ_COPY). Both bios have a pointer to the same bio_copy
structure. These two bios travel independently through the device mapper
stack - each bio can go through different device mapper devices. When both
the bios reach the physical block device (in the function blk_queue_bio)
the bio pair is collected and a XCOPY request is allocated and sent to the
scsi disk driver.

Note that because device mapper mapping can dynamically change, there no
guarantee that the XCOPY command succeeds. If it ends with an error, the
caller is supposed to perform the copying manually.

The dm-kcopyd subsystem is modified to use the XCOPY command, so device
mapper targets that use it (mirror, snapshot, thin, cache) take advantage
of copy offload automatically.

There is a new ioctl BLKCOPY that makes it possible to use copy offload
from userspace.

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [PATCH 0/15] copy offload patches
@ 2015-12-10 17:29 Mikulas Patocka
  2015-12-10 17:30 ` [PATCH 1/15] block copy: initial XCOPY offload support Mikulas Patocka
  0 siblings, 1 reply; 23+ messages in thread
From: Mikulas Patocka @ 2015-12-10 17:29 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen, Jens Axboe,
	Mike Snitzer, Jonathan Brassow
  Cc: dm-devel, linux-scsi, linux-kernel, linux-block

Hi

This patch series adds copy offload (the XCOPY command) to the block 
layer, SCSI subsystems and device mapper.

The principle of operation is this:

We create two bios with REQ_COPY flag, one for read and one for write. The 
bios have no data pages and they both point to the same bio_copy 
structure. The bios may be submitted to the same logical volume or to 
different logical volumes. The bios go independently through the device 
mapper stack and when they both reach the physical device (the function 
blk_queue_bio), the bio pair is collected and the XCOPY request is sent to 
the SCSI device.

Mikulas

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2015-12-10 17:30 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15 19:34 [PATCH 0/15] SCSI XCOPY support for the kernel and device mapper Mikulas Patocka
2014-07-15 19:34 ` [PATCH 1/15] block copy: initial XCOPY offload support Mikulas Patocka
2014-07-18 13:03   ` Tomas Henzl
2014-07-18 14:35     ` Mikulas Patocka
2014-08-04 14:09   ` Pavel Machek
2014-08-05 22:45     ` Mikulas Patocka
2014-07-15 19:35 ` [PATCH 2/15] block copy: use two bios Mikulas Patocka
2014-07-15 19:35 ` [PATCH 3/15] block copy: report the amount of copied data Mikulas Patocka
2014-07-15 19:36 ` [PATCH 4/15] block copy: use a timer to fix a theoretical deadlock Mikulas Patocka
2014-07-15 19:37 ` [PATCH 5/15] block copy: use merge_bvec_fn for copies Mikulas Patocka
2014-07-15 19:37 ` [PATCH 6/15] block copy: use asynchronous notification Mikulas Patocka
2014-07-15 19:39 ` [PATCH 7/15] dm: remove num_write_bios Mikulas Patocka
2014-07-15 19:39 ` [PATCH 8/15] dm: introduce dm_ask_for_duplicate_bios Mikulas Patocka
2014-07-15 19:40 ` [PATCH 9/15] dm: implement copy Mikulas Patocka
2014-07-15 19:40 ` [PATCH 10/15] dm linear: support copy Mikulas Patocka
2014-07-15 19:41 ` [PATCH 11/15] dm stripe: " Mikulas Patocka
2014-07-15 19:42 ` [PATCH 12/15] dm kcopyd: introduce the function submit_job Mikulas Patocka
2014-07-15 19:43 ` [PATCH 13/15] dm kcopyd: support copy offload Mikulas Patocka
2014-07-15 19:43 ` [PATCH 14/15] dm kcopyd: change mutex to spinlock Mikulas Patocka
2014-07-15 19:44 ` [PATCH 15/15] dm kcopyd: call copy offload with asynchronous callback Mikulas Patocka
2014-08-28 21:37 ` [PATCH 0/15] SCSI XCOPY support for the kernel and device mapper Mike Snitzer
2014-08-29 10:29   ` Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2015-12-10 17:29 [PATCH 0/15] copy offload patches Mikulas Patocka
2015-12-10 17:30 ` [PATCH 1/15] block copy: initial XCOPY offload support Mikulas Patocka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).