Direct io failed with ion

Laura Abbott labbott at redhat.com
Thu Oct 11 19:28:19 UTC 2018


On 10/11/2018 03:44 AM, Rock Lee wrote:
> On Thu, Oct 11, 2018 at 4:12 PM Dan Carpenter <dan.carpenter at oracle.com> wrote:
>>
>> On Thu, Oct 11, 2018 at 11:24:49AM +0800, Rock Lee wrote:
>>> Hi
>>>      I tested direct io with a ion allocated buffer, got a -EFAULT
>>> error. It turned out that ion_mmap() set VM_IO & VM_PFNMAP, but
>>> check_vma_flags() (do_direct_IO() calls it) doesn't allow that VMA has
>>> these flags set. Could you give me any hit that could solve this
>>> issue?
>>>
>>
>> You must be using an old kernel because ion_mmap() was changed in April.
> 
> Yes, I am using linux-4.4 which is a little old. Even in linux-4.18,
> ion_mmap() still callls remap_pfn_range() if the heap is
> carvout/system/cma/chunk. But remap_pfn_range() set VM_IO & IO_PFNMAP
> as well.
> 

Yes, I don't think there's a way around this without moving away
from remap_pfn_range. I thought there was a reason why we
needed to use remap_pfn_range but it's escaping me. If you wanted
to do the work to move away from remap_pfn_range, that would
be appreciated.

Thanks,
Laura




More information about the devel mailing list