linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] CMA: generalize CMA reserved area management code
@ 2014-06-03  1:11 Joonsoo Kim
  2014-06-03  1:11 ` [RFC PATCH 1/3] CMA: generalize CMA reserved area management functionality Joonsoo Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Joonsoo Kim @ 2014-06-03  1:11 UTC (permalink / raw)
  To: Andrew Morton, Aneesh Kumar K.V, Marek Szyprowski, Michal Nazarewicz
  Cc: Russell King - ARM Linux, kvm, linux-mm, Gleb Natapov,
	Greg Kroah-Hartman, Alexander Graf, kvm-ppc, linux-kernel,
	Minchan Kim, Paul Mackerras, Paolo Bonzini, Joonsoo Kim,
	linuxppc-dev, linux-arm-kernel

Currently, there are two users on CMA functionality, one is the DMA
subsystem and the other is the kvm on powerpc. They have their own code
to manage CMA reserved area even if they looks really similar.
>From my guess, it is caused by some needs on bitmap management. Kvm side
wants to maintain bitmap not for 1 page, but for more size. Eventually it
use bitmap where one bit represents 64 pages.

When I implement CMA related patches, I should change those two places
to apply my change and it seem to be painful to me. I want to change
this situation and reduce future code management overhead through
this patch.

This change could also help developer who want to use CMA in their
new feature development, since they can use CMA easily without
copying & pasting this reserved area management code.

Now, we are in merge window, so this is not for merging. I'd like to
listen opinion from people who related to this stuff before actually
trying to merge this patchset. If all agree with this change, I will
resend it after rc1.

Thanks.

Joonsoo Kim (3):
  CMA: generalize CMA reserved area management functionality
  DMA, CMA: use general CMA reserved area management framework
  PPC, KVM, CMA: use general CMA reserved area management framework

 arch/powerpc/kvm/book3s_hv_builtin.c |   17 +-
 arch/powerpc/kvm/book3s_hv_cma.c     |  240 -------------------------
 arch/powerpc/kvm/book3s_hv_cma.h     |   27 ---
 drivers/base/Kconfig                 |   10 --
 drivers/base/dma-contiguous.c        |  230 ++----------------------
 include/linux/cma.h                  |   28 +++
 include/linux/dma-contiguous.h       |    7 +-
 mm/Kconfig                           |   11 ++
 mm/Makefile                          |    1 +
 mm/cma.c                             |  329 ++++++++++++++++++++++++++++++++++
 10 files changed, 396 insertions(+), 504 deletions(-)
 delete mode 100644 arch/powerpc/kvm/book3s_hv_cma.c
 delete mode 100644 arch/powerpc/kvm/book3s_hv_cma.h
 create mode 100644 include/linux/cma.h
 create mode 100644 mm/cma.c

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-06-11  8:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-03  1:11 [RFC PATCH 0/3] CMA: generalize CMA reserved area management code Joonsoo Kim
2014-06-03  1:11 ` [RFC PATCH 1/3] CMA: generalize CMA reserved area management functionality Joonsoo Kim
2014-06-03  6:56   ` Michal Nazarewicz
2014-06-10  2:41     ` Joonsoo Kim
2014-06-05 17:39   ` Aneesh Kumar K.V
2014-06-10  3:01     ` Joonsoo Kim
2014-06-03  1:11 ` [RFC PATCH 2/3] DMA, CMA: use general CMA reserved area management framework Joonsoo Kim
2014-06-03  7:00   ` Michal Nazarewicz
2014-06-10  2:49     ` Joonsoo Kim
2014-06-11  8:24       ` Michal Nazarewicz
2014-06-03  1:11 ` [RFC PATCH 3/3] PPC, KVM, " Joonsoo Kim
2014-06-03  7:02   ` Michal Nazarewicz
2014-06-03  9:20     ` Paolo Bonzini
2014-06-05 17:00       ` Aneesh Kumar K.V

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).