2018-04-05 22:29 GMT+08:00 Jens Axboe <ax...@kernel.dk>:
> On 4/5/18 4:09 AM, Weiping Zhang wrote:
>> Hi,
>>
>> For virtio block device, actually there is no a hard limit for max request
>> size, and virtio_blk driver set -1 to blk_queue_max_hw_sectors(q, -1U);
blk_queue_max_hw_sectors_no_limit to set a proper max reqeust size.
Weiping Zhang (2):
blk-setting: add new helper blk_queue_max_hw_sectors_no_limit
virtio_blk: add new module parameter to set max request size
block/blk-settings.c | 20
drivers/block/virtio_blk.c | 32
There is a default upper limitation BLK_DEF_MAX_SECTORS, but for
some virtual block device driver there is no such limitation. So
add a new help to set max request size.
Signed-off-by: Weiping Zhang <zhangweip...@didichuxing.com>
---
block/blk-settings.c | 20
i
Actually there is no upper limitation, so add new module parameter
to provide a way to set a proper max request size for virtio block.
Using a larger request size can improve sequence performance in theory,
and reduce the interaction between guest and hypervisor.
Signed-off-by: Weiping Zhang
make features string more readable, add space every 8bit.
example:
00101010 0111 1100
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/virtio/virtio.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virt
led.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
Reviewed-by: Cornelia Huck <coh...@redhat.com>
---
drivers/misc/mic/vop/vop_main.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic
rproc_virtio_dev_release will be called iff virtio_device.dev's
reference count drops to 0. Here we just put vdev.dev, and then
rproc->dev's cleanup will be done in rproc_virtio_dev_release.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/remoteproc/remoteproc
led.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
Reviewed-by: Cornelia Huck <coh...@redhat.com>
---
drivers/virtio/virtio_pci_common.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci_common.c
b/drivers/virtio/virt
In order to make caller do a simple cleanup, we split device_register
into device_initialize and device_add. device_initialize always succeeds,
so the caller can always use put_device when register_virtio_device faild.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
Sug
add comments in commit message for why using put_device
* virtio_vop: also use put_device int _vop_remove_device
weiping zhang (4):
virtio: split device_register into device_initialize and device_add
virtio_pci: don't kfree device on register failure
virtio_vop: don't kfree device on regi
2017-12-21 0:12 GMT+08:00 Cornelia Huck <coh...@redhat.com>:
> On Wed, 20 Dec 2017 12:27:33 +0800
> weiping zhang <zwp10...@gmail.com> wrote:
>
>> rproc_virtio_dev_release will be called iff virtio_device.dev's
>> refer count became to 0. Here we should
2017-12-21 10:37 GMT+08:00 weiping zhang <zwp10...@gmail.com>:
> 2017-12-20 23:53 GMT+08:00 Cornelia Huck <coh...@redhat.com>:
>> On Wed, 20 Dec 2017 12:26:25 +0800
>> weiping zhang <zwp10...@gmail.com> wrote:
>>
>> [you used a different mail addre
2017-12-20 23:53 GMT+08:00 Cornelia Huck <coh...@redhat.com>:
> On Wed, 20 Dec 2017 12:26:25 +0800
> weiping zhang <zwp10...@gmail.com> wrote:
>
> [you used a different mail address in your From: than in your s-o-b:;
> same for the other patches]
>
>> In orde
off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/remoteproc/remoteproc_virtio.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/remoteproc_virtio.c
b/drivers/remoteproc/remoteproc_virtio.c
index 2946348..1073ea3 100644
---
led.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/misc/mic/vop/vop_main.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic/vop/vop_main.c
index a341938..3633202 100644
--- a/dri
In order to make caller do a simple cleanup, we split device_register
into device_initialize and device_add. device_initialize always sucess,
the caller can always use put_device when fail to register virtio_device
no matter fail at ida_simple_get or at device_add.
Signed-off-by: weiping zhang
led.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/virtio/virtio_pci_common.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci_common.c
b/drivers/virtio/virtio_pci_common.c
index 1c4797e..48d4d1c 100644
--- a/drive
use put_device when fail to register virtio
device.
v2->v3:
* virtio: add new helper do get device's status then determine use
put_device or kfree.
v1->v2:
* virtio_pci: add comments in commit message for why using put_device
* virtio_vop: also use put_device int _vop_remove_device
weip
een initialized.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/virtio/virtio.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index c5b057bd..4f0718b 100644
--- a/drivers/virtio/virtio.c
+++ b/drive
off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/remoteproc/remoteproc_virtio.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/remoteproc/remoteproc_virtio.c
b/drivers/remoteproc/remoteproc_virtio.c
index 2946348..ad5d6d1 100644
--- a/drivers/r
led.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/misc/mic/vop/vop_main.c | 17 +++--
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic/vop/vop_main.c
index a341938..53eaa9d 100644
--- a/drivers
add helper function to simplify dev->config->get_status().
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/virtio/virtio.c | 6 ++
include/linux/virtio_config.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/drivers/virtio/virtio.c b/dr
.
weiping zhang (5):
virtio: add helper virtio_get_status
virtio_pci: don't kfree device on register failure
virtio_vop: don't kfree device on register failure
virtio_remoteproc: don't kfree device on register failure
virtio: add comments for virtio_register_device
drivers/misc/mic/vop
; > > [3.810220] ret_from_fork+0x10/0x18
>> > >
>> > > To fix this, we can simply rip out the explicit cleanup that the devm
>> > > infrastructure will do for us when our probe function returns an error
>> > > code, or when our remove function returns.
&g
2017-12-15 3:13 GMT+08:00 Michael S. Tsirkin <m...@redhat.com>:
> On Tue, Dec 12, 2017 at 09:24:02PM +0800, weiping zhang wrote:
>> As mentioned at drivers/base/core.c:
>> /*
>> * NOTE: _Never_ directly free @dev after calling this function, even
>> * if
2017-12-12 22:45 GMT+08:00 Mark Rutland <mark.rutl...@arm.com>:
> On Tue, Dec 12, 2017 at 10:26:24PM +0800, weiping zhang wrote:
>> 2017-12-12 21:45 GMT+08:00 Mark Rutland <mark.rutl...@arm.com>:
>> Hi Mark,
>
> Hi,
>
>> thanks your patch, I dig into the
rproc_virtio_dev_release will be called iff virtio_device.dev's
refer count became to 0. Here we should put vdev.dev, and then
rproc->dev's cleanup will be done in rproc_virtio_dev_release.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
Reviewed-by: Cornelia Huck <coh..
led.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
Reviewed-by: Cornelia Huck <coh...@redhat.com>
---
drivers/virtio/virtio_pci_common.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/virtio/virtio_pci_common.c
b
.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/misc/mic/vop/vop_main.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic/vop/vop_main.c
index a341938..456e969 100644
--- a/drivers/mi
This series fix the cleanup for the caller of register_virtio_device,
the main work is use put_device instead of kfree.
V1->V2:
* virtio_pci: add comments for the reason use put_device
* virtio vop: also use put_device in in _vop_remove_device()
weiping zhang (3):
virtio_pci: use put_dev
On Tue, Dec 12, 2017 at 11:17:42AM +0100, Cornelia Huck wrote:
> On Mon, 11 Dec 2017 23:55:26 +0800
> weiping zhang <zhangweip...@didichuxing.com> wrote:
>
> > don't free vp_vdev until vp_vdev.dev.release be called.
>
> Same comment as for the virtio_pci p
On Tue, Dec 12, 2017 at 11:00:25AM +0100, Cornelia Huck wrote:
> On Mon, 11 Dec 2017 23:55:16 +0800
> weiping zhang <zhangweip...@didichuxing.com> wrote:
>
> > don't free vp_dev until vp_dev->vdev.dev.release be called.
>
> Maybe add the same description a
don't free vp_dev until vp_dev->vdev.dev.release be called.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/virtio/virtio_pci_common.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/virtio/virtio_pci_common.c
rproc_virtio_dev_release will be called iff virtio_device.dev's
refer count became to 0. Here we should put vdev.dev, and then
rproc->dev's cleanup will be done in rproc_virtio_dev_release.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/remoteproc/remoteproc_vir
don't free vp_vdev until vp_vdev.dev.release be called.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/misc/mic/vop/vop_main.c | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/m
This series fix the cleanup for the caller of register_virtio_device,
the main work is use put_device instead of kfree.
weiping zhang (3):
virtio_pci: use put_device instead of kfree
virtio: use put_device instead of kfree
virtio: put reference count of virtio_device.dev
drivers/misc/mic
.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/virtio/virtio_mmio.c | 51 +++-
1 file changed, 41 insertions(+), 10 deletions(-)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 74dc717..ec40104
this patchset try to add cleanup for virtio_mmio driver, include
virtio_mmio_probe and virtio_mmio_remove
weiping zhang (2):
virtio_mmio: add cleanup for virtio_mmio_probe
virtio_mmio: add cleanup for virtio_mmio_remove
drivers/virtio/virtio_mmio.c | 57
cleanup all resource allocated by virtio_mmio_probe.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/virtio/virtio_mmio.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index ec40104..a9192fe
2017-12-06 19:11 GMT+08:00 Cornelia Huck <coh...@redhat.com>:
> On Tue, 5 Dec 2017 19:57:10 +0800
> weiping zhang <zhangweip...@didichuxing.com> wrote:
>
>> As mentioned at drivers/base/core.c:
>> /*
>> * NOTE: _Never_ directly free @dev after calling t
), but in this case
we need release @mem resource from @pdev and vm_dev->base. It make
@pdev->vm_dev.dev.release() too complicated, so put_device just put the
reference of register_virtio_device->device_register->device_initialize
and release all resource in virtio_mmio_probe.
Signed-off-by: w
this patchset try to add cleanup for virtio_mmio driver, include
virtio_mmio_probe and virtio_mmio_remove
weiping zhang (2):
virtio_mmio: add cleanup for virtio_mmio_probe
virtio_mmio: add cleanup for virtio_mmio_remove
drivers/virtio/virtio_mmio.c | 43
cleanup all resource allocated by virtio_mmio_probe.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/virtio/virtio_mmio.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index f984510..5e2ca34
2017-12-04 18:24 GMT+08:00 Cornelia Huck <coh...@redhat.com>:
> On Sat, 2 Dec 2017 01:51:40 +0800
> weiping zhang <zwp10...@gmail.com> wrote:
>
>> cleanup all resource allocated by virtio_mmio_probe.
>>
>> Signed-off-by: weiping zhang <zhangweip...@
2017-12-04 17:38 GMT+08:00 Cornelia Huck <coh...@redhat.com>:
> On Sat, 2 Dec 2017 00:55:39 +0800
> weiping zhang <zwp10...@gmail.com> wrote:
>
>> On Wed, Nov 29, 2017 at 10:50:44AM +0100, Cornelia Huck wrote:
>
>> > We hold an extra reference to
index can be reused by other virtio device.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/virtio/virtio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 48230a5..bf7ff39 100644
--- a/drivers/virtio/vi
cleanup all resource allocated by virtio_mmio_probe.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/virtio/virtio_mmio.c | 34 ++
1 file changed, 26 insertions(+), 8 deletions(-)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/
2017-12-02 0:55 GMT+08:00 weiping zhang <zwp10...@gmail.com>:
> On Wed, Nov 29, 2017 at 10:50:44AM +0100, Cornelia Huck wrote:
>> On Wed, 29 Nov 2017 09:23:01 +0800
>> weiping zhang <zwp10...@gmail.com> wrote:
>>
>> > index can be reused by other virti
index can be reused by other virtio device.
Signed-off-by: weiping zhang <zhangweip...@didichuxing.com>
---
drivers/virtio/virtio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 48230a5..bf7ff39 100644
--- a/drivers/virtio/vi
49 matches
Mail list logo