From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B625C433F5 for ; Thu, 24 Mar 2022 12:43:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EEECB6B0072; Thu, 24 Mar 2022 08:43:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E9D486B0073; Thu, 24 Mar 2022 08:43:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D65216B0074; Thu, 24 Mar 2022 08:43:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id C60246B0072 for ; Thu, 24 Mar 2022 08:43:03 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 93F03240C7 for ; Thu, 24 Mar 2022 12:43:03 +0000 (UTC) X-FDA: 79279244646.03.A3EF843 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf18.hostedemail.com (Postfix) with ESMTP id 096781C002B for ; Thu, 24 Mar 2022 12:43:02 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 0970F1F745; Thu, 24 Mar 2022 12:43:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1648125782; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KtkJHll3BGHTPIchNMgaGNfzKDZMQ29t02N6cPbRei8=; b=WmEIeEQumjQlWOh3pJEUKzE7T8O+U2xNXKX+KlcLt/ijrxWI05XaNwqkjRNdnoOmkICLWn gM6tYrTi4FDvr2gWUm341gRjdASUkBoB313ZN0eUGPnUlRRQsbSDHtwaZc/U1aYzt/Ltcd Hiezll6ttvEyIPTX+1v0xaYTZnI4iq0= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id C8E96A3B93; Thu, 24 Mar 2022 12:43:01 +0000 (UTC) Date: Thu, 24 Mar 2022 13:42:56 +0100 From: Michal Hocko To: Jason Gunthorpe Cc: Juergen Gross , linux-mm@kvack.org, lkml , Andrew Morton , "xen-devel@lists.xenproject.org" , Jerome Glisse Subject: Re: blocking vs. non-blocking mmu notifiers Message-ID: References: <8e8ec786-74db-157b-a290-b1537941e91d@suse.com> <20220323163146.GI64706@ziepe.ca> <20220323170404.GK64706@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220323170404.GK64706@ziepe.ca> X-Rspam-User: X-Stat-Signature: 94si17irsjpg7w6sp7k8c9ymxxhhuuyr Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=WmEIeEQu; spf=pass (imf18.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 096781C002B X-HE-Tag: 1648125782-648536 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 23-03-22 14:04:04, Jason Gunthorpe wrote: > On Wed, Mar 23, 2022 at 05:49:43PM +0100, Michal Hocko wrote: > > > The bug here is that prior to commit a81461b0546c ("xen/gntdev: update > > > to new mmu_notifier semantic") wired the mn_invl_range_start() which > > > takes a mutex to invalidate_page, which is defined to run in an atomic > > > context. > > > > Yeah, we have already identified that but quickly realized that the > > whole mmu notifier overhaul which this fix depends on would be no no for > > backporting to our older code base. So we are trying to find our way > > around that. > > IMHO you don't need everything, just commit 369ea8242c0f ("mm/rmap: > update to new mmu_notifier semantic v2") which adds the missing > start/end outside the lock for the page callbacks. > > Then you can take safely a8146 into gntdev. Thanks Jason! -- Michal Hocko SUSE Labs