Commit f817de9
committed
cgroup: prepare migration path for unified hierarchy
Unified hierarchy implementation would require re-migrating tasks onto
the same cgroup on the default hierarchy to reflect updated effective
csses. Update cgroup_migrate_prepare_dst() so that it accepts NULL as
the destination cgrp. When NULL is specified, the destination is
considered to be the cgroup on the default hierarchy associated with
each css_set.
After this change, the identity check in cgroup_migrate_add_src()
isn't sufficient for noop detection as the associated csses may change
without any cgroup association changing. The only way to tell whether
a migration is noop or not is testing whether the source and
destination csets are identical. The noop check in
cgroup_migrate_add_src() is removed and cset identity test is added to
cgroup_migreate_prepare_dst(). If it's detected that source and
destination csets are identical, the cset is removed removed from
@preloaded_csets and all the migration nodes are cleared which makes
cgroup_migrate() ignore the cset.
Also, make the function append the destination css_sets to
@preloaded_list so that destination css_sets always come after source
css_sets.
Signed-off-by: Tejun Heo <[email protected]>
Acked-by: Li Zefan <[email protected]>1 parent 7fd8c56 commit f817de9
1 file changed
+23
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1902 | 1902 | | |
1903 | 1903 | | |
1904 | 1904 | | |
1905 | | - | |
1906 | | - | |
1907 | | - | |
1908 | | - | |
1909 | 1905 | | |
1910 | 1906 | | |
1911 | 1907 | | |
| |||
1920 | 1916 | | |
1921 | 1917 | | |
1922 | 1918 | | |
1923 | | - | |
| 1919 | + | |
1924 | 1920 | | |
1925 | 1921 | | |
1926 | 1922 | | |
1927 | 1923 | | |
1928 | | - | |
1929 | | - | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
1930 | 1927 | | |
1931 | 1928 | | |
1932 | 1929 | | |
| |||
1937 | 1934 | | |
1938 | 1935 | | |
1939 | 1936 | | |
1940 | | - | |
| 1937 | + | |
1941 | 1938 | | |
1942 | 1939 | | |
1943 | 1940 | | |
1944 | 1941 | | |
1945 | | - | |
| 1942 | + | |
1946 | 1943 | | |
1947 | 1944 | | |
1948 | | - | |
| 1945 | + | |
| 1946 | + | |
1949 | 1947 | | |
1950 | 1948 | | |
1951 | 1949 | | |
1952 | 1950 | | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
1953 | 1965 | | |
1954 | 1966 | | |
1955 | 1967 | | |
| |||
1958 | 1970 | | |
1959 | 1971 | | |
1960 | 1972 | | |
1961 | | - | |
| 1973 | + | |
1962 | 1974 | | |
1963 | 1975 | | |
1964 | 1976 | | |
| |||
0 commit comments