Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1398834

Re: [Question] Missing data after DMA read transfer - mm issue with transparent huge page?

From Nicolas Morey Chaisemartin <devel@morey-chaisemartin.com>
Newsgroups linux.kernel
Subject Re: [Question] Missing data after DMA read transfer - mm issue with transparent huge page?
Date 2016-05-11 11:30 +0200
Message-ID <rxyCS-5ns-5@gated-at.bofh.it> (permalink)
References (2 earlier) <ruFAU-6ok-61@gated-at.bofh.it> <rxcM3-qT-41@gated-at.bofh.it> <rxcM3-qT-39@gated-at.bofh.it> <rxdRL-1mg-5@gated-at.bofh.it> <rxg3g-3eA-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



Le 05/10/2016 à 03:34 PM, Jerome Glisse a écrit :
> On Tue, May 10, 2016 at 01:15:02PM +0200, Nicolas Morey Chaisemartin wrote:
>> Le 05/10/2016 à 12:01 PM, Jerome Glisse a écrit :
>>> On Tue, May 10, 2016 at 09:04:36AM +0200, Nicolas Morey Chaisemartin wrote:
>>>> Le 05/03/2016 à 12:11 PM, Jerome Glisse a écrit :
>>>>> On Mon, May 02, 2016 at 09:04:02PM -0700, Hugh Dickins wrote:
>>>>>> On Fri, 29 Apr 2016, Nicolas Morey Chaisemartin wrote:
> [...]
>
>>>> Hi,
>>>>
>>>> I backported the patch to 3.10 (had to copy paste pmd_protnone defitinition from 4.5) and it's working !
>>>> I'll open a ticket in Redhat tracker to try and get this fixed in RHEL7.
>>>>
>>>> I have a dumb question though: how can we end up in numa/misplaced memory code on a single socket system?
>>>>
>>> This patch is not a fix, do you see bug message in kernel log ? Because if
>>> you do that it means we have a bigger issue.
>> I don't see any on my 3.10. I have DMA_API_DEBUG enabled but I don't think it has an impact.
> My patch can't be backported to 3.10 as is, you most likely need to replace
> pmd_protnone() by pmd_numa()
>
>>> You did not answer one of my previous question, do you set get_user_pages
>>> with write = 1 as a paremeter ?
>> For the read from the device, yes:
>>         down_read(&current->mm->mmap_sem);
>>         res = get_user_pages(
>>                 current,
>>                 current->mm,
>>                 (unsigned long) iov->host_addr,
>>                 page_count,
>>                 (write_mode == 0) ? 1 : 0,      /* write */
>>                 0,      /* force */
>>                 &trans->pages[sg_o],
>>                 NULL);
>>         up_read(&current->mm->mmap_sem);
> As i don't have context to infer how write_mode is set above, do you mind
> retesting your driver and always asking for write no matter what ?
write_mode is 0 for car2host transfers so yes, write_mode is 1.
During debug I tried with write_mode=1 and force=1 in all cases and it failed too.
>>> Also it would be a lot easier if you were testing with lastest 4.6 or 4.5
>>> not RHEL kernel as they are far appart and what might looks like same issue
>>> on both might be totaly different bugs.
>> Is a RPM from elrepo ok?
>> http://elrepo.org/linux/kernel/el7/SRPMS/
> Yes should be ok for testing.
>
I tried the elrpo 4.5.2 package without your patch and my test fails, sadly the src rpm from elrepo does not contaisn the kernel sources and I haven't looked how to get the proper tarball.
I tried to rebuild a src rpm for a fedora 24 (kernel 4.5.3) and it works without your patch. I'm not sure what differs in their config. I'll keep digging.

Nicolas

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Nicolas Morey Chaisemartin <devel@morey-chaisemartin.com> - 2016-04-29 11:30 +0200
  Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Hugh Dickins <hughd@google.com> - 2016-05-03 06:10 +0200
    Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Jerome Glisse <j.glisse@gmail.com> - 2016-05-03 12:20 +0200
      Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-05-03 13:10 +0200
      Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Jerome Glisse <j.glisse@gmail.com> - 2016-05-10 12:10 +0200
        Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Nicolas Morey Chaisemartin <devel@morey-chaisemartin.com> - 2016-05-10 13:20 +0200
          Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Jerome Glisse <j.glisse@gmail.com> - 2016-05-10 15:40 +0200
            Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Nicolas Morey Chaisemartin <devel@morey-chaisemartin.com> - 2016-05-11 11:30 +0200
        Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Nicolas Morey Chaisemartin <devel@morey-chaisemartin.com> - 2016-05-11 14:00 +0200
          Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Jerome Glisse <j.glisse@gmail.com> - 2016-05-11 17:00 +0200
            Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Nicolas Morey-Chaisemartin <devel@morey-chaisemartin.com> - 2016-05-12 10:40 +0200
              Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Jerome Glisse <j.glisse@gmail.com> - 2016-05-12 11:40 +0200

csiph-web