Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3282828imm; Tue, 29 May 2018 04:39:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJZDQAbbU/V6ZQJALkrxYHXiDvuqGykkuwvA62SCP4eDoifairoIU/fFqgmVrbTtUQ9W5yx X-Received: by 2002:a62:d1a:: with SMTP id v26-v6mr5527131pfi.90.1527593951945; Tue, 29 May 2018 04:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527593951; cv=none; d=google.com; s=arc-20160816; b=IvDB7WGkk+ZJZtIMqMpV8Mp8NZPEf97bqKpTRC3/owEkz8gzKJswLnSLYLNlawoEfq i74vbxN+H1OOw01tKld4+vYVPXvwBwei4fEqU0O6KhE94JBwCd1l7Jve9aMhwkDGQqDw i/z0kR6HtBebh58A15XhdZXkVRgisFd1XN0PAFzeypJdfgIDoSNfh2H4R2EyjUH5XQZl +WwavkrIYLkYQzOmTo+RUHOCK2u53Pc8gBKAsqJuqR+VuFbYgE97eiYSQy7zkBdZOAib TUaC0LnEradpSWQaV5qnSLMDoFhvP8o+4WtPy1UMXeDPmdvzAJ4CZm84nOLMTUm8KtYq h2+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=+w9RgfvBwup9hAt23g7HockW/PIEf4E9ChReKB7VgdY=; b=TEPJmL8IX2onY0E6k08QSfmjQDYBQYTt1hBVN+pmrn4p9vTwIWwtGxldftPCeXQjYz Z5oMj2cPRpYP6fbiWq5t+erEjgv172p6BgoE3E1q1IL0Vh4pZDF7owsv2TfPgyJ1VjJP SUylpN93RbGgLVg/+9FgE5RaIHN2gz4OJCqllZhItLiLaAXgIklrlMlQe/4IMW43mlkh 1RUD8V9XRW1q/UHe6VsU8JZXjhSZ+VWibM1HAuo0wkkezKRHFgzq2ERFrLnSEF75no4l gOWljOj162zSCgrA4JRffI3J/fI261qLreuEPqCytz3Z5dPXoVKqKM+rqPwB+/aJgzQQ 6dlg== ARC-Authentication-Results: i=1; mx.google.com; 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 3-v6si1991579plq.82.2018.05.29.04.38.58; Tue, 29 May 2018 04:39:11 -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; 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 S933368AbeE2LhS (ORCPT + 99 others); Tue, 29 May 2018 07:37:18 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:57470 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932949AbeE2LhI (ORCPT ); Tue, 29 May 2018 07:37:08 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id BD4C2A8DB4DAF; Tue, 29 May 2018 19:37:04 +0800 (CST) Received: from [127.0.0.1] (10.57.115.182) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.382.0; Tue, 29 May 2018 19:36:55 +0800 Subject: Re: [PATCH V3 rdma-next 4/4] RDMA/hns: Implement the disassociate_ucontext API To: Jason Gunthorpe References: <1527324107-56593-1-git-send-email-xavier.huwei@huawei.com> <1527324107-56593-5-git-send-email-xavier.huwei@huawei.com> <20180528165323.GC17505@ziepe.ca> CC: , , , , , , From: "Wei Hu (Xavier)" Message-ID: <5B0D3B4E.4020909@huawei.com> Date: Tue, 29 May 2018 19:36:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20180528165323.GC17505@ziepe.ca> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.57.115.182] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/5/29 0:53, Jason Gunthorpe wrote: > On Sat, May 26, 2018 at 04:41:47PM +0800, Wei Hu (Xavier) wrote: >> This patch implemented the IB core disassociate_ucontext API. >> >> Signed-off-by: Wei Hu (Xavier) >> >> v2->v3: Addressed the comments from Jason. The related link: >> https://lkml.org/lkml/2018/5/22/967 >> v1->v2: no change. >> drivers/infiniband/hw/hns/hns_roce_device.h | 8 ++++ >> drivers/infiniband/hw/hns/hns_roce_main.c | 70 ++++++++++++++++++++++++++++- >> 2 files changed, 77 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h >> index da8512b..31221d5 100644 >> +++ b/drivers/infiniband/hw/hns/hns_roce_device.h >> @@ -217,11 +217,19 @@ struct hns_roce_uar { >> unsigned long logic_idx; >> }; >> >> +struct hns_roce_vma_data { >> + struct list_head list; >> + struct vm_area_struct *vma; >> + struct mutex *vma_list_mutex; >> +}; > This stuff is basically shared in all the drivers too - would it make > sense to maintain this information and do the zap_pte in the core code > as well? > > There is no way to implement dis-associate without also doing the > zaps.. > > Jason > > . Hi, Jason You may have noticed there are difference about the process of zap_vmp_ptes between mlx4_ib_disassociate_ucontext and mlx5_ib_disassociate_ucontext If I hoist zap_vmp_ptes process into the core code, Maybe need to modify more mlx4 code. Maybe I am not the right person to do this thing, Could you give more suggestion? Thanks Regards Wei Hu >