Add support for /sys/devices/system/node and subfiles#542
Add support for /sys/devices/system/node and subfiles#542Hunter1016 wants to merge 6 commits intolxc:mainfrom
Conversation
also implement functions called by get_cpuset_mems(), - cgfsng_get_cpuset_mems - readat_cpuset_mems Signed-off-by: huteng.ht <huteng.ht@bytedance.com>
Signed-off-by: huteng.ht <huteng.ht@bytedance.com>
Signed-off-by: huteng.ht <huteng.ht@bytedance.com>
Signed-off-by: huteng.ht <huteng.ht@bytedance.com>
Signed-off-by: huteng.ht <huteng.ht@bytedance.com>
Signed-off-by: huteng.ht <huteng.ht@bytedance.com>
For whether or not want this emulation, like /sys/devices/system/cpu emulation, users can choose not to use by just not mounting it into the container. |
|
@brauner I can't think of a good reason to disable this one. If someone comes up with a good reason to turn it off, I think I'd prefer we switch to a |
I'm just a bit concerned that we're too lax with new features here and might introduce regressions. That's the main driver for me requesting this. |
Well, this isn't going to be in stable-5.0 as it's a new feature, so I'm not too worried about that. |
|
Hi @Hunter1016 Really sorry for a long delay with reviewing this. Could you rebase it? We have just discussed with Stéphane and we would like to merge it and have it in an upcoming LXCFS release. Kind regards, |
|
We'll go with a |
|
JFYI: Right now I'm working on rebasing this on top of |
|
replaced by #632 |
|
This thing is tightly coupled with If I fully understand the idea of this patchset is to hide NUMA nodes in accordance with what we have in Taking into account the problem described by @tych0 in #557 I'm not sure that it's a good idea in general, because user space application may not expect this. It can lead to weird configurations like this (manually crafted listing example, it's not from a real system): Dear @Hunter1016, couldn't you provide a bit more context why this was implemented? Do you have any use-case example for this? |
|
I agree; we should only emulate what the kernel does. Anything beyond that will lead to problems. |
@mihalicyn I'm sorry for a bit late, the most important motivation is running applications depending on libhwloc meets segmentaion fault because it reads /sys/devices/system/node/node%u/cpumap and /sys/devices/system/cpu/online to analyze hardware topology. |
Hi @Hunter1016, sorry for my very late response. That makes sense, so if I understand you correctly, anything that depends on libhwloc will crash these days inside a container which uses LXCFS? That's bad. At the same time, we have learned a lesson in a hard way, that messing with cpu/numa report information can be quite dangerous, confuse user space application. So before changing anything here, we should clearly describe what specifically we are trying to emulate and how, cause otherwise we might end up having a broken emulation for a kernel ABI. I also have done some work on #638 which is about making a way to dynamically enable/disable some LXCFS features on per-container basis. We could consider adding this stuff as a opt-in feature. Please, let me know if you are still interested in this stuff. Kind regards, |
No description provided.