From: minchan@kernel.org (Minchan Kim)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] ARM: remove consistent dma region and use common vmalloc range for dma allocations
Date: Mon, 16 Apr 2012 10:32:41 +0900 [thread overview]
Message-ID: <4F8B76B9.1060505@kernel.org> (raw)
In-Reply-To: <20120413183813.GO24211@n2100.arm.linux.org.uk>
On 04/14/2012 03:38 AM, Russell King - ARM Linux wrote:
> On Fri, Apr 13, 2012 at 04:05:50PM +0200, Marek Szyprowski wrote:
>> This patch changes dma-mapping subsystem to use generic vmalloc areas
>> for all consistent dma allocations. This increases the total size limit
>> of the consistent allocations and removes platform hacks and a lot of
>> duplicated code.
>
> NAK. I don't think you appreciate the contexts from which the dma coherent
> code can be called from, and the reason why we pre-allocate the page
> tables (so that IRQ-based allocations work.)
>
> The vmalloc region doesn't allow that because page tables are allocated
> using GFP_KERNEL not GFP_ATOMIC.
>
> Sorry.
>
Off-topic.
I don't know why vmalloc functions have gfp_t argument.
As Russel pointed out, we allocates page tables with GFP_KERNEL
regardless of gfp_t passed.
It means gfp_t passed is useless.
I see there are many cases calling __vmalloc with GFP_NOFS, even
GFP_ATOMIC. Then, it could end up deadlocking in reclaim context or
schedule bug.
I'm not sure why we can't see such bugs until now.
If I didn't miss something, Shouldn't we fix it?
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo at 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:<a href=mailto:"dont@kvack.org"> email at kvack.org</a>
>
WARNING: multiple messages have this Message-ID (diff)
From: Minchan Kim <minchan@kernel.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Rik van Riel <riel@redhat.com>, Hugh Dickins <hughd@google.com>,
Mel Gorman <mgorman@suse.de>,
Johannes Weiner <hannes@cmpxchg.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
linux-arm-kernel@lists.infradead.org,
linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Kyungmin Park <kyungmin.park@samsung.com>,
Arnd Bergmann <arnd@arndb.de>,
Chunsang Jeong <chunsang.jeong@linaro.org>,
Krishna Reddy <vdumpa@nvidia.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Hiroshi Doyu <hdoyu@nvidia.com>,
Subash Patel <subashrp@gmail.com>
Subject: Re: [PATCH 4/4] ARM: remove consistent dma region and use common vmalloc range for dma allocations
Date: Mon, 16 Apr 2012 10:32:41 +0900 [thread overview]
Message-ID: <4F8B76B9.1060505@kernel.org> (raw)
In-Reply-To: <20120413183813.GO24211@n2100.arm.linux.org.uk>
On 04/14/2012 03:38 AM, Russell King - ARM Linux wrote:
> On Fri, Apr 13, 2012 at 04:05:50PM +0200, Marek Szyprowski wrote:
>> This patch changes dma-mapping subsystem to use generic vmalloc areas
>> for all consistent dma allocations. This increases the total size limit
>> of the consistent allocations and removes platform hacks and a lot of
>> duplicated code.
>
> NAK. I don't think you appreciate the contexts from which the dma coherent
> code can be called from, and the reason why we pre-allocate the page
> tables (so that IRQ-based allocations work.)
>
> The vmalloc region doesn't allow that because page tables are allocated
> using GFP_KERNEL not GFP_ATOMIC.
>
> Sorry.
>
Off-topic.
I don't know why vmalloc functions have gfp_t argument.
As Russel pointed out, we allocates page tables with GFP_KERNEL
regardless of gfp_t passed.
It means gfp_t passed is useless.
I see there are many cases calling __vmalloc with GFP_NOFS, even
GFP_ATOMIC. Then, it could end up deadlocking in reclaim context or
schedule bug.
I'm not sure why we can't see such bugs until now.
If I didn't miss something, Shouldn't we fix it?
> --
> 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:<a href=mailto:"dont@kvack.org"> email@kvack.org</a>
>
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Minchan Kim <minchan@kernel.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Rik van Riel <riel@redhat.com>, Hugh Dickins <hughd@google.com>,
Mel Gorman <mgorman@suse.de>,
Johannes Weiner <hannes@cmpxchg.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
linux-arm-kernel@lists.infradead.org,
linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Kyungmin Park <kyungmin.park@samsung.com>,
Arnd Bergmann <arnd@arndb.de>,
Chunsang Jeong <chunsang.jeong@linaro.org>,
Krishna Reddy <vdumpa@nvidia.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Hiroshi Doyu <hdoyu@nvidia.com>,
Subash Patel <subashrp@gmail.com>
Subject: Re: [PATCH 4/4] ARM: remove consistent dma region and use common vmalloc range for dma allocations
Date: Mon, 16 Apr 2012 10:32:41 +0900 [thread overview]
Message-ID: <4F8B76B9.1060505@kernel.org> (raw)
In-Reply-To: <20120413183813.GO24211@n2100.arm.linux.org.uk>
On 04/14/2012 03:38 AM, Russell King - ARM Linux wrote:
> On Fri, Apr 13, 2012 at 04:05:50PM +0200, Marek Szyprowski wrote:
>> This patch changes dma-mapping subsystem to use generic vmalloc areas
>> for all consistent dma allocations. This increases the total size limit
>> of the consistent allocations and removes platform hacks and a lot of
>> duplicated code.
>
> NAK. I don't think you appreciate the contexts from which the dma coherent
> code can be called from, and the reason why we pre-allocate the page
> tables (so that IRQ-based allocations work.)
>
> The vmalloc region doesn't allow that because page tables are allocated
> using GFP_KERNEL not GFP_ATOMIC.
>
> Sorry.
>
Off-topic.
I don't know why vmalloc functions have gfp_t argument.
As Russel pointed out, we allocates page tables with GFP_KERNEL
regardless of gfp_t passed.
It means gfp_t passed is useless.
I see there are many cases calling __vmalloc with GFP_NOFS, even
GFP_ATOMIC. Then, it could end up deadlocking in reclaim context or
schedule bug.
I'm not sure why we can't see such bugs until now.
If I didn't miss something, Shouldn't we fix it?
> --
> 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:<a href=mailto:"dont@kvack.org"> email@kvack.org</a>
>
next prev parent reply other threads:[~2012-04-16 1:32 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 14:05 [PATCH 0/4] ARM: replace custom consistent dma region with vmalloc Marek Szyprowski
2012-04-13 14:05 ` Marek Szyprowski
2012-04-13 14:05 ` Marek Szyprowski
2012-04-13 14:05 ` [PATCH 1/4] mm: vmalloc: use const void * for caller argument Marek Szyprowski
2012-04-13 14:05 ` Marek Szyprowski
2012-04-13 14:05 ` Marek Szyprowski
2012-04-13 14:05 ` [PATCH 2/4] mm: vmalloc: export find_vm_area() function Marek Szyprowski
2012-04-13 14:05 ` Marek Szyprowski
2012-04-13 14:05 ` Marek Szyprowski
2012-04-13 14:05 ` [PATCH 3/4] mm: vmalloc: add VM_DMA flag to indicate areas used by dma-mapping framework Marek Szyprowski
2012-04-13 14:05 ` Marek Szyprowski
2012-04-13 14:05 ` Marek Szyprowski
2012-04-13 14:05 ` [PATCH 4/4] ARM: remove consistent dma region and use common vmalloc range for dma allocations Marek Szyprowski
2012-04-13 14:05 ` Marek Szyprowski
2012-04-13 14:05 ` Marek Szyprowski
2012-04-13 18:38 ` Russell King - ARM Linux
2012-04-13 18:38 ` Russell King - ARM Linux
2012-04-13 18:38 ` Russell King - ARM Linux
2012-04-16 1:32 ` Minchan Kim [this message]
2012-04-16 1:32 ` Minchan Kim
2012-04-16 1:32 ` Minchan Kim
2012-04-17 18:18 ` KOSAKI Motohiro
2012-04-17 18:18 ` KOSAKI Motohiro
2012-04-17 18:18 ` KOSAKI Motohiro
2012-04-23 12:02 ` [Linaro-mm-sig] [PATCH 0/4] ARM: replace custom consistent dma region with vmalloc Abhinav Kochhar
2012-04-23 20:58 ` Daniel Vetter
2012-04-23 20:58 ` Daniel Vetter
2012-04-23 20:58 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F8B76B9.1060505@kernel.org \
--to=minchan@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.