Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1643928pxb; Fri, 1 Oct 2021 15:51:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2FA0UikmGF7JsN8B2jkRIqSs7Ap3lxUFi/xd10YxljXsBzTsEyyaGWp594cCqRc0RtmpM X-Received: by 2002:a17:906:a14b:: with SMTP id bu11mr632722ejb.260.1633128668813; Fri, 01 Oct 2021 15:51:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633128668; cv=none; d=google.com; s=arc-20160816; b=hHLV3arntKJywHpHObj/Q2Q/QJ+eh20o1hcnKGjDuOshI6etaKLFJF+1rUADcLrUj3 nfbD0KxSUDJm2q0dz8OO0kBN4e7eUlzUkUf2Xow0rnJJRj737HOggah7PbTL0SO3tlid kl4kHl33DQJjG0EjrwBPayWbiQHsU9Ewwy3L1RUMgSmyt2stcPCjFcyfOjMpC4UZ5Od7 i0pfckeI0YWwvefcq9uPkhJFJ2RBSvfPhynJFwFT3TM8eQzTV7iaEw2N4X+HoAAOg6KE w0TAHLBZbhiOnBpHP0rrCkYDi7c+ZACJ49QnwV9W3IGvyjEG+5WD0G/XRFhXV8lt/Nds rpDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tnXGytG/2aEvcazdaoXj71bXQnwjyukOXIDiPveIZXA=; b=Qem5L8x1czbqX9Iq1RZF6aulXEVU/chCxGVLap8aCxocyaRjhf1N0biNuu13Y3lKrK mEHtTNwegFaOZYnBvc2NShKhfHTOKwbryiGSn58aFcUxpvtfPwueZY1vB4eo1FHl5j7m Pw6Oe+eUmZgze7WfRmRcCFgn91ndRXqFPhovfXr8I+ZZ2EIbk9ZqF6kyDC0G1P/lvEMg OQLYhqmb1WGLlLFWFPyDh2C5qwZmJb+ADJX0IEjN0rmnSlR5zlH/SF1vRGL6xuspnOtT cgxFrNt5dH6LPoZaEkmq9ghaoEpP+gemVz+IPl9SrEFLjcMaTTjk9iYx2K8HzbMPZRVX Kmmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=pOTSnHYV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m24si8826540ejd.38.2021.10.01.15.50.43; Fri, 01 Oct 2021 15:51:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=pOTSnHYV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356270AbhJAWsx (ORCPT + 99 others); Fri, 1 Oct 2021 18:48:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356307AbhJAWsh (ORCPT ); Fri, 1 Oct 2021 18:48:37 -0400 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1E1BC0613B5 for ; Fri, 1 Oct 2021 15:46:07 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id c20so10471057qtb.2 for ; Fri, 01 Oct 2021 15:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=tnXGytG/2aEvcazdaoXj71bXQnwjyukOXIDiPveIZXA=; b=pOTSnHYVXRz06VuaU1BDucThq3XLijVNOmqw8gUYgVjcX4bjaU1DPW80GPFpz1Bry3 5Izso0qtrLy+uxnjkbarKVIHYAhUgvRAYbABr2JkvP9GCyg+7YRvw6KqUUc7seGsa9fH KzDaVUI4r8DRENRxq0vwC8QCWDmKp8VauDJh3yS5lxyhzeb0C6mReZGMghzJA7mUDjLv 3H6R6bTZK2L5cSKTP/HRhXJP2RtP51MG45N0gotai5Ttri7QJaEBuKZ8DLCGMwehfYns QMf6evJgsJzNYeGrSyM/G3W4DM7LKIUGIRGLmulP3Gv60VEJqAsqbGSn5orZIQ0iTuZ9 WZEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tnXGytG/2aEvcazdaoXj71bXQnwjyukOXIDiPveIZXA=; b=JZPeF0LTTZtFynlG0wp49Z6omBMt5ihAs1RIiVcsI0C3JJP4b4syJDT20ZATTymnlG X+tM7ZMp0o/jKH3e/dvj4nZRbTc3ft4fOOqPFMtG87a5SkDhEjK5ouKj5nymlRZrIYk3 KN8OdiBt+l8QKjQYGPPj7Wetge/EdgQWFEEkTnynXHBZd7A5ouTVz9mG/Z1FAT4tfzI+ lQ3EARd1F0lU0KswEzxqTKD25XCGZPFS8jdFKzT1BRUr0rXfSR3gBhM/2KI19mwNuyjS UTD3g57K4N/1ebsZo3/c18FRBJM0K+A9qy3LKhSo4rIs4Q+ReTByvlEsaVtgZWilFNuA u9DA== X-Gm-Message-State: AOAM5326lakrGpVBN5HzlJxsuGKuEhm2cK+l5TzWL/Sn0wn2fXPYxcBi CHNUuosVaxjGizei6se1WWyKGg== X-Received: by 2002:ac8:7dc1:: with SMTP id c1mr551179qte.289.1633128366918; Fri, 01 Oct 2021 15:46:06 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id p187sm3759342qkd.101.2021.10.01.15.46.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 15:46:06 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mWRI5-009Y55-Ly; Fri, 01 Oct 2021 19:46:05 -0300 Date: Fri, 1 Oct 2021 19:46:05 -0300 From: Jason Gunthorpe To: Logan Gunthorpe Cc: Alistair Popple , Felix Kuehling , Christoph Hellwig , Dan Williams , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Stephen Bates , Christian =?utf-8?B?S8O2bmln?= , John Hubbard , Don Dutile , Matthew Wilcox , Daniel Vetter , Jakowski Andrzej , Minturn Dave B , Jason Ekstrand , Dave Hansen , Xiong Jianxin , Bjorn Helgaas , Ira Weiny , Robin Murphy , Martin Oliveira , Chaitanya Kulkarni Subject: Re: [PATCH v3 19/20] PCI/P2PDMA: introduce pci_mmap_p2pmem() Message-ID: <20211001224605.GS3544071@ziepe.ca> References: <32ce26d7-86e9-f8d5-f0cf-40497946efe9@deltatee.com> <20210929233540.GF3544071@ziepe.ca> <20210930003652.GH3544071@ziepe.ca> <20211001134856.GN3544071@ziepe.ca> <4fdd337b-fa35-a909-5eee-823bfd1e9dc4@deltatee.com> <20211001174511.GQ3544071@ziepe.ca> <95ada0ac-08cc-5b77-8675-b955b1b6d488@deltatee.com> <20211001221405.GR3544071@ziepe.ca> <8871549c-63b5-d062-87ea-9036605984d5@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8871549c-63b5-d062-87ea-9036605984d5@deltatee.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 01, 2021 at 04:22:28PM -0600, Logan Gunthorpe wrote: > > It would close this issue, however synchronize_rcu() is very slow > > (think > 1second) in some cases and thus cannot be inserted here. > > It shouldn't be *that* slow, at least not the vast majority of the > time... it seems a bit unreasonable that a CPU wouldn't schedule for > more than a second. I've seen bug reports on exactly this, it is well known. Loaded big multi-cpu systems have high delays here, for whatever reason. > But these aren't fast paths and synchronize_rcu() already gets > called in the unbind path for p2pdma a of couple times. I'm sure it > would also be fine to slow down the vma_close() path as well. vma_close is done in a loop destroying vma's and if each synchronize costs > 1s it can take forever to close a process. We had to kill a similar use of synchronize_rcu in RDMA because users were complaining of > 40s process exit times. The driver unload path is fine to be slow, and is probably done on an unloaded system where synchronize_rcu is not so bad Anyway, it is not really something for this series to fix, just something we should all be aware of and probably ought to get fixed before we do much more with ZONE_DEVICE pages Jason