linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jared Hu <jared.hu@nxp.com>
To: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"vbabka@suse.cz" <vbabka@suse.cz>,
	"iamjoonsoo.kim@lge.com" <iamjoonsoo.kim@lge.com>,
	"labbott@redhat.com" <labbott@redhat.com>,
	"huyue2@yulong.com" <huyue2@yulong.com>,
	"m.szyprowski@samsung.com" <m.szyprowski@samsung.com>,
	"rppt@linux.ibm.com" <rppt@linux.ibm.com>,
	"andreyknvl@google.com" <andreyknvl@google.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: question for cma alloc fail issue
Date: Wed, 10 Apr 2019 10:48:26 +0000	[thread overview]
Message-ID: <VE1PR04MB64290E25D6BAB7E702D08A54982E0@VE1PR04MB6429.eurprd04.prod.outlook.com> (raw)

Hi All,

We are facing a cma memory alloc issue on linux 4.14.98 and lower version.

In our platform imx8m, we using cma to allocate large continuous memory
block to support zero-copy between video decode and display sub-system.
But after long time loop video playback test, system will report alloc
cma fail ret=busy. We take a deep look into cma.c found there are still
some big free areas in cma->bitmap that maybe can alloc 3595 pages.

Here are some questions:
1. in __alloc_contig_migrate_range() cc->nr_migratepages always been 0
Does cc->nr_migratepages = 0 means there is no page can be reclaimed or
migrated? Which kind of pages that cannot been reclaimed.

2. The pages that are free in cma->bitmap seem not free in Buddy system?
PageBuddy() test can also return false even if the page is in the free list in cma bitmap
I test the fail page with page_is_file_cache(page) which return 0.
comment show: 0 if @page is anonymous, tmpfs or otherwise ram or swap backed.
What does swap backed mean? Which one maybe occupy these pages?

Could someone give me a favor to debug this issue?

Best regareds
Jared Hu

             reply	other threads:[~2019-04-10 10:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 10:48 Jared Hu [this message]
2019-04-10 13:14 ` Matthew Wilcox
  -- strict thread matches above, loose matches on Subject: below --
2019-03-19  8:31 Jared Hu

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=VE1PR04MB64290E25D6BAB7E702D08A54982E0@VE1PR04MB6429.eurprd04.prod.outlook.com \
    --to=jared.hu@nxp.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@google.com \
    --cc=huyue2@yulong.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=labbott@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=m.szyprowski@samsung.com \
    --cc=rppt@linux.ibm.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