All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-mm@kvack.org, paulus@samba.org,
	linuxppc-dev@lists.ozlabs.org,
	Michal Nazarewicz <mina86@mina86.com>
Subject: Re: [RFC PATCH 1/3] mm/cma: Move dma contiguous changes into a seperate config
Date: Fri, 28 Jun 2013 11:27:38 +0530	[thread overview]
Message-ID: <87li5u93ql.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <51CC2530.2060605@samsung.com>

Marek Szyprowski <m.szyprowski@samsung.com> writes:

> Hello,
>
> On 6/24/2013 10:25 AM, Aneesh Kumar K.V wrote:
>> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
>>
>> We want to use CMA for allocating hash page table and real mode area for
>> PPC64. Hence move DMA contiguous related changes into a seperate config
>> so that ppc64 can enable CMA without requiring DMA contiguous.
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>
> It's nice to see that CMA is gaining another client in mainline Linux 
> kernel.
> I also like the idea of adding CONFIG_DMA_CMA for DMA-mapping related CMA
> use to let others to use alloc_contig_range() interface.
>
> However I noticed that You have almost copied the whole drivers/base.c for
> separate use with PPC64 KVM. Is this really necessary? I think it should be
> possible to isolate some common code, which plays with contiguous region
> management and use it for both alloc_contig_range() clients (dma-mapping and
> ppc64 kvm).
>

One of the reason for having book3s_hv_cma.c is that few specifics vary
between dma contiguous. We have different alignment needs. Also i will be
switching the allocation to 256K chunks, not page size, in the next
update. It is also not large code duplication. I will post V2 soon and
may be we can see if it is worth consolidating.

-aneesh

WARNING: multiple messages have this Message-ID (diff)
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-mm@kvack.org, benh@kernel.crashing.org, paulus@samba.org,
	linuxppc-dev@lists.ozlabs.org,
	Michal Nazarewicz <mina86@mina86.com>
Subject: Re: [RFC PATCH 1/3] mm/cma: Move dma contiguous changes into a seperate config
Date: Fri, 28 Jun 2013 11:27:38 +0530	[thread overview]
Message-ID: <87li5u93ql.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <51CC2530.2060605@samsung.com>

Marek Szyprowski <m.szyprowski@samsung.com> writes:

> Hello,
>
> On 6/24/2013 10:25 AM, Aneesh Kumar K.V wrote:
>> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
>>
>> We want to use CMA for allocating hash page table and real mode area for
>> PPC64. Hence move DMA contiguous related changes into a seperate config
>> so that ppc64 can enable CMA without requiring DMA contiguous.
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>
> It's nice to see that CMA is gaining another client in mainline Linux 
> kernel.
> I also like the idea of adding CONFIG_DMA_CMA for DMA-mapping related CMA
> use to let others to use alloc_contig_range() interface.
>
> However I noticed that You have almost copied the whole drivers/base.c for
> separate use with PPC64 KVM. Is this really necessary? I think it should be
> possible to isolate some common code, which plays with contiguous region
> management and use it for both alloc_contig_range() clients (dma-mapping and
> ppc64 kvm).
>

One of the reason for having book3s_hv_cma.c is that few specifics vary
between dma contiguous. We have different alignment needs. Also i will be
switching the allocation to 256K chunks, not page size, in the next
update. It is also not large code duplication. I will post V2 soon and
may be we can see if it is worth consolidating.

-aneesh

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-06-28  5:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24  8:25 [RFC PATCH 1/3] mm/cma: Move dma contiguous changes into a seperate config Aneesh Kumar K.V
2013-06-24  8:25 ` Aneesh Kumar K.V
2013-06-24  8:25 ` [RFC PATCH 2/3] powerpc: Contiguous memory allocator based hash page allocation Aneesh Kumar K.V
2013-06-24  8:25   ` Aneesh Kumar K.V
2013-06-24  8:25 ` [RFC PATCH 3/3] powerpc: Contiguous memory allocator based RMA allocation Aneesh Kumar K.V
2013-06-24  8:25   ` Aneesh Kumar K.V
2013-06-25 10:15 ` [RFC PATCH 1/3] mm/cma: Move dma contiguous changes into a seperate config Anshuman Khandual
2013-06-25 10:15   ` Anshuman Khandual
2013-06-27 11:42 ` Marek Szyprowski
2013-06-27 11:42   ` Marek Szyprowski
2013-06-28  5:57   ` Aneesh Kumar K.V [this message]
2013-06-28  5:57     ` Aneesh Kumar K.V

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=87li5u93ql.fsf@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mina86@mina86.com \
    --cc=paulus@samba.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.