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


Groups > linux.kernel > #1685278

Re: [HMM 12/15] mm/migrate: new memory migration helper for use with device memory v4

From Jerome Glisse <jglisse@redhat.com>
Newsgroups linux.kernel
Subject Re: [HMM 12/15] mm/migrate: new memory migration helper for use with device memory v4
Date 2017-07-11 20:30 +0200
Message-ID <u2853-5KF-5@gated-at.bofh.it> (permalink)
References (1 earlier) <tJYQz-8az-67@gated-at.bofh.it> <tWMeR-X0-3@gated-at.bofh.it> <tYdmF-3lY-3@gated-at.bofh.it> <tYeVr-4aS-11@gated-at.bofh.it> <u1QBc-38v-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Mon, Jul 10, 2017 at 04:44:38PM -0700, Evgeny Baskakov wrote:
> On 6/30/17 5:57 PM, Jerome Glisse wrote:
> 
> ...
> 
> Hi Jerome,
> 
> I am working on a sporadic data corruption seen in highly contented use
> cases. So far, I've been able to re-create a sporadic hang that happens when
> multiple threads compete to migrate the same page to and from device memory.
> The reproducer uses only the dummy driver from hmm-next.
> 
> Please find attached. This is how it hangs on my 12-core Intel i7-5930K SMT
> system:
> 

Can you test if attached patch helps ? I am having trouble reproducing this
from inside a vm.

My theory is that 2 concurrent CPU page fault happens. First one manage to
start the migration back to system memory but second one see the migration
special entry and call migration_entry_wait() which increase page refcount
and this happen before first one check page refcount are ok for migration.

For regular migration such scenario is ok as the migration bails out and
because page is CPU accessible there is no need to kick again the migration
for other thread that CPU fault to migrate.

I am looking into how i can change migration_entry_wait() not to refcount
pages. Let me know if the attached patch helps.

Thank you
Jérôme

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


Thread

Re: [HMM 12/15] mm/migrate: new memory migration helper for use with  device memory v4 Evgeny Baskakov <ebaskakov@nvidia.com> - 2017-07-11 01:50 +0200
  Re: [HMM 12/15] mm/migrate: new memory migration helper for use with  device memory v4 Jerome Glisse <jglisse@redhat.com> - 2017-07-11 20:30 +0200
    Re: [HMM 12/15] mm/migrate: new memory migration helper for use with  device memory v4 Evgeny Baskakov <ebaskakov@nvidia.com> - 2017-07-11 20:50 +0200
      Re: [HMM 12/15] mm/migrate: new memory migration helper for use with  device memory v4 Jerome Glisse <jglisse@redhat.com> - 2017-07-11 20:50 +0200
        Re: [HMM 12/15] mm/migrate: new memory migration helper for use with  device memory v4 Evgeny Baskakov <ebaskakov@nvidia.com> - 2017-07-11 21:40 +0200
          Re: [HMM 12/15] mm/migrate: new memory migration helper for use with  device memory v4 Jerome Glisse <jglisse@redhat.com> - 2017-07-13 22:20 +0200
            Re: [HMM 12/15] mm/migrate: new memory migration helper for use with  device memory v4 Evgeny Baskakov <ebaskakov@nvidia.com> - 2017-07-14 21:50 +0200
              Re: [HMM 12/15] mm/migrate: new memory migration helper for use with  device memory v4 Jerome Glisse <jglisse@redhat.com> - 2017-07-15 03:00 +0200
                Re: [HMM 12/15] mm/migrate: new memory migration helper for use with  device memory v4 Evgeny Baskakov <ebaskakov@nvidia.com> - 2017-07-15 07:10 +0200

csiph-web