search for: kernel_param_ops

Displaying 15 results from an estimated 15 matches for "kernel_param_ops".

2019 May 13
2
[PATCH v2 8/8] vsock/virtio: make the RX buffer size tunable
...+ 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, > + .get = param_get_uint, > +}; > + > +module_param_cb(rx_buf_size, &param_ops_rx_buf_size, &rx_buf_size, 0644); > + > static struct virtio_vsock *virtio_vsock_get(void) > { > return the_virtio_vs...
2019 May 13
2
[PATCH v2 8/8] vsock/virtio: make the RX buffer size tunable
...+ 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, > + .get = param_get_uint, > +}; > + > +module_param_cb(rx_buf_size, &param_ops_rx_buf_size, &rx_buf_size, 0644); > + > static struct virtio_vsock *virtio_vsock_get(void) > { > return the_virtio_vs...
2018 Apr 05
0
[RFC PATCH 2/2] virtio_blk: add new module parameter to set max request size
...ers/block/virtio_blk.c index 4a07593c..5ac6d59 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -64,6 +64,34 @@ struct virtblk_req { struct scatterlist sg[]; }; + +static int max_request_size_set(const char *val, const struct kernel_param *kp); + +static const struct kernel_param_ops max_request_size_ops = { + .set = max_request_size_set, + .get = param_get_uint, +}; + +static unsigned long max_request_size = 4096; /* in unit of KiB */ +module_param_cb(max_request_size, &max_request_size_ops, &max_request_size, + 0444); +MODULE_PARM_DESC(max_request_size, "set max...
2019 May 10
0
[PATCH v2 8/8] vsock/virtio: make the RX buffer size tunable
...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, + .get = param_get_uint, +}; + +module_param_cb(rx_buf_size, &param_ops_rx_buf_size, &rx_buf_size, 0644); + static struct virtio_vsock *virtio_vsock_get(void) { return the_virtio_vsock; @@ -261,7 +286,7 @@ virtio_transport_cancel...
2019 May 13
0
[PATCH v2 8/8] vsock/virtio: make the RX buffer size tunable
...t; +??????? 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, >> +??? .get = param_get_uint, >> +}; >> + >> +module_param_cb(rx_buf_size, &param_ops_rx_buf_size, &rx_buf_size, >> 0644); >> + >> ? static struct virtio_vsock *virtio_vsock_get...
2011 Nov 15
1
[PATCH] virtio-mmio: Devices parameter parsing
This patch adds an option to instantiate guest virtio-mmio devices basing on a kernel command line (or module) parameter, for example: virtio_mmio.devices=0x100 at 0x100b0000:48,1K at 0x1001e000:74 Signed-off-by: Pawel Moll <pawel.moll at arm.com> --- drivers/virtio/Kconfig | 25 ++++++ drivers/virtio/virtio_mmio.c | 170 +++++++++++++++++++++++++++++++++++++++++- 2 files
2011 Nov 15
1
[PATCH] virtio-mmio: Devices parameter parsing
This patch adds an option to instantiate guest virtio-mmio devices basing on a kernel command line (or module) parameter, for example: virtio_mmio.devices=0x100 at 0x100b0000:48,1K at 0x1001e000:74 Signed-off-by: Pawel Moll <pawel.moll at arm.com> --- drivers/virtio/Kconfig | 25 ++++++ drivers/virtio/virtio_mmio.c | 170 +++++++++++++++++++++++++++++++++++++++++- 2 files
2012 May 09
1
[PATCH] virtio-mmio: Devices parameter parsing
...)pdev->resource[1].start, + pdev->id); + return 0; +} + +static int vm_cmdline_get(char *buffer, const struct kernel_param *kp) +{ + buffer[0] = '\0'; + device_for_each_child(&vm_cmdline_parent, buffer, + vm_cmdline_get_device); + return strlen(buffer) + 1; +} + +static struct kernel_param_ops vm_cmdline_param_ops = { + .set = vm_cmdline_set, + .get = vm_cmdline_get, +}; + +device_param_cb(device, &vm_cmdline_param_ops, NULL, S_IRUSR); + +static int vm_unregister_cmdline_device(struct device *dev, + void *data) +{ + platform_device_unregister(to_platform_device(dev)); + + return 0;...
2012 May 09
1
[PATCH] virtio-mmio: Devices parameter parsing
...)pdev->resource[1].start, + pdev->id); + return 0; +} + +static int vm_cmdline_get(char *buffer, const struct kernel_param *kp) +{ + buffer[0] = '\0'; + device_for_each_child(&vm_cmdline_parent, buffer, + vm_cmdline_get_device); + return strlen(buffer) + 1; +} + +static struct kernel_param_ops vm_cmdline_param_ops = { + .set = vm_cmdline_set, + .get = vm_cmdline_get, +}; + +device_param_cb(device, &vm_cmdline_param_ops, NULL, S_IRUSR); + +static int vm_unregister_cmdline_device(struct device *dev, + void *data) +{ + platform_device_unregister(to_platform_device(dev)); + + return 0;...
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:
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...g_timeout_str), 0444); static char g_requeue_str[80]; -module_param_string(requeue, g_requeue_str, sizeof(g_requeue_str), S_IRUGO); +module_param_string(requeue, g_requeue_str, sizeof(g_requeue_str), 0444); #endif static int g_queue_mode = NULL_Q_MQ; @@ -203,27 +203,27 @@ static const struct kernel_param_ops null_queue_mode_param_ops = { .get = param_get_int, }; -device_param_cb(queue_mode, &null_queue_mode_param_ops, &g_queue_mode, S_IRUGO); +device_param_cb(queue_mode, &null_queue_mode_param_ops, &g_queue_mode, 0444); MODULE_PARM_DESC(queue_mode, "Block interface to use (0=...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...g_timeout_str), 0444); static char g_requeue_str[80]; -module_param_string(requeue, g_requeue_str, sizeof(g_requeue_str), S_IRUGO); +module_param_string(requeue, g_requeue_str, sizeof(g_requeue_str), 0444); #endif static int g_queue_mode = NULL_Q_MQ; @@ -203,27 +203,27 @@ static const struct kernel_param_ops null_queue_mode_param_ops = { .get = param_get_int, }; -device_param_cb(queue_mode, &null_queue_mode_param_ops, &g_queue_mode, S_IRUGO); +device_param_cb(queue_mode, &null_queue_mode_param_ops, &g_queue_mode, 0444); MODULE_PARM_DESC(queue_mode, "Block interface to use (0=...
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: