All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Wenpeng Liang <liangwenpeng@huawei.com>
Cc: jgg@nvidia.com, linux-rdma@vger.kernel.org, linuxarm@huawei.com
Subject: Re: [PATCH v4 for-next 1/1] RDMA/hns: Support direct wqe of userspace
Date: Mon, 22 Nov 2021 13:10:05 +0200	[thread overview]
Message-ID: <YZt6jQDzNLw7Zn1r@unreal> (raw)
In-Reply-To: <10bbb3f3-600c-1db7-4859-47bd6850969f@huawei.com>

On Mon, Nov 22, 2021 at 05:28:31PM +0800, Wenpeng Liang wrote:
> 
> 
> On 2021/11/22 16:58, Leon Romanovsky wrote:
> >>  	entry = to_hns_mmap(rdma_entry);
> >>  	pfn = entry->address >> PAGE_SHIFT;
> >> -	prot = vma->vm_page_prot;
> >>  
> >> -	if (entry->mmap_type != HNS_ROCE_MMAP_TYPE_TPTR)
> >> -		prot = pgprot_noncached(prot);
> >> +	switch (entry->mmap_type) {
> >> +	case HNS_ROCE_MMAP_TYPE_DB:
> >> +		prot = pgprot_noncached(vma->vm_page_prot);
> >> +		break;
> >> +	case HNS_ROCE_MMAP_TYPE_TPTR:
> >> +		prot = vma->vm_page_prot;
> >> +		break;
> >> +	case HNS_ROCE_MMAP_TYPE_DWQE:
> >> +		prot = pgprot_device(vma->vm_page_prot);
> > Everything fine, except this pgprot_device(). You probably need to check
> > WC internally in your driver and use or pgprot_writecombine() or
> > pgprot_noncached() explicitly.
> > 
> > Thanks
> > .
> > 
> 
> This issue is also discussed in the v2 version, direct wqe uses
> this prot on HIP09 can achieve better performance than NC.
> 
> v2 link: https://patchwork.kernel.org/project/linux-rdma/patch/1622705834-19353-3-git-send-email-liweihang@huawei.com/

But isn't it specific to ARM model that behaves such? Will it be the case
when you move to upgrade your ARM core?

Thanks

> 
> Thanks
> Wenpeng

  reply	other threads:[~2021-11-22 11:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22  3:38 [PATCH v4 for-next 0/1] RDMA/hns: Support direct WQE of userspace Wenpeng Liang
2021-11-22  3:38 ` [PATCH v4 for-next 1/1] RDMA/hns: Support direct wqe " Wenpeng Liang
2021-11-22  8:58   ` Leon Romanovsky
2021-11-22  9:28     ` Wenpeng Liang
2021-11-22 11:10       ` Leon Romanovsky [this message]
2021-11-22 12:36         ` Wenpeng Liang
2021-11-25 17:50     ` Jason Gunthorpe
2021-11-26  8:25       ` Wenpeng Liang
2021-11-26 12:16         ` Jason Gunthorpe
2021-11-27  9:04           ` Wenpeng Liang

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=YZt6jQDzNLw7Zn1r@unreal \
    --to=leon@kernel.org \
    --cc=jgg@nvidia.com \
    --cc=liangwenpeng@huawei.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@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.