Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1138256ybl; Wed, 21 Aug 2019 10:41:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxX/Jhro6gCWD/fyKFKVUvUtQyt8CQwl45NE35KihK94mFoXml0emueVNFDhdmNxQMAmz5N X-Received: by 2002:a17:902:a612:: with SMTP id u18mr34045987plq.181.1566409298813; Wed, 21 Aug 2019 10:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566409298; cv=none; d=google.com; s=arc-20160816; b=edz0KfF2bVM1zlyCtLB0GUBJebpbSES4ANDhnHT6wC9sdiY+FcEu2xmKJ54j+IAogY WqOjnKkTboCtIywZGzSgBMWwfzauJUyuug8ZoTLF1MgN4wgfLHKJKRYTypKP8wZQ7RmB DXSGHIs+mS8fM4sqw86+BKO7rjLJ35HXwjDubf9Cb+51ERbKbm1LTWjooIet1EajG7JT wy5RjfwXWWoQ6PEZg37PXe4V8OJ94k8AEpQEQ/eIL0i4uixPD5E4Fbn4hv024FDY3RcI Ecz/1oLjCLc3qpE3IeA7u9uJe5JRQo2D+fMEglpN4PyJtxDu9fK5ywrglTFq4oG2xfzG OoLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:dkim-signature; bh=rSelPuss6Rio+zLxmeT3lHQjONOPz6ghCteSl79uvc4=; b=xDvm/BhqjGfs6F6hVi395JkEFT9K2glf957WX0UcHk8/qdmlJibf/xfXT/vQ6V0eVp ITaCXukUabm1JVTr2rA/Q4iWj0Ty/W8lFTn4YSslo01LdXtyjtAJXu+tW/bg8Aq90J1H FaAcZiQaXYcJ1MsoFb0ZS6uEKTOgUqpLfG3084WmwAW06iRDJuARrxh7wHdFDJmdD5xY 20Rfdz4PPH9CyiRyX0vwvf8LFQ2M4wXQDm1I6gTFrZ74LjFKK7R/zoVI4d6U6WxGslJ3 WzPmRxuZfFCZlQmAv96AqUK3aMd3L65JsaLNy2qRy5+fbyN5xwqdaRQw0yuofm6GSRTv D5uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=lecystT5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si14687770pgv.70.2019.08.21.10.41.23; Wed, 21 Aug 2019 10:41:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=lecystT5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728299AbfHUQQh (ORCPT + 99 others); Wed, 21 Aug 2019 12:16:37 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:37737 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727401AbfHUQQh (ORCPT ); Wed, 21 Aug 2019 12:16:37 -0400 Received: by mail-qt1-f196.google.com with SMTP id y26so3724095qto.4 for ; Wed, 21 Aug 2019 09:16:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rSelPuss6Rio+zLxmeT3lHQjONOPz6ghCteSl79uvc4=; b=lecystT5pa2A6yo8Axdj1KSsLU40VESQnnpU2Rk1L1SzDdZmYUbd4PsiNU+5iLOE7j zbD6bbLCGebQwx9lcXa2B+HW9DoD5q7uBa/gZ7ygQPx77wQQIQ1GmTexMMrPCdK7kyCX dcyjDO+jw/ZpT3eBIlbTDS/F9lvZmJkfsIhEr9N+LJxXNscIOIrGwF+RrgQg/pAcfw/v C6mD6PK7XpC9IuEvG2lpMuOD0oHl5qpDhT5vYuAjCVMq7SKO6jJn1/Yli0UUb+PtB3VS 3uspvkistGavDwQta/lD1VQQk7IwUnquCu4OISrFvHvchWTZq1eeFmMkErGSgo9qyGp1 hN0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rSelPuss6Rio+zLxmeT3lHQjONOPz6ghCteSl79uvc4=; b=JaSxiW0+eaZ8gKQR+RlEXVmb1jBCZcZEWTI1mcYO2bUoJ1jaojlTD2Z2Nye21M4RNV tYLouUUnZqRCp+QAyVQ0dSCj6UqMdLkWb8+XzZBU5Ussk6lwPQ3j3N/31jbELRIKzzry xreiEUTC6T1FI5/YJhSUwM3hQKBWwTwJfAxw5Fe8wtabv7fWDbt9FmyYa3TFjjevo1R3 EOIbEXZDkck4hKDbe85WgZ0a5AHw+QrVHSFxZBd/kaPmGc4aQQjK2hhKNvKNbi/cD6Ra slfqxSjMcbg+4fdkG9QHgkah0Tt7rMVh3YNjkz1QFE1fTuobszjscXr/AXIDdcfG7Bwx mKGQ== X-Gm-Message-State: APjAAAWx6lhVP63olFIUTpejnzPqY2PulwDcRjMrbuATfjWqg5KgJANK i/6W+eCaoDQHMRgAK2mMGdsfBGbb7rQ= X-Received: by 2002:ac8:7696:: with SMTP id g22mr31568522qtr.208.1566404196241; Wed, 21 Aug 2019 09:16:36 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-55-100.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.55.100]) by smtp.gmail.com with ESMTPSA id y194sm10143420qkb.111.2019.08.21.09.16.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Aug 2019 09:16:35 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1i0THn-0008UM-3g; Wed, 21 Aug 2019 13:16:35 -0300 Date: Wed, 21 Aug 2019 13:16:35 -0300 From: Jason Gunthorpe To: LKML , Linux MM , DRI Development , Intel Graphics Development , Andrew Morton , Michal Hocko , David Rientjes , Christian =?utf-8?B?S8O2bmln?= , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Daniel Vetter Subject: Re: [PATCH 4/4] mm, notifier: Catch sleeping/blocking for !blockable Message-ID: <20190821161635.GC8653@ziepe.ca> References: <20190820081902.24815-1-daniel.vetter@ffwll.ch> <20190820081902.24815-5-daniel.vetter@ffwll.ch> <20190820133418.GG29246@ziepe.ca> <20190820151810.GG11147@phenom.ffwll.local> <20190821154151.GK11147@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190821154151.GK11147@phenom.ffwll.local> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 21, 2019 at 05:41:51PM +0200, Daniel Vetter wrote: > > Hm, I thought the page table locks we're holding there already prevent any > > sleeping, so would be redundant? But reading through code I think that's > > not guaranteed, so yeah makes sense to add it for invalidate_range_end > > too. I'll respin once I have the ack/nack from scheduler people. > > So I started to look into this, and I'm a bit confused. There's no > _nonblock version of this, so does this means blocking is never allowed, > or always allowed? RDMA has a mutex: ib_umem_notifier_invalidate_range_end rbt_ib_umem_for_each_in_range invalidate_range_start_trampoline ib_umem_notifier_end_account mutex_lock(&umem_odp->umem_mutex); I'm working to delete this path though! nonblocking or not follows the start, the same flag gets placed into the mmu_notifier_range struct passed to end. > From a quick look through implementations I've only seen spinlocks, and > one up_read. So I guess I should wrape this callback in some unconditional > non_block_start/end, but I'm not sure. For now, we should keep it the same as start, conditionally blocking. Hopefully before LPC I can send a RFC series that eliminates most invalidate_range_end users in favor of common locking.. Jason