FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 06-20-2011, 08:09 AM
Joe Thornber
 
Default dm-kcopyd/dm-snap: Don't read the origin on full chunk write

On Fri, Jun 17, 2011 at 08:32:36AM -0400, Mikulas Patocka wrote:
> Hi
>
> This optimizes full chunk writes for snapshots.
>
> Note that there is a performance bug in device mapper that it doesn't ever
> send bios larger than 4k to snapshots. So this patch optimizes only 4k
> chunk sizes. Once the 4k limit will be removed from device mapper, this
> patch could optimize any chunk size.

Nack. If you don't need to copy, don't send it to kcopyd.

- Joe

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 06-20-2011, 09:51 AM
Milan Broz
 
Default dm-kcopyd/dm-snap: Don't read the origin on full chunk write

On 06/20/2011 10:09 AM, Joe Thornber wrote:
> On Fri, Jun 17, 2011 at 08:32:36AM -0400, Mikulas Patocka wrote:
>> This optimizes full chunk writes for snapshots.
>>
>> Note that there is a performance bug in device mapper that it doesn't ever
>> send bios larger than 4k to snapshots. So this patch optimizes only 4k
>> chunk sizes. Once the 4k limit will be removed from device mapper, this
>> patch could optimize any chunk size.
>
> Nack. If you don't need to copy, don't send it to kcopyd.

I think that 4k limitation was removed almost from all the DM code
by introducing merge fn concept. Snapshots seems to be the last area...
(IMHO it was just simplification not bug - bio of page size (4k)
is always allowed so you do not need to solve bio split).

So there is another place where this restriction should be removed.

Anyway, I would like to use kcopyd later for crypt (online reencryption)
so any optimisation is welcome.

For the nack - I do not get it.
Joe, please can you explain the reasons?

Milan

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 06-20-2011, 10:03 AM
Joe Thornber
 
Default dm-kcopyd/dm-snap: Don't read the origin on full chunk write

On Mon, Jun 20, 2011 at 11:51:37AM +0200, Milan Broz wrote:
> On 06/20/2011 10:09 AM, Joe Thornber wrote:
> For the nack - I do not get it.
> Joe, please can you explain the reasons?

You know the size of the bio when you submit it. So you're saying to
kcopyd, do this copy, except if it's a particular size, then don't,
just issue the io. I don't see from Mikulas' description why kcopyd
needs to be involved in this.

For instance here's how multisnap handles it:

if (io_covers_block(pool, bio)) {
/* no copy needed, since all data is going to change */
m->bio = bio;
m->bi_end_io = bio->bi_end_io;
m->bi_private = bio->bi_private;
bio->bi_end_io = overwrite_complete;
bio->bi_private = m;
remap_and_issue(pool, bio, data_dest);

} else {
/* use kcopyd */
struct dm_io_region from, to;

from.bdev = pool->pool_dev;
from.sector = data_origin * pool->sectors_per_block;
from.count = pool->sectors_per_block;

to.bdev = pool->pool_dev;
to.sector = data_dest * pool->sectors_per_block;
to.count = pool->sectors_per_block;

r = dm_kcopyd_copy(pool->copier, &from, 1, &to,
0, copy_complete, m);
if (r < 0) {
mempool_free(m, pool->mapping_pool);
printk(KERN_ALERT "dm_kcopyd_copy() failed");
cell_error(cell);
}
}

I don't see why we want to wait for a context switch to kcopyd in
order to issue an io.

If this is about avoiding having to hook the bio endio function then
why use kcopyd rather than dm-io? (I'm not advocating this, just
asking the question).

- Joe

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 06-24-2011, 07:35 AM
Joe Thornber
 
Default dm-kcopyd/dm-snap: Don't read the origin on full chunk write

On Thu, Jun 23, 2011 at 08:25:44PM -0400, Mikulas Patocka wrote:
> Hi
>
> This is the new patch for optimizing full chunk write. dm-kcopyd provides
> only callbacks.

I'm happy with this approach, you keep bios out of the interface.

- Joe

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 09:34 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org