[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 11 Nov 2020 10:27:29 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Peter Xu <peterx@...hat.com>,
"Ahmed S. Darwish" <a.darwish@...utronix.de>,
Andrea Arcangeli <aarcange@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>,
Christoph Hellwig <hch@....de>,
Hugh Dickins <hughd@...gle.com>, Jan Kara <jack@...e.cz>,
Jann Horn <jannh@...gle.com>,
John Hubbard <jhubbard@...dia.com>,
Kirill Shutemov <kirill@...temov.name>,
Kirill Tkhai <ktkhai@...tuozzo.com>,
Leon Romanovsky <leonro@...dia.com>,
Linux-MM <linux-mm@...ck.org>, Michal Hocko <mhocko@...e.com>,
Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH v4 0/2] Add a seqcount between gup_fast and copy_page_range()
On Tue, Nov 10, 2020 at 3:44 PM Jason Gunthorpe <jgg@...dia.com> wrote:
>
> As discussed and suggested by Linus use a seqcount to close the small race
> between gup_fast and copy_page_range().
>
> Ahmed confirms that raw_write_seqcount_begin() is the correct API to use
> in this case and it doesn't trigger any lockdeps.
>
> I was able to test it using two threads, one forking and the other using
> ibv_reg_mr() to trigger GUP fast. Modifying copy_page_range() to sleep
> made the window large enough to reliably hit to test the logic.
Looks all good to me.
Linus
Powered by blists - more mailing lists