Hi,

I was trying to attempt DIRECT I/O on 4K aligned kernel buffer, but it looks
like filesystems are not happy with kernel buffers. I tried doing IO on
ext3, ext4 and NFS. Also I tried to allocate kernel buffer with kmalloc,
vmalloc and static kernel buffer, but nothing help.

My guess is get_user_pages called to pin pages in memory is not happy with
kernel pages and it is returning -EFAULT.

As a workaround, I tried to map virtual memory in process address space
using do_mmap and it worked fine. Although it helped, it looks like a hack
and causes performance penalty.

Please let me know if there is another cleaner way of doing this?

Thanks,
Rajat

Reply via email to