linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pankaj Suryawanshi <pankajssuryawanshi@gmail.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	 Vlastimil Babka <vbabka@suse.cz>,
	pankaj.suryawanshi@einfochips.com
Subject: Re: PageBlocks and Migrate Types
Date: Thu, 22 Aug 2019 23:54:19 +0530	[thread overview]
Message-ID: <CACDBo57OkND1LCokPLfyR09+oRTbA6+GAPc90xAEF6AM_LmbyQ@mail.gmail.com> (raw)
In-Reply-To: <20190822125231.GJ12785@dhcp22.suse.cz>

On Thu, Aug 22, 2019 at 6:22 PM Michal Hocko <mhocko@kernel.org> wrote:
>
> On Wed 21-08-19 22:23:44, Pankaj Suryawanshi wrote:
> > Hello,
> >
> > 1. What are Pageblocks and migrate types(MIGRATE_CMA) in Linux memory ?
>
> Pageblocks are a simple grouping of physically contiguous pages with
> common set of flags. I haven't checked closely recently so I might
> misremember but my recollection is that only the migrate type is stored
> there. Normally we would store that information into page flags but
> there is not enough room there.
>
> MIGRATE_CMA represent pages allocated for the CMA allocator. There are
> other migrate types denoting unmovable/movable allocations or pages that
> are isolated from the page allocator.
>
> Very broadly speaking, the migrate type groups pages with similar
> movability properties to reduce fragmentation that compaction cannot
> do anything about because there are objects of different properti
> around. Please note that pageblock might contain objects of a different
> migrate type in some cases (e.g. low on memory).
>
> Have a look at gfpflags_to_migratetype and how the gfp mask is converted
> to a migratetype for the allocation. Also follow different MIGRATE_$TYPE
> to see how it is used in the code.
>
> > How many movable/unmovable pages are defined by default?
>
> There is nothing like that. It depends on how many objects of a specific
> type are allocated.


It means that it started creating pageblocks after allocation of
different objects, but from which block it allocate initially when
there is nothing like pageblocks ? (when memory subsystem up)

Pageblocks and its type dynamically changes ?
>
>
> HTH
> --
> Michal Hocko
> SUSE Labs


  reply	other threads:[~2019-08-22 18:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21 16:53 Pankaj Suryawanshi
2019-08-22 12:52 ` Michal Hocko
2019-08-22 18:24   ` Pankaj Suryawanshi [this message]
2019-08-26  7:04     ` Michal Hocko
2019-08-26 17:05       ` Pankaj Suryawanshi
2019-08-27  5:43         ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACDBo57OkND1LCokPLfyR09+oRTbA6+GAPc90xAEF6AM_LmbyQ@mail.gmail.com \
    --to=pankajssuryawanshi@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=pankaj.suryawanshi@einfochips.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox