[Linaro-mm-sig] Requirements for Memory Management

이상현 sanghyun75.lee at samsung.com
Mon Apr 25 10:50:08 UTC 2011


Hi all,

The followings are Samsung S.LSI's requirement for unified memory manager.

1. User space API
1.1. New memory management(MM) features should includes followings 
     to the user space.: UMP
A. user space API for memory allocation from system memory: UMP
   Any user process can allocate memory from kernel space by new MM model.
B. user space API for cache operations: flush, clean, invalidate
   Any user process can do cache operation on the allocated memory.
C. user space API for mapping memory attribute as cacheable
   When the system memory mapped into the user space,
   user process can set its property as cacheable.
D. user space API for mapping memory attribute as non-cacheable
   When the system memory mapped into the user space,
   user process can set its property as non-cacheable.

1.2. Inter-process memory sharing: UMP
New MM features should provide memory sharing between user process.

A. Memory allocated by user space can be shared between user processes.
B. Memory allocated by kernel space can be shared between user processes.

2. Kernel space API
New MM features should includes followings to the kernel space.: CMA, VCMM

2-1. Physically memory allocator
A. kernel space API for contiguous memory allocation: CMA(*)
B. kernel space API for non-contiguous memory allocation: VCMM (*)
C. start address alignment: CMA, VCMM
D. selectable allocating region: CMA
*refer to the bottom's extension.

2-2. Device virtual address management: VCMM
New MM features should provide 
the way of managing device virtual memory address as like followings:

A. IOMMU(System MMU) support
   IOMMU is a kind of memory MMU, but IOMMU is dedicated for each device.
B. device virtual address mapping for each device
C. virtual memory allocation
D. mapping / remapping between phys and device virtual address
E. dedicated device virtual address space for each device
F. address translation between address space

             U.V
            /   \
          K.V - P.A
           \    /
             D.V

        U.V: User space address
        K.A: Kernel space address
        P.A: Physical address
        D.V: Device virtual address

3. Extensions
A. extension for custom physical memory allocator
B. extension for custom MMU controller

-------------------------------------------------------------------------
You can find the implementation in the following git repository.
http://git.kernel.org/?p=linux/kernel/git/kki_ap/linux-2.6-
samsung.git;a=tree;hb=refs/heads/2.6.36-samsung

1. UMP (Unified Memory Provider)
- The UMP is an auxiliary component which enables memory to be shared
  across different applications, drivers and hardware components.
- http://blogs.arm.com/multimedia/249-making-the-mali-gpu-device-driver-
open-source/page__cid__133__show__newcomment/
- Suggested by ARM, Not submitted yet.
- implementation
  drivers/media/video/samsung/ump/*

2. VCMM (Virtual Contiguous Memory Manager)
- The VCMM is a framework to deal with multiple IOMMUs in a system
  with intuitive and abstract objects
- Submitted by Michal Nazarewicz @Samsung-SPRC
- Also submitted by KyongHo Cho @Samsung-SYS.LSI
- http://article.gmane.org/gmane.linux.kernel.mm/56912/match=vcm
- implementation
  include/linux/vcm.h
  include/linux/vcm-drv.h
  mm/vcm.c
  arch/arm/plat-s5p/s5p-vcm.c
  arch/amr/plat-s5p/include/plat/s5p-vcm.h

3. CMA (Contiguous Memory Allocator)
- The Contiguous Memory Allocator (CMA) is a framework, which allows
  setting up a machine-specific configuration for physically-contiguous
  memory management. Memory for devices is then allocated according
  to that configuration.
- http://lwn.net/Articles/396702/
- http://www.spinics.net/lists/linux-media/msg26486.html
- Submitted by Michal Nazarewicz @Samsung-SPRC
- implementation
  mm/cma.c
  include/linux/cma.h

4. SYS.MMU
- System MMU supports address transition from VA to PA.
- http://thread.gmane.org/gmane.linux.kernel.samsung-soc/3909
- Submitted by Sangbeom Kim
- Merged by Kukjin Kim, ARM/S5P ARM ARCHITECTURES maintainer
- implementation
  arch/arm/plat-s5p/sysmmu.c
  arch/arm/plat-s5p/include/plat/sysmmu.h




More information about the Linaro-mm-sig mailing list