Allocation mode explanation

The name of the pictureThe name of the pictureThe name of the pictureClash 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.







share|improve this question

























    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.







    share|improve this question























      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.







      share|improve this question













      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.









      share|improve this question












      share|improve this question




      share|improve this question








      edited Jun 8 at 6:37
























      asked Jun 7 at 12:38









      sys463

      889




      889




















          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.





          share|improve this answer























          • Thanks for your answer, @telcoM! I've added kernel version to the description.
            – sys463
            Jun 8 at 6:37










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          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






























          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.





          share|improve this answer























          • Thanks for your answer, @telcoM! I've added kernel version to the description.
            – sys463
            Jun 8 at 6:37














          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.





          share|improve this answer























          • Thanks for your answer, @telcoM! I've added kernel version to the description.
            – sys463
            Jun 8 at 6:37












          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.





          share|improve this answer















          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.






          share|improve this answer















          share|improve this answer



          share|improve this answer








          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
















          • 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












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          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













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)