All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: dledford@redhat.com, linux-rdma@vger.kernel.org,
	lijun_nudt@163.com, oulijun@huawei.com,
	charles.chenxin@huawei.com, linux-kernel@vger.kernel.org,
	leonro@mellanox.com
Subject: Re: [PATCH V3 rdma-next 4/4] RDMA/hns: Implement the disassociate_ucontext API
Date: Tue, 29 May 2018 19:36:46 +0800	[thread overview]
Message-ID: <5B0D3B4E.4020909@huawei.com> (raw)
In-Reply-To: <20180528165323.GC17505@ziepe.ca>



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) <xavier.huwei@huawei.com>
>>
>> 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
>

WARNING: multiple messages have this Message-ID (diff)
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: <dledford@redhat.com>, <linux-rdma@vger.kernel.org>,
	<lijun_nudt@163.com>, <oulijun@huawei.com>,
	<charles.chenxin@huawei.com>, <linux-kernel@vger.kernel.org>,
	<leonro@mellanox.com>
Subject: Re: [PATCH V3 rdma-next 4/4] RDMA/hns: Implement the disassociate_ucontext API
Date: Tue, 29 May 2018 19:36:46 +0800	[thread overview]
Message-ID: <5B0D3B4E.4020909@huawei.com> (raw)
In-Reply-To: <20180528165323.GC17505@ziepe.ca>



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) <xavier.huwei@huawei.com>
>>
>> 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
>

  reply	other threads:[~2018-05-29 11:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-26  8:41 [PATCH V3 rdma-next 0/4] {RDMA/uverbs,hns}: Misc update for hns driver Wei Hu (Xavier)
2018-05-26  8:41 ` Wei Hu (Xavier)
2018-05-26  8:41 ` [PATCH V3 rdma-next 1/4] RDMA/hns: Add reset process for RoCE in hip08 Wei Hu (Xavier)
2018-05-26  8:41   ` Wei Hu (Xavier)
2018-05-26  8:41 ` [PATCH V3 rdma-next 2/4] RDMA/hns: Fix the illegal memory operation when cross page Wei Hu (Xavier)
2018-05-26  8:41   ` Wei Hu (Xavier)
2018-05-26  8:41 ` [PATCH V3 rdma-next 3/4] RDMA/uverbs: Hoist the common process of disassociate_ucontext into ib core Wei Hu (Xavier)
2018-05-26  8:41   ` Wei Hu (Xavier)
2018-05-27 15:05   ` Leon Romanovsky
2018-05-28 11:06     ` Wei Hu (Xavier)
2018-05-28 11:06       ` Wei Hu (Xavier)
2018-05-26  8:41 ` [PATCH V3 rdma-next 4/4] RDMA/hns: Implement the disassociate_ucontext API Wei Hu (Xavier)
2018-05-26  8:41   ` Wei Hu (Xavier)
2018-05-28 16:53   ` Jason Gunthorpe
2018-05-29 11:36     ` Wei Hu (Xavier) [this message]
2018-05-29 11:36       ` Wei Hu (Xavier)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5B0D3B4E.4020909@huawei.com \
    --to=xavier.huwei@huawei.com \
    --cc=charles.chenxin@huawei.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leonro@mellanox.com \
    --cc=lijun_nudt@163.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=oulijun@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.