Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-06-19 Thread haosdent huang


> On June 11, 2016, 2:27 p.m., Qian Zhang wrote:
> > src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp, lines 37-38
> > 
> >
> > So even after we introduce the unified cgroups isolator, we still need 
> > to keep the code of the original `cgroups/xxx` isolators? But I think it 
> > does not make sense since we have consolidated their code into the unified 
> > cgroups isolator, so ideally under 
> > `src/slave/containerizer/mesos/isolators/cgroups`, we will only have 
> > `cgroups.hpp/cpp` and `subsystem.hpp/cpp`, right?

Yes, those legacy files would be clean up, include `cgroups/perf_event.hpp`. 
Now I include it because I don't want to move or copy `PerfEventHandleManager` 
in this patch.


> On June 11, 2016, 2:27 p.m., Qian Zhang wrote:
> > src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp, lines 57-75
> > 
> >
> > In this method, I think you missed the part that we need to ensure no 
> > other subsystem is attached to the hierarchy, please check the the 
> > following code as a reference, and actually  
> > `CgroupsCpushareIsolatorProcess::create()`, 
> > `CgroupsNetClsIsolatorProcess::create()` also have the similar logic.
> > 
> > https://github.com/apache/mesos/blob/0.28.2/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp#L96:L105

We not need check this because the purpose of this epic is to allow multiple 
subsystems attached to the same hierarchy.


- haosdent


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


On June 19, 2016, 10:32 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45574/
> ---
> 
> (Updated June 19, 2016, 10:32 a.m.)
> 
> 
> Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, 
> Kevin Klues, and Qian Zhang.
> 
> 
> Bugs: MESOS-5047
> https://issues.apache.org/jira/browse/MESOS-5047
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add `PerfEventSubsystem` for cgroups unified isolator.
> 
> 
> Diffs
> -
> 
>   src/linux/perf.hpp 674d5f886ea41b939a8e48832ee6595a78b2f6ce 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45574/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-06-19 Thread haosdent huang

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

(Updated June 19, 2016, 10:32 a.m.)


Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, Kevin 
Klues, and Qian Zhang.


Changes
---

Rebase.


Bugs: MESOS-5047
https://issues.apache.org/jira/browse/MESOS-5047


Repository: mesos


Description
---

Add `PerfEventSubsystem` for cgroups unified isolator.


Diffs (updated)
-

  src/linux/perf.hpp 674d5f886ea41b939a8e48832ee6595a78b2f6ce 
  src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/45574/diff/


Testing
---


Thanks,

haosdent huang



Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-06-11 Thread Qian Zhang

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




src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp (lines 37 - 38)


So even after we introduce the unified cgroups isolator, we still need to 
keep the code of the original `cgroups/xxx` isolators? But I think it does not 
make sense since we have consolidated their code into the unified cgroups 
isolator, so ideally under `src/slave/containerizer/mesos/isolators/cgroups`, 
we will only have `cgroups.hpp/cpp` and `subsystem.hpp/cpp`, right?



src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp (lines 57 - 75)


In this method, I think you missed the part that we need to ensure no other 
subsystem is attached to the hierarchy, please check the the following code as 
a reference, and actually  `CgroupsCpushareIsolatorProcess::create()`, 
`CgroupsNetClsIsolatorProcess::create()` also have the similar logic.

https://github.com/apache/mesos/blob/0.28.2/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp#L96:L105


- Qian Zhang


On April 16, 2016, 6:28 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45574/
> ---
> 
> (Updated April 16, 2016, 6:28 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, and 
> Kevin Klues.
> 
> 
> Bugs: MESOS-5047
> https://issues.apache.org/jira/browse/MESOS-5047
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add `PerfEventSubsystem` for cgroups unified isolator.
> 
> 
> Diffs
> -
> 
>   src/linux/perf.hpp 674d5f886ea41b939a8e48832ee6595a78b2f6ce 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45574/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-06-10 Thread Qian Zhang


> On June 6, 2016, 9:38 p.m., Qian Zhang wrote:
> > src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp, lines 150-156
> > 
> >
> > I see in this hashmap, the keys and values are exactly same, e.g., 
> > CGROUP_SUBSYSTEM_CPU_NAME is "cpu", CGROUP_SUBSYSTEM_CPUACCT_NAME is 
> > "cpuacct", etc. It is a bit strange to have same keys and values in a 
> > hashmap, maybe we should use hashset?
> 
> haosdent huang wrote:
> Because we want to map 'mem' -> 'memory', we could not use hashet here. 
> Currently `CgroupsMemIsolatorProcess` use `cgroups/mem` as isolation flag. 
> However, the memory subsystem name in Linux us `memory`. So we need to map 
> `mem` -> `memory`.
> 
> And I think we may have other inconsistent between our internal name and 
> Linux cgroup subsystem name, e.g. `devices/gpu` -> `devices`. So I think it 
> is necessary.

Agree, thanks haosdent!


- Qian


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


On April 16, 2016, 6:28 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45574/
> ---
> 
> (Updated April 16, 2016, 6:28 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, and 
> Kevin Klues.
> 
> 
> Bugs: MESOS-5047
> https://issues.apache.org/jira/browse/MESOS-5047
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add `PerfEventSubsystem` for cgroups unified isolator.
> 
> 
> Diffs
> -
> 
>   src/linux/perf.hpp 674d5f886ea41b939a8e48832ee6595a78b2f6ce 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45574/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-06-07 Thread haosdent huang


> On June 6, 2016, 1:38 p.m., Qian Zhang wrote:
> > src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp, lines 150-156
> > 
> >
> > I see in this hashmap, the keys and values are exactly same, e.g., 
> > CGROUP_SUBSYSTEM_CPU_NAME is "cpu", CGROUP_SUBSYSTEM_CPUACCT_NAME is 
> > "cpuacct", etc. It is a bit strange to have same keys and values in a 
> > hashmap, maybe we should use hashset?

Because we want to map 'mem' -> 'memory', we could not use hashet here. 
Currently `CgroupsMemIsolatorProcess` use `cgroups/mem` as isolation flag. 
However, the memory subsystem name in Linux us `memory`. So we need to map 
`mem` -> `memory`.

And I think we may have other inconsistent between our internal name and Linux 
cgroup subsystem name, e.g. `devices/gpu` -> `devices`. So I think it is 
necessary.


- haosdent


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


On April 16, 2016, 10:28 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45574/
> ---
> 
> (Updated April 16, 2016, 10:28 a.m.)
> 
> 
> Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, and 
> Kevin Klues.
> 
> 
> Bugs: MESOS-5047
> https://issues.apache.org/jira/browse/MESOS-5047
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add `PerfEventSubsystem` for cgroups unified isolator.
> 
> 
> Diffs
> -
> 
>   src/linux/perf.hpp 674d5f886ea41b939a8e48832ee6595a78b2f6ce 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45574/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-06-06 Thread Qian Zhang

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




src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp (lines 150 - 156)


I see in this hashmap, the keys and values are exactly same, e.g., 
CGROUP_SUBSYSTEM_CPU_NAME is "cpu", CGROUP_SUBSYSTEM_CPUACCT_NAME is "cpuacct", 
etc. It is a bit strange to have same keys and values in a hashmap, maybe we 
should use hashset?


- Qian Zhang


On April 16, 2016, 6:28 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45574/
> ---
> 
> (Updated April 16, 2016, 6:28 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, and 
> Kevin Klues.
> 
> 
> Bugs: MESOS-5047
> https://issues.apache.org/jira/browse/MESOS-5047
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add `PerfEventSubsystem` for cgroups unified isolator.
> 
> 
> Diffs
> -
> 
>   src/linux/perf.hpp 674d5f886ea41b939a8e48832ee6595a78b2f6ce 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45574/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-06-05 Thread Qian Zhang


> On June 5, 2016, 12:43 a.m., haosdent huang wrote:
> > src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp, line 101
> > 
> >
> > Would reach here if don't meet `Error`.

Sorry, my bad, you are right :-)


- Qian


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


On April 16, 2016, 6:28 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45574/
> ---
> 
> (Updated April 16, 2016, 6:28 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, and 
> Kevin Klues.
> 
> 
> Bugs: MESOS-5047
> https://issues.apache.org/jira/browse/MESOS-5047
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add `PerfEventSubsystem` for cgroups unified isolator.
> 
> 
> Diffs
> -
> 
>   src/linux/perf.hpp 674d5f886ea41b939a8e48832ee6595a78b2f6ce 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45574/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-06-02 Thread Qian Zhang

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




src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp (line 101)


Will we reach here?


- Qian Zhang


On April 16, 2016, 6:28 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45574/
> ---
> 
> (Updated April 16, 2016, 6:28 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, and 
> Kevin Klues.
> 
> 
> Bugs: MESOS-5047
> https://issues.apache.org/jira/browse/MESOS-5047
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Add `PerfEventSubsystem` for cgroups unified isolator.
> 
> 
> Diffs
> -
> 
>   src/linux/perf.hpp 674d5f886ea41b939a8e48832ee6595a78b2f6ce 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45574/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-04-16 Thread haosdent huang

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

(Updated April 16, 2016, 10:28 a.m.)


Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, and 
Kevin Klues.


Changes
---

Rebase.


Bugs: MESOS-5047
https://issues.apache.org/jira/browse/MESOS-5047


Repository: mesos


Description
---

Add `PerfEventSubsystem` for cgroups unified isolator.


Diffs (updated)
-

  src/linux/perf.hpp 674d5f886ea41b939a8e48832ee6595a78b2f6ce 
  src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/45574/diff/


Testing
---


Thanks,

haosdent huang



Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-04-16 Thread haosdent huang

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

(Updated April 16, 2016, 10:22 a.m.)


Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, and 
Kevin Klues.


Changes
---

Rebase.


Bugs: MESOS-5047
https://issues.apache.org/jira/browse/MESOS-5047


Repository: mesos


Description
---

Add `PerfEventSubsystem` for cgroups unified isolator.


Diffs (updated)
-

  src/linux/perf.hpp 674d5f886ea41b939a8e48832ee6595a78b2f6ce 
  src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/45574/diff/


Testing
---


Thanks,

haosdent huang



Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-04-16 Thread haosdent huang

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

(Updated April 16, 2016, 10:19 a.m.)


Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, and 
Kevin Klues.


Changes
---

Rebase.


Bugs: MESOS-5047
https://issues.apache.org/jira/browse/MESOS-5047


Repository: mesos


Description
---

Add `PerfEventSubsystem` for cgroups unified isolator.


Diffs (updated)
-

  src/linux/perf.hpp 674d5f886ea41b939a8e48832ee6595a78b2f6ce 
  src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/45574/diff/


Testing
---


Thanks,

haosdent huang



Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-04-13 Thread haosdent huang

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

(Updated April 13, 2016, 6:47 p.m.)


Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, and 
Kevin Klues.


Changes
---

Rebase.


Bugs: MESOS-5047
https://issues.apache.org/jira/browse/MESOS-5047


Repository: mesos


Description
---

Add `PerfEventSubsystem` for cgroups unified isolator.


Diffs (updated)
-

  src/linux/perf.hpp 674d5f886ea41b939a8e48832ee6595a78b2f6ce 
  src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/45574/diff/


Testing
---


Thanks,

haosdent huang



Re: Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-04-01 Thread haosdent huang

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

(Updated April 1, 2016, 10:45 a.m.)


Review request for mesos and Jie Yu.


Changes
---

Rebase.


Bugs: MESOS-5047
https://issues.apache.org/jira/browse/MESOS-5047


Repository: mesos


Description
---

Add `PerfEventSubsystem` for cgroups unified isolator.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/45574/diff/


Testing
---


Thanks,

haosdent huang



Review Request 45574: Add `PerfEventSubsystem` for cgroups unified isolator.

2016-03-31 Thread haosdent huang

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

Review request for mesos and Jie Yu.


Bugs: MESOS-5047
https://issues.apache.org/jira/browse/MESOS-5047


Repository: mesos


Description
---

Add `PerfEventSubsystem` for cgroups unified isolator.


Diffs
-

  src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/45574/diff/


Testing
---


Thanks,

haosdent huang