From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751227AbbLIPDM (ORCPT ); Wed, 9 Dec 2015 10:03:12 -0500 Received: from outbound-smtp01.blacknight.com ([81.17.249.7]:37248 "EHLO outbound-smtp01.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbbLIPDL (ORCPT ); Wed, 9 Dec 2015 10:03:11 -0500 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) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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