Allocation mode explanation

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I have "page allocation failure" reported on my system:
[some_app]: page allocation failure: order:4, mode:0x2040d0
Could someone please explain what that mode exactly stands for? Am I right that this is for the following GFP flags: GFP_NOTRACK | GFP_COMP | GFP_WAIT | GFP_IO | GFP_FS ?
Kernel version is 3.10.0-693.21.1.el7.AV1.x86_64.
kernel memory
add a comment |Â
up vote
1
down vote
favorite
I have "page allocation failure" reported on my system:
[some_app]: page allocation failure: order:4, mode:0x2040d0
Could someone please explain what that mode exactly stands for? Am I right that this is for the following GFP flags: GFP_NOTRACK | GFP_COMP | GFP_WAIT | GFP_IO | GFP_FS ?
Kernel version is 3.10.0-693.21.1.el7.AV1.x86_64.
kernel memory
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have "page allocation failure" reported on my system:
[some_app]: page allocation failure: order:4, mode:0x2040d0
Could someone please explain what that mode exactly stands for? Am I right that this is for the following GFP flags: GFP_NOTRACK | GFP_COMP | GFP_WAIT | GFP_IO | GFP_FS ?
Kernel version is 3.10.0-693.21.1.el7.AV1.x86_64.
kernel memory
I have "page allocation failure" reported on my system:
[some_app]: page allocation failure: order:4, mode:0x2040d0
Could someone please explain what that mode exactly stands for? Am I right that this is for the following GFP flags: GFP_NOTRACK | GFP_COMP | GFP_WAIT | GFP_IO | GFP_FS ?
Kernel version is 3.10.0-693.21.1.el7.AV1.x86_64.
kernel memory
edited Jun 8 at 6:37
asked Jun 7 at 12:38
sys463
889
889
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
The flags seem to be defined in file <kernel source directory>/include/linux/gfp.h, and at least on kernel 4.9.105, mode 0x2040d0 would seem to map to:
GFP_NOTRACK | GFP_COMP | GFP_FS | GFP_IO | GFP_RECLAIMABLE
But if I Google for flag definitions, I see in some sources value 0x10 defined as GFP_WAIT instead of GFP_RECLAIMABLE, which seems to match your source.
This LWN discussion might be useful reading, but the best description I can see is in the comments in include/linux/gfp.h file.
In general, these mode flags modify the working of the page allocator.
- GFP_NOTRACK: avoids tracking with
kmemcheck. - GFP_COMP: address compound page metadata
- GFP_FS: indicates that the allocator can call down the the low-level filesystem to reclaim pages if necessary; if this is cleared, I think would indicate the allocation is for some filesystem code that may be holding locks... which might be important when using a swap file, for example.
- GFP_IO: indicates that the allocator can start physical I/O to reclaim pages to satisfy this request.
- GFP_RECLAIMABLE: "[this] is used for slab allocations that specify SLAB_RECLAIM_ACCOUNT and whose pages can be freed via shrinkers." This flag is apparently used by memory allocations for filesystems. Basically it seems to mean that there is a kernel function (a shrinker) that can be called to free or minimize this allocation if necessary.
Thanks for your answer, @telcoM! I've added kernel version to the description.
â sys463
Jun 8 at 6:37
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
The flags seem to be defined in file <kernel source directory>/include/linux/gfp.h, and at least on kernel 4.9.105, mode 0x2040d0 would seem to map to:
GFP_NOTRACK | GFP_COMP | GFP_FS | GFP_IO | GFP_RECLAIMABLE
But if I Google for flag definitions, I see in some sources value 0x10 defined as GFP_WAIT instead of GFP_RECLAIMABLE, which seems to match your source.
This LWN discussion might be useful reading, but the best description I can see is in the comments in include/linux/gfp.h file.
In general, these mode flags modify the working of the page allocator.
- GFP_NOTRACK: avoids tracking with
kmemcheck. - GFP_COMP: address compound page metadata
- GFP_FS: indicates that the allocator can call down the the low-level filesystem to reclaim pages if necessary; if this is cleared, I think would indicate the allocation is for some filesystem code that may be holding locks... which might be important when using a swap file, for example.
- GFP_IO: indicates that the allocator can start physical I/O to reclaim pages to satisfy this request.
- GFP_RECLAIMABLE: "[this] is used for slab allocations that specify SLAB_RECLAIM_ACCOUNT and whose pages can be freed via shrinkers." This flag is apparently used by memory allocations for filesystems. Basically it seems to mean that there is a kernel function (a shrinker) that can be called to free or minimize this allocation if necessary.
Thanks for your answer, @telcoM! I've added kernel version to the description.
â sys463
Jun 8 at 6:37
add a comment |Â
up vote
1
down vote
accepted
The flags seem to be defined in file <kernel source directory>/include/linux/gfp.h, and at least on kernel 4.9.105, mode 0x2040d0 would seem to map to:
GFP_NOTRACK | GFP_COMP | GFP_FS | GFP_IO | GFP_RECLAIMABLE
But if I Google for flag definitions, I see in some sources value 0x10 defined as GFP_WAIT instead of GFP_RECLAIMABLE, which seems to match your source.
This LWN discussion might be useful reading, but the best description I can see is in the comments in include/linux/gfp.h file.
In general, these mode flags modify the working of the page allocator.
- GFP_NOTRACK: avoids tracking with
kmemcheck. - GFP_COMP: address compound page metadata
- GFP_FS: indicates that the allocator can call down the the low-level filesystem to reclaim pages if necessary; if this is cleared, I think would indicate the allocation is for some filesystem code that may be holding locks... which might be important when using a swap file, for example.
- GFP_IO: indicates that the allocator can start physical I/O to reclaim pages to satisfy this request.
- GFP_RECLAIMABLE: "[this] is used for slab allocations that specify SLAB_RECLAIM_ACCOUNT and whose pages can be freed via shrinkers." This flag is apparently used by memory allocations for filesystems. Basically it seems to mean that there is a kernel function (a shrinker) that can be called to free or minimize this allocation if necessary.
Thanks for your answer, @telcoM! I've added kernel version to the description.
â sys463
Jun 8 at 6:37
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The flags seem to be defined in file <kernel source directory>/include/linux/gfp.h, and at least on kernel 4.9.105, mode 0x2040d0 would seem to map to:
GFP_NOTRACK | GFP_COMP | GFP_FS | GFP_IO | GFP_RECLAIMABLE
But if I Google for flag definitions, I see in some sources value 0x10 defined as GFP_WAIT instead of GFP_RECLAIMABLE, which seems to match your source.
This LWN discussion might be useful reading, but the best description I can see is in the comments in include/linux/gfp.h file.
In general, these mode flags modify the working of the page allocator.
- GFP_NOTRACK: avoids tracking with
kmemcheck. - GFP_COMP: address compound page metadata
- GFP_FS: indicates that the allocator can call down the the low-level filesystem to reclaim pages if necessary; if this is cleared, I think would indicate the allocation is for some filesystem code that may be holding locks... which might be important when using a swap file, for example.
- GFP_IO: indicates that the allocator can start physical I/O to reclaim pages to satisfy this request.
- GFP_RECLAIMABLE: "[this] is used for slab allocations that specify SLAB_RECLAIM_ACCOUNT and whose pages can be freed via shrinkers." This flag is apparently used by memory allocations for filesystems. Basically it seems to mean that there is a kernel function (a shrinker) that can be called to free or minimize this allocation if necessary.
The flags seem to be defined in file <kernel source directory>/include/linux/gfp.h, and at least on kernel 4.9.105, mode 0x2040d0 would seem to map to:
GFP_NOTRACK | GFP_COMP | GFP_FS | GFP_IO | GFP_RECLAIMABLE
But if I Google for flag definitions, I see in some sources value 0x10 defined as GFP_WAIT instead of GFP_RECLAIMABLE, which seems to match your source.
This LWN discussion might be useful reading, but the best description I can see is in the comments in include/linux/gfp.h file.
In general, these mode flags modify the working of the page allocator.
- GFP_NOTRACK: avoids tracking with
kmemcheck. - GFP_COMP: address compound page metadata
- GFP_FS: indicates that the allocator can call down the the low-level filesystem to reclaim pages if necessary; if this is cleared, I think would indicate the allocation is for some filesystem code that may be holding locks... which might be important when using a swap file, for example.
- GFP_IO: indicates that the allocator can start physical I/O to reclaim pages to satisfy this request.
- GFP_RECLAIMABLE: "[this] is used for slab allocations that specify SLAB_RECLAIM_ACCOUNT and whose pages can be freed via shrinkers." This flag is apparently used by memory allocations for filesystems. Basically it seems to mean that there is a kernel function (a shrinker) that can be called to free or minimize this allocation if necessary.
edited Jun 8 at 8:05
answered Jun 7 at 13:38
telcoM
10k11032
10k11032
Thanks for your answer, @telcoM! I've added kernel version to the description.
â sys463
Jun 8 at 6:37
add a comment |Â
Thanks for your answer, @telcoM! I've added kernel version to the description.
â sys463
Jun 8 at 6:37
Thanks for your answer, @telcoM! I've added kernel version to the description.
â sys463
Jun 8 at 6:37
Thanks for your answer, @telcoM! I've added kernel version to the description.
â sys463
Jun 8 at 6:37
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f448414%2fallocation-mode-explanation%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password