Re: [PATCH v2] hugetlb_cgroup: fix imbalanced css_get and css_put pair for shared mappings

2021-03-15 Thread Miaohe Lin
On 2021/3/16 2:42, Mike Kravetz wrote: > On 3/12/21 7:11 PM, Miaohe Lin wrote: >> On 2021/3/13 3:09, Mike Kravetz wrote: >>> On 3/1/21 4:05 AM, Miaohe Lin wrote: The current implementation of hugetlb_cgroup for shared mappings could have different behavior. Consider the following two

Re: [PATCH v2] hugetlb_cgroup: fix imbalanced css_get and css_put pair for shared mappings

2021-03-15 Thread Mike Kravetz
On 3/12/21 7:11 PM, Miaohe Lin wrote: > On 2021/3/13 3:09, Mike Kravetz wrote: >> On 3/1/21 4:05 AM, Miaohe Lin wrote: >>> The current implementation of hugetlb_cgroup for shared mappings could have >>> different behavior. Consider the following two scenarios: >>> >>> 1.Assume initial css

Re: [PATCH v2] hugetlb_cgroup: fix imbalanced css_get and css_put pair for shared mappings

2021-03-12 Thread Miaohe Lin
On 2021/3/13 3:09, Mike Kravetz wrote: > On 3/1/21 4:05 AM, Miaohe Lin wrote: >> The current implementation of hugetlb_cgroup for shared mappings could have >> different behavior. Consider the following two scenarios: >> >> 1.Assume initial css reference count of hugetlb_cgroup is 1: >> 1.1 Call

Re: [PATCH v2] hugetlb_cgroup: fix imbalanced css_get and css_put pair for shared mappings

2021-03-12 Thread Mike Kravetz
On 3/1/21 4:05 AM, Miaohe Lin wrote: > The current implementation of hugetlb_cgroup for shared mappings could have > different behavior. Consider the following two scenarios: > > 1.Assume initial css reference count of hugetlb_cgroup is 1: > 1.1 Call hugetlb_reserve_pages with from = 1, to = 2.

[PATCH v2] hugetlb_cgroup: fix imbalanced css_get and css_put pair for shared mappings

2021-03-01 Thread Miaohe Lin
The current implementation of hugetlb_cgroup for shared mappings could have different behavior. Consider the following two scenarios: 1.Assume initial css reference count of hugetlb_cgroup is 1: 1.1 Call hugetlb_reserve_pages with from = 1, to = 2. So css reference count is 2 associated with 1