Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1670587pxb; Fri, 1 Oct 2021 16:39:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3v4/hJH4O2nfU2fxIQEelRTw+2K81xZcjbo4geCEn6IWya1tmfSLTO6b9uySNIOiQWe4W X-Received: by 2002:a17:907:767a:: with SMTP id kk26mr884549ejc.134.1633131552867; Fri, 01 Oct 2021 16:39:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633131552; cv=none; d=google.com; s=arc-20160816; b=PqSOLe4JK9sB8CX6HD2MDdVFCt3KWV0iNlte3cbgBKO/j6Dya7OaZE0I71+KttqbQ6 yK97CYTN8pc/jRzgH29lNPqH8kkOCbSb4ZWvWTb4HYSlNUglGCHxhbd/hNlHdK6UGvC1 0MfQzxFWrMwnM3d5rVMLvWVKq+CS+OYBbah6m1LXkt0HnszUNksAFpeeNVutwHCM6BVY 8uqJ1to5+Yxh2h5R9mfc5VLlURSNucyPfTfOO+xMzWcI9pZzpwIyMoz25BRYlTZbJdOu ud42qn3HuqKIZv+F1GBZ4ao7SeRKV4fVdkGOFscvnQ7AjGYrDM5Fa97cv5oLpj6TgpC/ YPAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:dkim-signature; bh=1h1Lv0INI1OkG2kBb9PHFlHBKi/1CeW6GebCwGSVCmc=; b=u3XV5IdebJ0n6vAcGlzr7hwT9rqTOmnqEaGnsYdA8+X7EIXKTPte5Dq9CfRx/3y1ql sHBKCeNHw7+eQqTlTPiq9OFjMOESZYeInQ8Kz5loKr64bziZJfR773jxxiLJiyAhQKjC 6UOXzlD9BsvPhGcgJFxrKxP0l5Nwk5his9Z+Fkf04A9pco4OxTcXCqotScLxYc+Qn2Sf 9knUE5P9evP9ueewxJ1wMM0plVMh+KPhZiQgh3DyInT+9buCAyGqZgv16swlSxdq4RKp xPtpLvvnRlJxjY3/pPaOdQn/J/VUfpwHteTXYNgDErqOFyAmrw7fTDjx1Lhw5KUsr1YK Vbbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=Smqa+CJc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si69687edf.242.2021.10.01.16.38.46; Fri, 01 Oct 2021 16:39:12 -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=@deltatee.com header.s=20200525 header.b=Smqa+CJc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231676AbhJAXgf (ORCPT + 99 others); Fri, 1 Oct 2021 19:36:35 -0400 Received: from ale.deltatee.com ([204.191.154.188]:37552 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230368AbhJAXgb (ORCPT ); Fri, 1 Oct 2021 19:36:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:content-disposition; bh=1h1Lv0INI1OkG2kBb9PHFlHBKi/1CeW6GebCwGSVCmc=; b=Smqa+CJcH0Wt95tA7+NZxuHH+n QUOQh3trTTFGYaKSHuUijP9WcPujSedn7FDstFfsYhuknQTCYJHwhBs9cKWTjKDdAzQkEE7GaX0i6 8K2pKqN2XF4KMFJY2jPmPQHJB1KnCR+OcKBF37Dhi5yK3QrkpuvO3zcMb+nZC4n1fkUW7p2kM1ndG mgaSoULxDn+dkgGi43vCLs4LmlqVzCU99zRkih0sc2y2Phgb6F7/ihLzNisYQt7mmIEzjzZUs89W5 UlF2030OiaRuSysvpaxMpvCp+kDbWZkzQWzIwXh6tKMgBZS01QvFxj82l74HQjP+NYCDw5mEN5oAh IowOY+8g==; Received: from s0106a84e3fe8c3f3.cg.shawcable.net ([24.64.144.200] helo=[192.168.0.10]) by ale.deltatee.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mWS2y-0001th-RF; Fri, 01 Oct 2021 17:34:33 -0600 To: Jason 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 , =?UTF-8?Q?Christian_K=c3=b6nig?= , 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 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> <20211001224605.GS3544071@ziepe.ca> From: Logan Gunthorpe Message-ID: Date: Fri, 1 Oct 2021 17:34:30 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211001224605.GS3544071@ziepe.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 24.64.144.200 X-SA-Exim-Rcpt-To: ckulkarnilinux@gmail.com, martin.oliveira@eideticom.com, robin.murphy@arm.com, ira.weiny@intel.com, helgaas@kernel.org, jianxin.xiong@intel.com, dave.hansen@linux.intel.com, jason@jlekstrand.net, dave.b.minturn@intel.com, andrzej.jakowski@intel.com, daniel.vetter@ffwll.ch, willy@infradead.org, ddutile@redhat.com, jhubbard@nvidia.com, christian.koenig@amd.com, sbates@raithlin.com, iommu@lists.linux-foundation.org, linux-mm@kvack.org, linux-pci@vger.kernel.org, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, dan.j.williams@intel.com, hch@lst.de, Felix.Kuehling@amd.com, apopple@nvidia.com, jgg@ziepe.ca X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-9.8 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_FREE,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [PATCH v3 19/20] PCI/P2PDMA: introduce pci_mmap_p2pmem() X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-10-01 4:46 p.m., Jason Gunthorpe wrote: > 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. Ah, fair. This adds a bit of complexity, but we could do a call_rcu() in vma_close to do the page frees. Logan