> On Март 12, 2020, 8:50 д.п., Qian Zhang wrote:
> > src/linux/cgroups.cpp
> > Line 665 (original), 677 (patched)
> > <https://reviews.apache.org/r/72122/diff/3/?file=2213331#file2213331line677>
> >
> >     Do we need `path::join("/", ` like the previous code?

No, we don't need to prepend `"/"` to the path because every string in the 
`missingCgroup` is guaranteed to represent an absolute path. These paths are 
constructed by using `path::join`, which automatically adds `"/"` between 
arguments: 

```
    currentCgroup = path::join(currentCgroup, *it);
```

Previously, `cgroup` variable could refer to a relative path, so it was 
necessary to prepend `"/"`.


- Andrei


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72122/#review219916
-----------------------------------------------------------


On Фев. 12, 2020, 3:48 п.п., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72122/
> -----------------------------------------------------------
> 
> (Updated Фев. 12, 2020, 3:48 п.п.)
> 
> 
> Review request for mesos, Greg Mann and Qian Zhang.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch modifies `cgroups::create` function to call
> `cloneCpusetCpusMems` for all absent nested cgroups along
> the path to a cgroup that is accepted as an argument of this function.
> For instance, if `cgroups::create` is called to create three
> non-existent cgroups recursively for the path `/a/b/c`, then
> `cloneCpusetCpusMems` is called to clone both `cpuset.cpus` and
> `cpuset.mems` for `/a` from its parent, then `/a/b` from `/a`,
> and so on down the path.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.cpp 73646c9eb39948192acedb67e3d2fb13acb14b30 
> 
> 
> Diff: https://reviews.apache.org/r/72122/diff/4/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>

Reply via email to