We are now trying to modify flashcache(https://github.com/facebook/flashcache)
to make it request based so that
we can let cfq io-controller control the bandwidth between different
io cgroups.
A search in the dm directory tells me that only multipath is a request
based dm target and its functionality
is very simple and map_rq() is used to map the request to different underlying devices.
We can't work in this way because:
1. the request which processed by map_rq() need to be issued to
different lower devices (disk device and cache device, in flashcache), therefore the request
can't be totally remapped by simply changing its queue and returning DM_MAPIO_REMAPPED in map_rq() like multipath_map()
2. to submit bios drectly in map_rq() (by return DM_MAPIO_SUBMITTED) will cause BUG_ON(!irqs_disabled())
in dm_request_fn() because the submit_bio()->generic_make_request()->blk_queue_bio() will definitly call spin_unlock_irq to enable the irqs
As above,the interface map_rq() provided by devcie-mapper framework
is not enough for an autonomous target, like flashcache.
We propose to add a new
mk_rq interface so that we can make the requests
by ourselves.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
08-20-2012, 07:04 AM
Robin Dong
md: add new interface 'mk_rq' in target_type
From: Robin Dong <sanbai@taobao.com>
We are now trying to modify flashcache(https://github.com/facebook/flashcache)
to make it request based so that
we can let cfq io-controller control the bandwidth between different
io cgroups.
A search in the dm directory tells me that only multipath is a request
based dm target and its functionality
is very simple and map_rq() is used to map the request to different underlying devices.
We can't work in this way because:
1. the request which processed by map_rq() need to be issued to
different lower devices (disk device and cache device, in flashcache), therefore the request
can't be totally remapped by simply changing its queue and returning DM_MAPIO_REMAPPED in map_rq() like multipath_map()
2. to submit bios drectly in map_rq() (by return DM_MAPIO_SUBMITTED) will cause BUG_ON(!irqs_disabled())
in dm_request_fn() because the submit_bio()->generic_make_request()->blk_queue_bio() will definitly call spin_unlock_irq to enable the irqs
As above,the interface map_rq() provided by devcie-mapper framework
is not enough for an autonomous target, like flashcache.
We propose to add a new
mk_rq interface so that we can make the requests
by ourselves.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
09-03-2012, 02:07 AM
Robin Dong
md: add new interface 'mk_rq' in target_type
We are now trying to modify flashcache(https://github.com/facebook/flashcache)
to make it request based so that
we can let cfq io-controller control the bandwidth between different
io cgroups.
A search in the dm directory tells me that only multipath is a request
based dm target and its functionality
is very simple and map_rq() is used to map the request to different underlying devices.
We can't work in this way because:
1. the request which processed by map_rq() need to be issued to
different lower devices (disk device and cache device, in flashcache), therefore the request
can't be totally remapped by simply changing its queue and returning DM_MAPIO_REMAPPED in map_rq() like multipath_map()
2. to submit bios drectly in map_rq() (by return DM_MAPIO_SUBMITTED) will cause BUG_ON(!irqs_disabled())
in dm_request_fn() because the submit_bio()->generic_make_request()->blk_queue_bio() will definitly call spin_unlock_irq to enable the irqs
As above,the interface map_rq() provided by devcie-mapper framework
is not enough for an autonomous target, like flashcache.
We propose to add a new
mk_rq interface so that we can make the requests
by ourselves.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
09-03-2012, 02:12 AM
Robin Dong
md: add new interface 'mk_rq' in target_type
From: Robin Dong <sanbai@taobao.com>
We are now trying to modify flashcache(https://github.com/facebook/flashcache)
to make it request based so that
we can let cfq io-controller control the bandwidth between different
io cgroups.
A search in the dm directory tells me that only multipath is a request
based dm target and its functionality
is very simple and map_rq() is used to map the request to different underlying devices.
We can't work in this way because:
1. the request which processed by map_rq() need to be issued to
different lower devices (disk device and cache device, in flashcache), therefore the request
can't be totally remapped by simply changing its queue and returning DM_MAPIO_REMAPPED in map_rq() like multipath_map()
2. to submit bios drectly in map_rq() (by return DM_MAPIO_SUBMITTED) will cause BUG_ON(!irqs_disabled())
in dm_request_fn() because the submit_bio()->generic_make_request()->blk_queue_bio() will definitly call spin_unlock_irq to enable the irqs
As above,the interface map_rq() provided by devcie-mapper framework
is not enough for an autonomous target, like flashcache.
We propose to add a new
mk_rq interface so that we can make the requests
by ourselves.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
09-20-2012, 03:18 AM
Robin Dong
md: add new interface 'mk_rq' in target_type
From: Robin Dong <sanbai@taobao.com>
We are now trying to modify flashcache(https://github.com/facebook/flashcache)
to make it request based so that
we can let cfq io-controller control the bandwidth between different
io cgroups.
A search in the dm directory tells me that only multipath is a request
based dm target and its functionality
is very simple and map_rq() is used to map the request to different underlying devices.
We can't work in this way because:
1. the request which processed by map_rq() need to be issued to
different lower devices (disk device and cache device, in flashcache), therefore the request
can't be totally remapped by simply changing its queue and returning DM_MAPIO_REMAPPED in map_rq() like multipath_map()
2. to submit bios drectly in map_rq() (by return DM_MAPIO_SUBMITTED) will cause BUG_ON(!irqs_disabled())
in dm_request_fn() because the submit_bio()->generic_make_request()->blk_queue_bio() will definitly call spin_unlock_irq to enable the irqs
As above,the interface map_rq() provided by devcie-mapper framework
is not enough for an autonomous target, like flashcache.
We propose to add a new
mk_rq interface so that we can make the requests
by ourselves.
/*
* where->count may be zero if rw holds a flush and we need to
@@ -339,15 +340,26 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
}
-static void dispatch_io(int rw, unsigned int num_regions,
+static void dispatch_io(struct dm_io_request *io_req, unsigned int num_regions,
struct dm_io_region *where, struct dpages *dp,
struct io *io, int sync)
{
int i;
+ int rw = io_req->bi_rw;
struct dpages old_pages = *dp;
BUG_ON(num_regions > DM_IO_MAX_REGIONS);
@@ -362,7 +374,7 @@ static void dispatch_io(int rw, unsigned int num_regions,
for (i = 0; i < num_regions; i++) {
*dp = old_pages;
if (where[i].count || (rw & REQ_FLUSH))
- do_region(rw, i, where + i, dp, io);
+ do_region(io_req, i, where + i, dp, io);
}