GithubHelp home page GithubHelp logo

mingzhao / dm-cache Goto Github PK

View Code? Open in Web Editor NEW
164.0 164.0 45.0 1.63 MB

Generic block-level cache utility based on Linux device mapper framework

Home Page: http://visa.cis.fiu.edu/dmcache/

Perl 0.58% C 87.85% Shell 0.50% Roff 10.16% Makefile 0.22% C++ 0.70%

dm-cache's People

Contributors

bigtheta avatar dulcardo avatar gregory-turtle avatar jianyufu avatar mingzhao avatar rachel89 avatar sbromfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dm-cache's Issues

testing dm-cache

Hi, thanks for nice works.

I'm trying dm-cache 3.0.8. I like to configure it like

/dev/sda (ssd) : cache device
/dev/sdd (hdd): source device

Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders, total 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sda doesn't contain a valid partition table

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
81 heads, 63 sectors/track, 191411 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd091d92e

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048   976773167   488385560   83  Linux

And I tried the following command to initialize it:
(I think it would be better if I don't have to calculate the number of blocks in cache dev. I just like to whole ssd as a cache)

echo 0 976773168 cache /dev/sdd /dev/sda 0 8 7864320 1024 0 | dmsetup create cache1

where,
0 976773168 : whole sector range of /dev/sdd
0 8: block size = 512 * 8 = 4k
7864320: 30G cache space = 30_1024_1024*1024/4096 blocks (It's around half of its capacity)

and it fails.

My machine is

  • i686 Intel(R) Pentium(R) D CPU 3.00GHz GenuineIntel GNU/Linux
  • 1.5 GB RAM
  • Gentoo Linux, kernel-3.2.2 (vanillia)
[ 1814.716320] ------------[ cut here ]------------
[ 1814.716337] WARNING: at fs/block_dev.c:937 bd_unlink_disk_holder+0x1d6/0x1f0()
[ 1814.716344] Hardware name: OptiPlex GX620               
[ 1814.716349] Modules linked in: dm_cache(O)
[ 1814.716363] Pid: 3069, comm: dmsetup Tainted: G           O 3.2.2 #1
[ 1814.716373] Call Trace:
[ 1814.716387]  [] warn_slowpath_common+0xdc/0x160
[ 1814.716397]  [] ? bd_unlink_disk_holder+0x1d6/0x1f0
[ 1814.716406]  [] ? bd_unlink_disk_holder+0x1d6/0x1f0
[ 1814.716416]  [] warn_slowpath_null+0x3e/0x50
[ 1814.716425]  [] bd_unlink_disk_holder+0x1d6/0x1f0
[ 1814.716437]  [] close_dev+0x4d/0x90
[ 1814.716445]  [] dm_put_device+0x57/0xa0
[ 1814.716457]  [] cache_ctr+0x462/0x1840 [dm_cache]
[ 1814.716469]  [] ? _copy_from_user+0x45/0x90
[ 1814.716484]  [] ? _raw_write_unlock+0x43/0xa0
[ 1814.716495]  [] ? realloc_argv+0x3f/0xc0
[ 1814.716503]  [] ? realloc_argv+0x79/0xc0
[ 1814.716513]  [] ? realloc_argv+0x79/0xc0
[ 1814.716524]  [] ? dm_split_args+0x67/0x250
[ 1814.716536]  [] dm_table_add_target+0x176/0x630
[ 1814.716546]  [] ? alloc_targets+0x8b/0x120
[ 1814.716559]  [] table_load+0x18c/0x670
[ 1814.716571]  [] dm_ctl_ioctl+0x1cd/0x480
[ 1814.716582]  [] ? table_clear+0x100/0x100
[ 1814.716591]  [] ? copy_params+0x220/0x220
[ 1814.716601]  [] do_vfs_ioctl+0xa4/0xa80
[ 1814.716610]  [] ? sub_preempt_count+0x7d/0xa0
[ 1814.716620]  [] ? vfsmount_lock_local_unlock+0x58/0xb0
[ 1814.716629]  [] ? mntput_no_expire+0x59/0x290
[ 1814.716640]  [] ? sys_semctl+0xe3/0x140
[ 1814.716652]  [] sys_ioctl+0x76/0xd0
[ 1814.716662]  [] sysenter_do_call+0x12/0x2b
[ 1814.716673]  [] ? do_one_pass+0x4f9/0x8e0
[ 1814.716683] ---[ end trace 798168b08048292b ]---
[ 1814.716688] ------------[ cut here ]------------
[ 1814.716696] WARNING: at fs/block_dev.c:1478 blkdev_put+0x20c/0x260()
[ 1814.716701] Hardware name: OptiPlex GX620               
[ 1814.716705] Modules linked in: dm_cache(O)
[ 1814.716715] Pid: 3069, comm: dmsetup Tainted: G        W  O 3.2.2 #1
[ 1814.716720] Call Trace:
[ 1814.716729]  [] warn_slowpath_common+0xdc/0x160
[ 1814.716738]  [] ? blkdev_put+0x20c/0x260
[ 1814.716746]  [] ? blkdev_put+0x20c/0x260
[ 1814.716755]  [] warn_slowpath_null+0x3e/0x50
[ 1814.716763]  [] blkdev_put+0x20c/0x260
[ 1814.716771]  [] close_dev+0x69/0x90
[ 1814.716779]  [] dm_put_device+0x57/0xa0
[ 1814.716789]  [] cache_ctr+0x462/0x1840 [dm_cache]
[ 1814.716799]  [] ? _copy_from_user+0x45/0x90
[ 1814.716811]  [] ? _raw_write_unlock+0x43/0xa0
[ 1814.716820]  [] ? realloc_argv+0x3f/0xc0
[ 1814.716827]  [] ? realloc_argv+0x79/0xc0
[ 1814.716835]  [] ? realloc_argv+0x79/0xc0
[ 1814.716844]  [] ? dm_split_args+0x67/0x250
[ 1814.716853]  [] dm_table_add_target+0x176/0x630
[ 1814.716861]  [] ? alloc_targets+0x8b/0x120
[ 1814.716871]  [] table_load+0x18c/0x670
[ 1814.716880]  [] dm_ctl_ioctl+0x1cd/0x480
[ 1814.716889]  [] ? table_clear+0x100/0x100
[ 1814.716898]  [] ? copy_params+0x220/0x220
[ 1814.716906]  [] do_vfs_ioctl+0xa4/0xa80
[ 1814.716914]  [] ? sub_preempt_count+0x7d/0xa0
[ 1814.716922]  [] ? vfsmount_lock_local_unlock+0x58/0xb0
[ 1814.716930]  [] ? mntput_no_expire+0x59/0x290
[ 1814.716939]  [] ? sys_semctl+0xe3/0x140
[ 1814.716948]  [] sys_ioctl+0x76/0xd0
[ 1814.716957]  [] sysenter_do_call+0x12/0x2b
[ 1814.716965]  [] ? do_one_pass+0x4f9/0x8e0
[ 1814.716972] ---[ end trace 798168b08048292c ]---
[ 1814.716977] ------------[ cut here ]------------
[ 1814.716984] WARNING: at fs/block_dev.c:1479 blkdev_put+0x243/0x260()
[ 1814.716989] Hardware name: OptiPlex GX620               
[ 1814.716994] Modules linked in: dm_cache(O)
[ 1814.717003] Pid: 3069, comm: dmsetup Tainted: G        W  O 3.2.2 #1
[ 1814.717040] Call Trace:
[ 1814.717050]  [] warn_slowpath_common+0xdc/0x160
[ 1814.717059]  [] ? blkdev_put+0x243/0x260
[ 1814.717067]  [] ? blkdev_put+0x243/0x260
[ 1814.717076]  [] warn_slowpath_null+0x3e/0x50
[ 1814.717084]  [] blkdev_put+0x243/0x260
[ 1814.717093]  [] close_dev+0x69/0x90
[ 1814.717101]  [] dm_put_device+0x57/0xa0
[ 1814.717111]  [] cache_ctr+0x462/0x1840 [dm_cache]
[ 1814.717121]  [] ? _copy_from_user+0x45/0x90
[ 1814.717133]  [] ? _raw_write_unlock+0x43/0xa0
[ 1814.717143]  [] ? realloc_argv+0x3f/0xc0
[ 1814.717151]  [] ? realloc_argv+0x79/0xc0
[ 1814.717159]  [] ? realloc_argv+0x79/0xc0
[ 1814.717167]  [] ? dm_split_args+0x67/0x250
[ 1814.717177]  [] dm_table_add_target+0x176/0x630
[ 1814.717186]  [] ? alloc_targets+0x8b/0x120
[ 1814.717195]  [] table_load+0x18c/0x670
[ 1814.717205]  [] dm_ctl_ioctl+0x1cd/0x480
[ 1814.717215]  [] ? table_clear+0x100/0x100
[ 1814.717224]  [] ? copy_params+0x220/0x220
[ 1814.717232]  [] do_vfs_ioctl+0xa4/0xa80
[ 1814.717240]  [] ? sub_preempt_count+0x7d/0xa0
[ 1814.717249]  [] ? vfsmount_lock_local_unlock+0x58/0xb0
[ 1814.717257]  [] ? mntput_no_expire+0x59/0x290
[ 1814.717266]  [] ? sys_semctl+0xe3/0x140
[ 1814.717276]  [] sys_ioctl+0x76/0xd0
[ 1814.717285]  [] sysenter_do_call+0x12/0x2b
[ 1814.717294]  [] ? do_one_pass+0x4f9/0x8e0
[ 1814.717302] ---[ end trace 798168b08048292d ]---
[ 1814.724116] ------------[ cut here ]------------
[ 1814.724128] WARNING: at fs/block_dev.c:1431 __blkdev_put+0x2c1/0x2e0()
[ 1814.724134] Hardware name: OptiPlex GX620               
[ 1814.724139] Modules linked in: dm_cache(O)
[ 1814.724152] Pid: 3069, comm: dmsetup Tainted: G        W  O 3.2.2 #1
[ 1814.724158] Call Trace:
[ 1814.724169]  [] warn_slowpath_common+0xdc/0x160
[ 1814.724181]  [] ? __blkdev_put+0x2c1/0x2e0
[ 1814.724189]  [] ? __blkdev_put+0x2c1/0x2e0
[ 1814.724199]  [] warn_slowpath_null+0x3e/0x50
[ 1814.724208]  [] __blkdev_put+0x2c1/0x2e0
[ 1814.724220]  [] ? disk_flush_events+0x67/0x100
[ 1814.724229]  [] blkdev_put+0x7f/0x260
[ 1814.724239]  [] close_dev+0x69/0x90
[ 1814.724247]  [] dm_put_device+0x57/0xa0
[ 1814.724258]  [] cache_ctr+0x462/0x1840 [dm_cache]
[ 1814.724270]  [] ? _copy_from_user+0x45/0x90
[ 1814.724284]  [] ? _raw_write_unlock+0x43/0xa0
[ 1814.724294]  [] ? realloc_argv+0x3f/0xc0
[ 1814.724302]  [] ? realloc_argv+0x79/0xc0
[ 1814.724311]  [] ? realloc_argv+0x79/0xc0
[ 1814.724321]  [] ? dm_split_args+0x67/0x250
[ 1814.724333]  [] dm_table_add_target+0x176/0x630
[ 1814.724342]  [] ? alloc_targets+0x8b/0x120
[ 1814.724354]  [] table_load+0x18c/0x670
[ 1814.724366]  [] dm_ctl_ioctl+0x1cd/0x480
[ 1814.724377]  [] ? table_clear+0x100/0x100
[ 1814.724387]  [] ? copy_params+0x220/0x220
[ 1814.724396]  [] do_vfs_ioctl+0xa4/0xa80
[ 1814.724405]  [] ? sub_preempt_count+0x7d/0xa0
[ 1814.724415]  [] ? vfsmount_lock_local_unlock+0x58/0xb0
[ 1814.724424]  [] ? mntput_no_expire+0x59/0x290
[ 1814.724435]  [] ? sys_semctl+0xe3/0x140
[ 1814.724447]  [] sys_ioctl+0x76/0xd0
[ 1814.724457]  [] sysenter_do_call+0x12/0x2b
[ 1814.724467]  [] ? do_one_pass+0x4f9/0x8e0
[ 1814.724477] ---[ end trace 798168b08048292e ]---
[ 1814.724496] BUG: unable to handle kernel NULL pointer dereference at 00000004
[ 1814.724583] IP: [] dm_put_device+0x6b/0xa0
[ 1814.724637] *pde = 00000000 
[ 1814.724670] Oops: 0002 [#1] PREEMPT SMP 
[ 1814.724719] Modules linked in: dm_cache(O)
[ 1814.724766] 
[ 1814.724785] Pid: 3069, comm: dmsetup Tainted: G        W  O 3.2.2 #1 Dell Inc.                 OptiPlex GX620               /0ND237
[ 1814.724902] EIP: 0060:[] EFLAGS: 00010246 CPU: 0
[ 1814.724955] EIP is at dm_put_device+0x6b/0xa0
[ 1814.724997] EAX: 00200200 EBX: f5ab054c ECX: 00000000 EDX: 00000000
[ 1814.725015] ESI: f5ab0540 EDI: ffffffea EBP: f5b8fd48 ESP: f5b8fd40
[ 1814.725015]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[ 1814.725015] Process dmsetup (pid: 3069, ti=f5b8e000 task=f56443f0 task.ti=f5b8e000)
[ 1814.725015] Stack:
[ 1814.725015]  f84fe080 f5bae500 f5b8fe44 f880ecb2 f84f9176 f88117ba f5b8fe24 00000000
[ 1814.725015]  f5b8fd74 c153a785 00000000 f5a13ec0 f5a13f20 f5b8fdb0 f5ab0480 00000000
[ 1814.725015]  00000246 00000000 f7ffe000 80100010 00000003 00000001 000000eb 00000000
[ 1814.725015] Call Trace:
[ 1814.725015]  [] cache_ctr+0x462/0x1840 [dm_cache]
[ 1814.725015]  [] ? _copy_from_user+0x45/0x90
[ 1814.725015]  [] ? _raw_write_unlock+0x43/0xa0
[ 1814.725015]  [] ? realloc_argv+0x3f/0xc0
[ 1814.725015]  [] ? realloc_argv+0x79/0xc0
[ 1814.725015]  [] ? realloc_argv+0x79/0xc0
[ 1814.725015]  [] ? dm_split_args+0x67/0x250
[ 1814.725015]  [] dm_table_add_target+0x176/0x630
[ 1814.725015]  [] ? alloc_targets+0x8b/0x120
[ 1814.725015]  [] table_load+0x18c/0x670
[ 1814.725015]  [] dm_ctl_ioctl+0x1cd/0x480
[ 1814.725015]  [] ? table_clear+0x100/0x100
[ 1814.725015]  [] ? copy_params+0x220/0x220
[ 1814.725015]  [] do_vfs_ioctl+0xa4/0xa80
[ 1814.725015]  [] ? sub_preempt_count+0x7d/0xa0
[ 1814.725015]  [] ? vfsmount_lock_local_unlock+0x58/0xb0
[ 1814.725015]  [] ? mntput_no_expire+0x59/0x290
[ 1814.725015]  [] ? sys_semctl+0xe3/0x140
[ 1814.725015]  [] sys_ioctl+0x76/0xd0
[ 1814.725015]  [] sysenter_do_call+0x12/0x2b
[ 1814.725015]  [] ? do_one_pass+0x4f9/0x8e0
[ 1814.725015] Code: 60 01 2a c2 01 83 15 64 01 2a c2 00 8b 00 8b 10 89 f0 e8 19 ff ff ff 83 05 68 01 2a c2 01 83 15 6c 01 2a c2 00 8b 46 04 8b 53 f4 <89> 42 04 89 10 89 f0 c7 43 f4 00 01 10 00 c7 46 04 00 02 20 00 
[ 1814.725015] EIP: [] dm_put_device+0x6b/0xa0 SS:ESP 0068:f5b8fd40
[ 1814.725015] CR2: 0000000000000004
[ 1814.736052] ---[ end trace 798168b08048292f ]---

why need the dm-cache?

I'm interested in device-mapper, so I want to do something in this framework. I'm also interested in the "dm-cache", but I have a question that where can I use the dm-cache ? What's the goal of dm-cache?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.