lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1703418.04z9xDaRPF@avalon>
Date:	Tue, 28 Oct 2014 20:59:58 +0200
From:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:	Peter Hurley <peter@...leysoftware.com>
Cc:	Michal Nazarewicz <mina86@...a86.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, linux-sh@...r.kernel.org,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Minchan Kim <minchan@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: CMA: test_pages_isolated failures in alloc_contig_range

Hello,

On Tuesday 28 October 2014 09:48:26 Peter Hurley wrote:
> [ +cc Andrew Morton ]
> 
> On 10/28/2014 08:38 AM, Michal Nazarewicz wrote:
> > On Sun, Oct 26 2014, 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.
> > 
> > Like Laura wrote, the message is not (should not be) a problem in
> > itself:
>
> [...]
> 
> > So as you can see cma_alloc will try another part of the cma region if
> > test_pages_isolated fails.
> > 
> > Obviously, if CMA region is fragmented or there's enough space for only
> > one allocation of required size isolation failures will cause allocation
> > failures, so it's best to avoid them, but they are not always avoidable.
> > 
> > To debug you would probably want to add more debug information about the
> > page (i.e. data from struct page) that failed isolation after the
> > pr_warn in alloc_contig_range.

[   94.730000] __test_page_isolated_in_pageblock: failed at pfn 6b845: buddy 0 
count 0 migratetype 4 poison 0
[   94.740000] alloc_contig_range test_pages_isolated(6b845, 6b846) failed 
(-16)
[  202.140000] __test_page_isolated_in_pageblock: failed at pfn 6b843: buddy 0 
count 0 migratetype 4 poison 0
[  202.150000] alloc_contig_range test_pages_isolated(6b843, 6b844) failed 
(-16)

(4 is MIGRATE_CMA)

> If the message does not indicate an actual problem, then its printk level is
> too high. These messages have been reported when using 3.16+ distro kernels.

The messages got me worried, and if there's nothing to worry about, that's bad 
:-)

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ