From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 09 Dec 2015 16:03:12 +0100 (CET) Received: from outbound-smtp08.blacknight.com ([46.22.139.13]:51617 "EHLO outbound-smtp08.blacknight.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27007243AbbLIPDKCAda5 (ORCPT ); Wed, 9 Dec 2015 16:03:10 +0100 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp08.blacknight.com (Postfix) with ESMTPS id 884071C1C38 for ; Wed, 9 Dec 2015 15:03:04 +0000 (GMT) Received: (qmail 21247 invoked from network); 9 Dec 2015 15:03:04 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[37.228.246.231]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES256-SHA encrypted, authenticated); 9 Dec 2015 15:03:04 -0000 Date: Wed, 9 Dec 2015 15:03:02 +0000 From: Mel Gorman To: Qais Yousef Cc: linux-mips@linux-mips.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ralf@linux-mips.org, akpm@linux-foundation.org Subject: Re: [PATCH v2] MIPS: fix DMA contiguous allocation Message-ID: <20151209150302.GB15910@techsingularity.net> References: <1449672845-2196-1-git-send-email-qais.yousef@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1449672845-2196-1-git-send-email-qais.yousef@imgtec.com> User-Agent: Mutt/1.5.23 (2014-03-12) Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 50487 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: mgorman@techsingularity.net Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On Wed, Dec 09, 2015 at 02:54:05PM +0000, Qais Yousef wrote: > Recent changes to how GFP_ATOMIC is defined seems to have broken the condition > to use mips_alloc_from_contiguous() in mips_dma_alloc_coherent(). > > I couldn't bottom out the exact change but I think it's this one > > d0164adc89f6 (mm, page_alloc: distinguish between being unable to sleep, > unwilling to sleep and avoiding waking kswapd) > > From what I see GFP_ATOMIC has multiple bits set and the check for !(gfp > & GFP_ATOMIC) isn't enough. > > The reason behind this condition is to check whether we can potentially do > a sleeping memory allocation. Use gfpflags_allow_blocking() instead which > should be more robust. > > Signed-off-by: Qais Yousef Acked-by: Mel Gorman -- Mel Gorman SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by kanga.kvack.org (Postfix) with ESMTP id AF57B6B0254 for ; Wed, 9 Dec 2015 10:03:06 -0500 (EST) Received: by wmec201 with SMTP id c201so264901543wme.0 for ; Wed, 09 Dec 2015 07:03:06 -0800 (PST) Received: from outbound-smtp01.blacknight.com (outbound-smtp01.blacknight.com. [81.17.249.7]) by mx.google.com with ESMTPS id wp8si11869138wjb.0.2015.12.09.07.03.04 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 09 Dec 2015 07:03:05 -0800 (PST) Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp01.blacknight.com (Postfix) with ESMTPS id 7920998D00 for ; Wed, 9 Dec 2015 15:03:04 +0000 (UTC) Date: Wed, 9 Dec 2015 15:03:02 +0000 From: Mel Gorman Subject: Re: [PATCH v2] MIPS: fix DMA contiguous allocation Message-ID: <20151209150302.GB15910@techsingularity.net> References: <1449672845-2196-1-git-send-email-qais.yousef@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1449672845-2196-1-git-send-email-qais.yousef@imgtec.com> Sender: owner-linux-mm@kvack.org List-ID: To: Qais Yousef Cc: linux-mips@linux-mips.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ralf@linux-mips.org, akpm@linux-foundation.org On Wed, Dec 09, 2015 at 02:54:05PM +0000, Qais Yousef wrote: > Recent changes to how GFP_ATOMIC is defined seems to have broken the condition > to use mips_alloc_from_contiguous() in mips_dma_alloc_coherent(). > > I couldn't bottom out the exact change but I think it's this one > > d0164adc89f6 (mm, page_alloc: distinguish between being unable to sleep, > unwilling to sleep and avoiding waking kswapd) > > From what I see GFP_ATOMIC has multiple bits set and the check for !(gfp > & GFP_ATOMIC) isn't enough. > > The reason behind this condition is to check whether we can potentially do > a sleeping memory allocation. Use gfpflags_allow_blocking() instead which > should be more robust. > > Signed-off-by: Qais Yousef Acked-by: Mel Gorman -- Mel Gorman SUSE Labs -- 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