-
Notifications
You must be signed in to change notification settings - Fork 2.3k
virtio-pmem: fixes and improvements #5789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
acbe29c
2b61f32
8e58556
f690f1f
c3f4176
00a1f0e
ba905dd
853375d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -370,6 +370,35 @@ paths: | |
| description: Internal server error. | ||
| schema: | ||
| $ref: "#/definitions/Error" | ||
| patch: | ||
| summary: Updates the rate limiter of a pmem device. Post-boot only. | ||
| description: | ||
| Updates the rate limiter applied to the pmem device with the ID specified | ||
| by the id path parameter. | ||
| operationId: patchGuestPmemByID | ||
| parameters: | ||
| - name: id | ||
| in: path | ||
| description: The id of the guest pmem device | ||
| required: true | ||
| type: string | ||
| - name: body | ||
| in: body | ||
| description: Pmem rate limiter properties | ||
| required: true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does it mean that users can't remove the rate limiter later on? Other devices seem to allow that.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean? The description here seems to be same as for other devices. Pmem logic for updating rate-limiter is same as for other devices.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I mean is, for example, block doesn't make rate limiter required: PartialDrive:
type: object
required:
- drive_id
properties:
drive_id:
type: string
path_on_host:
type: string
description:
Host level path for the guest drive.
This field is optional for virtio-block config and should be omitted for vhost-user-block configuration.
rate_limiter:
$ref: "#/definitions/RateLimiter"while pmem does: PartialPmem:
type: object
description:
Defines a partial pmem device structure, used to update the rate limiter
for that device, after microvm start.
required:
- id
- rate_limiter <==== here
properties:
id:
type: string
rate_limiter:
$ref: "#/definitions/RateLimiter"
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, this is simply because rate-limiter is the only thing that can be changed. There is no reason to PATCH it if not to change the rate-limiter. For other devices I was looking at the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm just thinking it could be the only way to disable the rate limiter later on. Not sure if it's a common use case though. Would probably make sense to keep it on par with other devices in that sense.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, made it optional |
||
| schema: | ||
| $ref: "#/definitions/PartialPmem" | ||
| responses: | ||
| 204: | ||
| description: Pmem device updated | ||
| 400: | ||
| description: Pmem device cannot be updated due to bad input | ||
| schema: | ||
| $ref: "#/definitions/Error" | ||
| default: | ||
| description: Internal server error. | ||
| schema: | ||
| $ref: "#/definitions/Error" | ||
|
|
||
| /logger: | ||
| put: | ||
|
|
@@ -1255,6 +1284,8 @@ definitions: | |
| type: boolean | ||
| description: | ||
| Flag to map backing file in read-only mode. | ||
| rate_limiter: | ||
| $ref: "#/definitions/RateLimiter" | ||
|
|
||
| Error: | ||
| type: object | ||
|
|
@@ -1538,6 +1569,19 @@ definitions: | |
| tx_rate_limiter: | ||
| $ref: "#/definitions/RateLimiter" | ||
|
|
||
| PartialPmem: | ||
| type: object | ||
| description: | ||
| Defines a partial pmem device structure, used to update the rate limiter | ||
| for that device, after microvm start. | ||
| required: | ||
| - id | ||
| properties: | ||
| id: | ||
| type: string | ||
| rate_limiter: | ||
| $ref: "#/definitions/RateLimiter" | ||
|
|
||
| RateLimiter: | ||
| type: object | ||
| description: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we seem to have unittests for parse_put_pmem, but not for parse_patch_pmem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed