Project

General

Profile

Actions

Bug #42059

closed

get_cgroup_memory_limit magic value is error when os page_size is 64k

Added by andy qi over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
OSD
Target version:
% Done:

0%

Source:
Community (user)
Tags:
osd,cgroup.memory.limit_in_bytes,pagesize
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

in the utils.c file,
when os pagesize is 65536,default value of cgroup.memory.limit_in_bytes is 9223372036854710272 or 0x7fffffffffff0000, but get_cgroup_memory_limit just processed the situation of 4096(the magic value 9223372036854771712 or 0x7ffffffffffff000)

part of code in get_cgroup_memory_limit at line 159:
if (value == 0x7ffffffffffff000) {
*limit = 0; // no limit
} else {
*limit = value;
}

the value of memory.limit_in_bytes when os`s pagesize is 65536:
[root@ceph2 build]# getconf PAGE_SIZE
65536
[root@ceph2 build]# cat /sys/fs/cgroup/memory/memory.limit_in_bytes
9223372036854710272

Actions #1

Updated by Greg Farnum over 4 years ago

Maybe I'm misunderstanding, but what do the page size and the cgroup memory limit have to do with each other? What's the bug here?

Actions #2

Updated by andy qi over 4 years ago

Greg Farnum wrote:

Maybe I'm misunderstanding, but what do the page size and the cgroup memory limit have to do with each other? What's the bug here?

the default value of cgroup memory is set to PAGE_COUNTER_MAX,which is LONG_MAX/PAGE_SIZE on 64-bit platform.when the paltform`s PAGE_SIZE is diferent ,the default value of cgroup memory is diferent, such as 4k and 64k has the different default values:
0x7ffffffffffff000(pagesize=4k) ,
0x7fffffffffff0000(pagesize= 64k)

Actions #3

Updated by Greg Farnum over 4 years ago

  • Status changed from New to Resolved

We stopped relying on the cgroup limit for this reason in https://github.com/ceph/ceph/pull/29581 (and it's been backported to nautilus if you upgrade to 15.2.3 or 15.2.4).

Thanks for the bug report!

Actions

Also available in: Atom PDF