Commit Graph

5 Commits

Author SHA1 Message Date
Yu Wang 98dfc6f267 dm: virtio-block: extend the max iov number of virtio block
It is found that windows will issue blkio operation with amount of
sectors in one request. This patch extends the max iov number of
virtio block to 256.

Tracked-On: #2962
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-04-16 15:03:04 +08:00
Conghui Chen 2ddd24e022 dm: storage: support discard command
Support DISCARD command is meaningful when eMMC usage is high or
there are lots of remove operations. For example, when Guest
Android is running, there will be lots of files being created and
removed. However, virtio-blk BE does not support DISCARD command,
data remove operation in UOS will not trigger erase in eMMC. After
period of time, the eMMC will be consumed out, and erase must be
done by eMMC firmware before writing any new data. This causes the
eMMC performance decrease in the whole system (SOS and UOS).
To solve the problem, DISCARD should be supported in virtio-blk BE.

Tracked-On: #2011
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-18 13:21:07 +08:00
Conghui Chen f71370ad81 dm: storage: rename delete to discard
To keep consistent with kernal code, change delete to discard.

Tracked-On: #2011
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-18 13:21:07 +08:00
Conghui Chen 49322ac002 dm: storage: support cache mode toggling
1. support "writeback" and "writethru" mode toggling for virtio-blk
conditionally. When starting DM with "writethru" parameter in
virtio-blk, guest OS could not toggle cache mode. When starting DM
with "writeback" parameter in virtio-blk, guest OS could toggle
cache mode.

    ------------------------------
    DM cmdline  | toggle support
    ------------+-----------------
    writeback   | yes
    writethru   | no
    ------------------------------

2. To toggle cache mode, run below command in guest OS:

    echo "write back" > /sys/devices/xxx/vdx/cache_type
OR
    echo "write through" > /sys/devices/xxx/vdx/cache_type

Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-08-10 10:33:21 +08:00
Anthony Xu bd31b1c53e initial import
internal commit: 0ab1ea615e5cfbb0687a9d593a86a7b774386076

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2018-05-11 14:44:28 +08:00