From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Hurley Date: Tue, 04 Nov 2014 03:38:48 +0000 Subject: Re: CMA: test_pages_isolated failures in alloc_contig_range Message-Id: <54584A48.9000409@hurleysoftware.com> List-Id: References: <2457604.k03RC2Mv4q@avalon> <544F9EAA.5010404@hurleysoftware.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Michal Nazarewicz , Laurent Pinchart , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, Bartlomiej Zolnierkiewicz , Minchan Kim , Andrew Morton On 10/28/2014 12:57 PM, Michal Nazarewicz wrote: >> On 10/28/2014 08:38 AM, Michal Nazarewicz wrote: >>> 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. > > On Tue, Oct 28 2014, Peter Hurley wrote: >> 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. > > I think it could be argued both ways. The condition is not an error, > since in many cases cma_alloc will be able to continue, but it *is* an > undesired state. As such it's not an error but feels to me a bit more > then just information, hence a warning. I don't care either way, though. This "undesired state" is trivially reproducible on 3.16.y on the x86 arch; a smattering of these will show up just building a distro kernel. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qg0-f45.google.com (mail-qg0-f45.google.com [209.85.192.45]) by kanga.kvack.org (Postfix) with ESMTP id ABE0E6B00DF for ; Mon, 3 Nov 2014 22:38:56 -0500 (EST) Received: by mail-qg0-f45.google.com with SMTP id z107so9879007qgd.18 for ; Mon, 03 Nov 2014 19:38:56 -0800 (PST) Received: from n23.mail01.mtsvc.net (mailout32.mail01.mtsvc.net. [216.70.64.70]) by mx.google.com with ESMTPS id s7si32666310qak.86.2014.11.03.19.38.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Nov 2014 19:38:55 -0800 (PST) Message-ID: <54584A48.9000409@hurleysoftware.com> Date: Mon, 03 Nov 2014 22:38:48 -0500 From: Peter Hurley MIME-Version: 1.0 Subject: Re: CMA: test_pages_isolated failures in alloc_contig_range References: <2457604.k03RC2Mv4q@avalon> <544F9EAA.5010404@hurleysoftware.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Nazarewicz , Laurent Pinchart , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, Bartlomiej Zolnierkiewicz , Minchan Kim , Andrew Morton On 10/28/2014 12:57 PM, Michal Nazarewicz wrote: >> On 10/28/2014 08:38 AM, Michal Nazarewicz wrote: >>> 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. > > On Tue, Oct 28 2014, Peter Hurley wrote: >> 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. > > I think it could be argued both ways. The condition is not an error, > since in many cases cma_alloc will be able to continue, but it *is* an > undesired state. As such it's not an error but feels to me a bit more > then just information, hence a warning. I don't care either way, though. This "undesired state" is trivially reproducible on 3.16.y on the x86 arch; a smattering of these will show up just building a distro kernel. -- 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752090AbaKDDi7 (ORCPT ); Mon, 3 Nov 2014 22:38:59 -0500 Received: from mailout32.mail01.mtsvc.net ([216.70.64.70]:50563 "EHLO n23.mail01.mtsvc.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752017AbaKDDiz (ORCPT ); Mon, 3 Nov 2014 22:38:55 -0500 Message-ID: <54584A48.9000409@hurleysoftware.com> Date: Mon, 03 Nov 2014 22:38:48 -0500 From: Peter Hurley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Michal Nazarewicz , Laurent Pinchart , linux-mm@kvack.org CC: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, Bartlomiej Zolnierkiewicz , Minchan Kim , Andrew Morton Subject: Re: CMA: test_pages_isolated failures in alloc_contig_range References: <2457604.k03RC2Mv4q@avalon> <544F9EAA.5010404@hurleysoftware.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Authenticated-User: 990527 peter@hurleysoftware.com X-MT-ID: 8FA290C2A27252AACF65DBC4A42F3CE3735FB2A4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/28/2014 12:57 PM, Michal Nazarewicz wrote: >> On 10/28/2014 08:38 AM, Michal Nazarewicz wrote: >>> 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. > > On Tue, Oct 28 2014, Peter Hurley wrote: >> 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. > > I think it could be argued both ways. The condition is not an error, > since in many cases cma_alloc will be able to continue, but it *is* an > undesired state. As such it's not an error but feels to me a bit more > then just information, hence a warning. I don't care either way, though. This "undesired state" is trivially reproducible on 3.16.y on the x86 arch; a smattering of these will show up just building a distro kernel.