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


Groups > linux.kernel > #1400235

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-12 18:50 +0200
Message-ID <ry1bQ-uE-21@gated-at.bofh.it> (permalink)
References (6 earlier) <rxDMe-1Nm-15@gated-at.bofh.it> <rxUk2-1QS-17@gated-at.bofh.it> <rxVg6-2MC-7@gated-at.bofh.it> <rxZ0l-6V8-15@gated-at.bofh.it> <rxZjI-75z-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



Le 05/12/2016 à 03:52 PM, Jerome Glisse a écrit :
> On Thu, May 12, 2016 at 03:30:24PM +0200, Nicolas Morey-Chaisemartin wrote:
>> Le 05/12/2016 à 11:36 AM, Jerome Glisse a écrit :
>>> On Thu, May 12, 2016 at 08:07:59AM +0200, Nicolas Morey-Chaisemartin wrote:
[...]
>>>> With transparent_hugepage=never I can't see the bug anymore.
>>>>
>>> Can you test https://patchwork.kernel.org/patch/9061351/ with 4.5
>>> (does not apply to 3.10) and without transparent_hugepage=never
>>>
>>> Jérôme
>> Fails with 4.5 + this patch and with 4.5 + this patch + yours
>>
> There must be some bug in your code, we have upstream user that works
> fine with the above combination (see drivers/vfio/vfio_iommu_type1.c)
> i suspect you might be releasing the page pin too early (put_page()).
In my previous tests, I checked the page before calling put_page and it has already changed.
And I also checked that there is not multiple transfers in a single page at once.
So I doubt it's that.
>
> If you really believe it is bug upstream we would need a dumb kernel
> module that does gup like you do and that shows the issue. Right now
> looking at code (assuming above patches applied) i can't see anything
> that can go wrong with THP.

The issue is that I doubt I'll be able to do that. We have had code running in production for at least a year without the issue showing up and now a single test shows this.
And some tweak to the test (meaning memory footprint in the user space) can make the problem disappear.

Is there a way to track what is happening to the THP? From the looks of it, the refcount are changed behind my back? Would kgdb with watch point work on this?
Is there a less painful way?

Thanks

Nicolas

Back to linux.kernel | Previous | NextPrevious 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
                Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Nicolas Morey-Chaisemartin <devel@morey-chaisemartin.com> - 2016-05-12 15: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 16:00 +0200
                Re: [Question] Missing data after DMA read transfer - mm issue with  transparent huge page? Andrea Arcangeli <aarcange@redhat.com> - 2016-05-12 18: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 18:50 +0200

csiph-web