search for: kstrtouint

Displaying 10 results from an estimated 10 matches for "kstrtouint".

2019 May 13
2
[PATCH v2 8/8] vsock/virtio: make the RX buffer size tunable
...truct virtio_vsock { > u32 guest_cid; > }; > > +static unsigned int rx_buf_size = VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE; > + > +static int param_set_rx_buf_size(const char *val, const struct kernel_param *kp) > +{ > + unsigned int size; > + int ret; > + > + ret = kstrtouint(val, 0, &size); > + if (ret) > + return ret; > + > + if (size < VIRTIO_VSOCK_MIN_PKT_BUF_SIZE || > + size > VIRTIO_VSOCK_MAX_PKT_BUF_SIZE) > + return -EINVAL; > + > + return param_set_uint(val, kp); > +}; > + > +static const struct kernel_param_ops p...
2019 May 13
2
[PATCH v2 8/8] vsock/virtio: make the RX buffer size tunable
...truct virtio_vsock { > u32 guest_cid; > }; > > +static unsigned int rx_buf_size = VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE; > + > +static int param_set_rx_buf_size(const char *val, const struct kernel_param *kp) > +{ > + unsigned int size; > + int ret; > + > + ret = kstrtouint(val, 0, &size); > + if (ret) > + return ret; > + > + if (size < VIRTIO_VSOCK_MIN_PKT_BUF_SIZE || > + size > VIRTIO_VSOCK_MAX_PKT_BUF_SIZE) > + return -EINVAL; > + > + return param_set_uint(val, kp); > +}; > + > +static const struct kernel_param_ops p...
2018 Apr 05
0
[RFC PATCH 2/2] virtio_blk: add new module parameter to set max request size
...ize_ops, &max_request_size, + 0444); +MODULE_PARM_DESC(max_request_size, "set max request size, in unit of KiB"); + +static int max_request_size_set(const char *val, const struct kernel_param *kp) +{ + int ret; + unsigned int size_kb, page_kb = 1 << (PAGE_SHIFT - 10); + + ret = kstrtouint(val, 10, &size_kb); + if (ret != 0) + return -EINVAL; + + if (size_kb < page_kb) + return -EINVAL; + + return param_set_uint(val, kp); +} + static inline blk_status_t virtblk_result(struct virtblk_req *vbr) { switch (vbr->status) { @@ -730,8 +758,8 @@ static int virtblk_probe(struct...
2019 May 10
0
[PATCH v2 8/8] vsock/virtio: make the RX buffer size tunable
...++ b/net/vmw_vsock/virtio_transport.c @@ -66,6 +66,31 @@ struct virtio_vsock { u32 guest_cid; }; +static unsigned int rx_buf_size = VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE; + +static int param_set_rx_buf_size(const char *val, const struct kernel_param *kp) +{ + unsigned int size; + int ret; + + ret = kstrtouint(val, 0, &size); + if (ret) + return ret; + + if (size < VIRTIO_VSOCK_MIN_PKT_BUF_SIZE || + size > VIRTIO_VSOCK_MAX_PKT_BUF_SIZE) + return -EINVAL; + + return param_set_uint(val, kp); +}; + +static const struct kernel_param_ops param_ops_rx_buf_size = { + .set = param_set_rx_buf_size...
2019 May 13
0
[PATCH v2 8/8] vsock/virtio: make the RX buffer size tunable
...gt; ? }; >> ? +static unsigned int rx_buf_size = VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE; >> + >> +static int param_set_rx_buf_size(const char *val, const struct >> kernel_param *kp) >> +{ >> +??? unsigned int size; >> +??? int ret; >> + >> +??? ret = kstrtouint(val, 0, &size); >> +??? if (ret) >> +??????? return ret; >> + >> +??? if (size < VIRTIO_VSOCK_MIN_PKT_BUF_SIZE || >> +??????? size > VIRTIO_VSOCK_MAX_PKT_BUF_SIZE) >> +??????? return -EINVAL; >> + >> +??? return param_set_uint(val, kp); >...
2018 Apr 05
5
[RFC PATCH 0/2] use larger max_request_size for virtio_blk
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);. But it doesn't work, because there is a default upper limitation BLK_DEF_MAX_SECTORS (1280 sectors). So this series want to add a new helper blk_queue_max_hw_sectors_no_limit to set a proper max reqeust size. Weiping Zhang (2): blk-setting:
2018 Apr 05
5
[RFC PATCH 0/2] use larger max_request_size for virtio_blk
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);. But it doesn't work, because there is a default upper limitation BLK_DEF_MAX_SECTORS (1280 sectors). So this series want to add a new helper blk_queue_max_hw_sectors_no_limit to set a proper max reqeust size. Weiping Zhang (2): blk-setting:
2012 Nov 01
15
[RFC PATCH v2 0/3] mm/fs: Implement faster stable page writes on filesystems
Hi all, This patchset makes some key modifications to the original ''stable page writes'' patchset. First, it provides users (devices and filesystems) of a backing_dev_info the ability to declare whether or not it is necessary to ensure that page contents cannot change during writeout, whereas the current code assumes that this is true. Second, it relaxes the
2019 May 10
18
[PATCH v2 0/8] vsock/virtio: optimizations to increase the throughput
While I was testing this new series (v2) I discovered an huge use of memory and a memory leak in the virtio-vsock driver in the guest when I sent 1-byte packets to the guest. These issues are present since the introduction of the virtio-vsock driver. I added the patches 1 and 2 to fix them in this series in order to better track the performance trends. v1:
2019 May 10
18
[PATCH v2 0/8] vsock/virtio: optimizations to increase the throughput
While I was testing this new series (v2) I discovered an huge use of memory and a memory leak in the virtio-vsock driver in the guest when I sent 1-byte packets to the guest. These issues are present since the introduction of the virtio-vsock driver. I added the patches 1 and 2 to fix them in this series in order to better track the performance trends. v1: