-
Notifications
You must be signed in to change notification settings - Fork 594
runtime: config: linux: Edit BlockIO struct #193
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
Conversation
runtime-config-linux.md
Outdated
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.
There doesn't seem to be much point in having these examples if they're all null. Maybe drop some of them completely, and then set the remaining ones to something more useful to show the new syntax?
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.
I left it as it was but yes makes sense I'll update the example
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
|
On Wed, Sep 16, 2015 at 07:51:53AM -0700, Antonio Murdaca wrote:
I'm fine with blockIODevice. One benefit is that we don't need to |
fine, I guess |
af9cc12 to
89bed76
Compare
|
89bed76 looks good to me, although I'm a bit surprised that all we
where I've tried to use the “whole thing reads like a sentence” |
Sounds good to have these docs around, I'll update. |
|
On Wed, Sep 16, 2015 at 12:51:13PM -0700, W. Trevor King wrote:
These also talk about leaf_weight. While we're formalizing these Maybe with:
Or we can have separate entries (like you're currently doing for |
|
On Wed, Sep 16, 2015 at 12:56:08PM -0700, Antonio Murdaca wrote:
I had some other cgroups docs stubbing in #99 if you want to borrow |
these are separate cause one is dealing with weight and the other with rate
It shoudln't be so much hard to put leaf_weight into account. And I like your proposed struct with both weight and leaf_weight.
Thanks! |
8badb9d to
3c64554
Compare
Though systemd takes device path instead of major minor number, but for struct, I think is't better to store just major minor numbers. And +1 for this change. |
0ee02e7 to
8366b2e
Compare
systemd was one of the reason I thought having |
6249ff5 to
7561a4a
Compare
c896a0a to
a89565b
Compare
|
ping @vbatts @mrunalp @LK4D4 @wking @hqhq I've updated the structure of the cgroups section here by splitting the example into per resource section and filled the bllkio one as per current PR topic. If you're happy with this path/format I can do a follow up PR updating the rest of the resources (I'd leave this PR as is now w/o going any further with other modifications if you're ok with this) |
runtime-config-linux.md
Outdated
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.
I think our other examples use four-space indents for JSON, so it's probably better to stick with that and skip the tabs.
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.
Sure, missed that
|
On Thu, Sep 17, 2015 at 05:55:38AM -0700, Antonio Murdaca wrote:
Looks good to me :). I've left a few copy-edit suggestions, but I'm |
|
LGTM |
0c5d333 to
337a1b8
Compare
runtime-config-linux.md
Outdated
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.
typo: blkioThrottleReadIOPSDevicei
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
`WeightDevice`, `ThrottleReadBpsDevice`, `ThrottleWriteBpsDevice`, `ThrottleReadIOpsDevice`, `ThrottleWriteIOpsDevice` are now slices to well defined structs to allow setting multiple devices in their respective blkio file. By using a string to represents those values it wasn't possible to set correct values when multiple devices were passed in the config (either newline separated or comma separated). Signed-off-by: Antonio Murdaca <[email protected]>
|
LGTM |
runtime: config: linux: Edit BlockIO struct
|
Thanks, I'll create a PR in runc to update libcontainer |
|
@runcom Sounds good! |
WeightDevice,ThrottleReadBpsDevice,ThrottleWriteBpsDevice,ThrottleReadIOpsDevice,ThrottleWriteIOpsDeviceare now slices to well defined structs to allow setting multiple devices in their respective blkio file. By using a string to represents those values it wasn't possible to set correct values when multiple devices were passed in the config (either newline separated or comma separated).I don't know how this worked before to define multiple devices for these cgroups resources. Writing something like
8:0 500\n8:16 300isn't working (there's a Docker PR moby/moby#13959 which passes that format to libcontainer and by passing that format to current master runc isn't working as well (neither using comma) because it just writes it to cgroup file which doesn't accept newlines/commas).8:0 500\n8:16 300will only set the first device before the\nwhen written toblkio.weight_devicefor instance.I'm not fond of
blockIODeviceembedded struct and specifying major:minor for this. I think it will suffice specifying just aPathand do the syscall.Stat to retrieve major:minor where it needs to (I'm thinking about libcontainer as it's currently doing for Rlimits for instance).By just specifing a
Paththis will help also for example to just receive a string like/dev/sdaand do the major:minor convert in the implementation. It's useful to have the plain string like for checking which scheduler the device is using (/sys/block/sda/queue/schedulerw/o converting back major:minor to path in implementation).I'll open an issue in
runcto track this and updaterunc/libcontainerif this patch is correct and lands.Signed-off-by: Antonio Murdaca [email protected]