Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DF1AC1975A for ; Wed, 25 Mar 2020 13:07:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 35ABD20772 for ; Wed, 25 Mar 2020 13:07:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35ABD20772 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7457F6B000A; Wed, 25 Mar 2020 09:07:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F5E46B000C; Wed, 25 Mar 2020 09:07:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 60B816B000D; Wed, 25 Mar 2020 09:07:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0078.hostedemail.com [216.40.44.78]) by kanga.kvack.org (Postfix) with ESMTP id 466156B000A for ; Wed, 25 Mar 2020 09:07:00 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 35D3C612E for ; Wed, 25 Mar 2020 13:07:00 +0000 (UTC) X-FDA: 76633909800.27.class81_5a308fb887204 X-HE-Tag: class81_5a308fb887204 X-Filterd-Recvd-Size: 2238 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Wed, 25 Mar 2020 13:06:59 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DA621AD94; Wed, 25 Mar 2020 13:06:57 +0000 (UTC) Date: Wed, 25 Mar 2020 14:06:56 +0100 From: Michal Hocko To: Jason Gunthorpe Cc: linux-mm@kvack.org, =?iso-8859-1?B?Suly9G1l?= Glisse , Christoph Hellwig Subject: Re: [PATCH v3] mm/mmu_notifier: prevent unpaired invalidate_start and invalidate_end Message-ID: <20200325130656.GA19542@dhcp22.suse.cz> References: <20200211205252.GA10003@ziepe.ca> <20200228135006.GA30885@ziepe.ca> <20200324194137.GQ13183@mellanox.com> <20200325080117.GY19542@dhcp22.suse.cz> <20200325121407.GU13183@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200325121407.GU13183@mellanox.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 25-03-20 09:14:07, Jason Gunthorpe wrote: > On Wed, Mar 25, 2020 at 09:01:17AM +0100, Michal Hocko wrote: > > > > I'm going to put this in linux-next to see if there are any reports of > > > > the pr_warn failing. > > > > > > > > Michal, are you happy with this solution now? > > > > > > It's been a month in linux-next now, with no complaints. If there are > > > no comments I will go ahead to send it in the hmm PR. > > > > I will not block this but it still looks like a wrong approach. A more > > robust solution would be to allow calling invalidate_range_end even for > > the failing invalidate_start. > > That requires reliably walking a rcu list backwards under rcu. I don't > have a good feeling about that algorithm. Do you know of a solution? No, not really. I would be pushing for it if I had. Maybe we want a different data structure than the RCU list. But... > Since we don't actually have any users that care about this any more, > I felt this testable solution was better. ... you are right that this is probably the best short term workaround. -- Michal Hocko SUSE Labs