ion kernel mapping implementation

Alexey Skidanov alexey.skidanov at intel.com
Mon Feb 12 20:25:52 UTC 2018



On 02/12/2018 10:09 PM, Laura Abbott wrote:
> On 02/12/2018 11:21 AM, Alexey Skidanov wrote:
>>
>>
>> On 02/12/2018 08:30 PM, Laura Abbott wrote:
>>> On 02/10/2018 01:43 AM, Alexey Skidanov wrote:
>>>> Hi,
>>>>
>>>> Current ion kernel mapping implementation uses vmap() to map previously
>>>> allocated buffers into kernel virtual address space. On 32 bit
>>>> platforms, vmap() might fail on large enough buffers due to the limited
>>>> available vmalloc space.
>>>>
>>>> dma_buf_kmap() should guarantee that only one page is mapped at a time.
>>>> So, probably it's better to implement dma_buf_kmap() by kmap() and not
>>>> by vmap()?
>>>>
>>>> Thanks,
>>>> Alexey
>>>>
>>>
>>> The short answer is yes.
>>>
>>> The long answer is that the conversion to the dma_buf APIs kept the
>>> existing Ion behavior which mapped the entire buffer. We got away
>>> with this because the in kernel mapping APIs are used very infrequently
>>> and with buffers that never triggered an exhaustion of vmalloc
>>> space.
>>>
>>> If we actually start seeing problems with this we can fix it up
>>> but I don't consider this a high priority item.
>> I have the patch fixing this potential bug. I would like to submit it
>> for review, if you are ok with it. Please, just let me know.
> 
> Yes, please submit from review and we can go from there.
> 
Ok. Will submit it.
>>>
>>> Thanks,
>>> Laura
>>
>> Thanks,
>> Alexey
>>
> 
Thanks,
Alexey


More information about the devel mailing list