Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932496Ab2EJPOk (ORCPT ); Thu, 10 May 2012 11:14:40 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:54965 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757749Ab2EJPOi (ORCPT ); Thu, 10 May 2012 11:14:38 -0400 Date: Fri, 11 May 2012 00:14:27 +0900 From: Minchan Kim To: Marek Szyprowski Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-mm@kvack.org, linaro-mm-sig@lists.linaro.org, Michal Nazarewicz , Kyungmin Park , Russell King , Andrew Morton , KAMEZAWA Hiroyuki , Daniel Walker , Mel Gorman , Arnd Bergmann , Jesse Barker , Jonathan Corbet , Chunsang Jeong , Dave Hansen , Benjamin Gaignard , Rob Clark , Ohad Ben-Cohen , Sandeep Patil Subject: Re: [PATCH] drivers: cma: don't fail if migration returns -EAGAIN Message-ID: <20120510151427.GB2394@barrios> References: <1333462221-3987-1-git-send-email-m.szyprowski@samsung.com> <1336655975-15729-1-git-send-email-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1336655975-15729-1-git-send-email-m.szyprowski@samsung.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1777 Lines: 43 On Thu, May 10, 2012 at 03:19:35PM +0200, Marek Szyprowski wrote: > alloc_contig_range() function might return -EAGAIN if migrate_pages() call migrate_page never return -EAGAIN and I can't find any -EAGAIN return in alloc_contig_range. Am I seeing different tree? > fails for some temporarily locked pages. Such case should not be fatal > to dma_alloc_from_contiguous(), which should retry allocation like in case > of -EBUSY error. > > Reported-by: Haojian Zhuang > Signed-off-by: Marek Szyprowski > --- > drivers/base/dma-contiguous.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c > index 78efb03..e46e2fb 100644 > --- a/drivers/base/dma-contiguous.c > +++ b/drivers/base/dma-contiguous.c > @@ -346,7 +346,7 @@ struct page *dma_alloc_from_contiguous(struct device *dev, int count, > if (ret == 0) { > bitmap_set(cma->bitmap, pageno, count); > break; > - } else if (ret != -EBUSY) { > + } else if (ret != -EBUSY && ret != -EAGAIN) { > goto error; > } > pr_debug("%s(): memory range at %p is busy, retrying\n", > -- > 1.7.1.569.g6f426 > > -- > 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/ . > Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ > Don't email: email@kvack.org -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/