From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Laura Abbott <lauraa@codeaurora.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-sh@vger.kernel.org, Michal Nazarewicz <mina86@mina86.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Minchan Kim <minchan@kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: CMA: test_pages_isolated failures in alloc_contig_range
Date: Tue, 28 Oct 2014 17:12:14 +0200 [thread overview]
Message-ID: <8295446.YZpkE7ns4p@avalon> (raw)
In-Reply-To: <544EAD3B.6070102@codeaurora.org>
Hi Laura,
On Monday 27 October 2014 13:38:19 Laura Abbott wrote:
> On 10/26/2014 2:09 PM, Laurent Pinchart wrote:
> > Hello,
> >
> > I've run into a CMA-related issue while testing a DMA engine driver with
> > dmatest on a Renesas R-Car ARM platform.
> >
> > When allocating contiguous memory through CMA the kernel prints the
> > following messages to the kernel log.
> >
> > [ 99.770000] alloc_contig_range test_pages_isolated(6b843, 6b844) failed
> > [ 124.220000] alloc_contig_range test_pages_isolated(6b843, 6b844) failed
> > [ 127.550000] alloc_contig_range test_pages_isolated(6b845, 6b846) failed
> > [ 132.850000] alloc_contig_range test_pages_isolated(6b845, 6b846) failed
> > [ 151.390000] alloc_contig_range test_pages_isolated(6b843, 6b844) failed
> > [ 166.490000] alloc_contig_range test_pages_isolated(6b843, 6b844) failed
> > [ 181.450000] alloc_contig_range test_pages_isolated(6b845, 6b846) failed
> >
> > I've stripped the dmatest module down as much as possible to remove any
> > hardware dependencies and came up with the following implementation.
>
> ...
>
> > Loading the module will start 4 threads that will allocate and free DMA
> > coherent memory in a tight loop and eventually produce the error. It seems
> > like the probability of occurrence grows with the number of threads, which
> > could indicate a race condition.
> >
> > The tests have been run on 3.18-rc1, but previous tests on 3.16 did
> > exhibit the same behaviour.
> >
> > I'm not that familiar with the CMA internals, help would be appreciated to
> > debug the problem.
>
> Are you actually seeing allocation failures or is it just the messages?
It's just the messages, I haven't noticed allocation failures.
> The messages themselves may be harmless if the allocation is succeeding.
> It's an indication that the particular range could not be isolated and
> therefore another range should be used for the CMA allocation. Joonsoo
> Kim had a patch series[1] that was designed to correct some problems with
> isolation and from my testing it helps fix some CMA related errors. You
> might try picking that up to see if it helps.
>
> Thanks,
> Laura
>
> [1] https://lkml.org/lkml/2014/10/23/90
I've tested the patches but they don't seem to have any influence on the
isolation test failures.
--
Regards,
Laurent Pinchart
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-10-28 15:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-26 21:09 Laurent Pinchart
2014-10-27 20:38 ` Laura Abbott
2014-10-28 15:12 ` Laurent Pinchart [this message]
2014-10-28 12:38 ` Michal Nazarewicz
2014-10-28 13:48 ` Peter Hurley
2014-10-28 16:57 ` Michal Nazarewicz
2014-11-04 3:38 ` Peter Hurley
2014-10-28 18:59 ` Laurent Pinchart
2014-11-03 16:57 ` [PATCH] mm: alloc_contig_range: demote pages busy message from warn to info Michal Nazarewicz
2014-11-04 5:43 ` Minchan Kim
2014-11-04 12:22 ` Peter Hurley
2014-11-04 13:35 ` Michal Nazarewicz
2014-11-04 14:19 ` Peter Hurley
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=8295446.YZpkE7ns4p@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=b.zolnierkie@samsung.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=lauraa@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-sh@vger.kernel.org \
--cc=mina86@mina86.com \
--cc=minchan@kernel.org \
/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