From: Jason Gunthorpe <jgg@nvidia.com>
To: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
Cc: linux-rdma@vger.kernel.org, leonro@nvidia.com,
zyjzyj2000@gmail.com, nvdimm@lists.linux.dev,
linux-kernel@vger.kernel.org, rpearsonhpe@gmail.com,
yangx.jy@fujitsu.com, lizhijian@fujitsu.com, y-goto@fujitsu.com
Subject: Re: [PATCH for-next v3 4/7] RDMA/rxe: Add page invalidation support
Date: Mon, 16 Jan 2023 14:23:56 -0400 [thread overview]
Message-ID: <Y8WWPAHvZsXpwc0M@nvidia.com> (raw)
In-Reply-To: <97b0362e256dd3eb022d81c30941edd8fb0caba9.1671772917.git.matsuda-daisuke@fujitsu.com>
On Fri, Dec 23, 2022 at 03:51:55PM +0900, Daisuke Matsuda wrote:
> +static bool rxe_ib_invalidate_range(struct mmu_interval_notifier *mni,
> + const struct mmu_notifier_range *range,
> + unsigned long cur_seq)
> +{
> + struct ib_umem_odp *umem_odp =
> + container_of(mni, struct ib_umem_odp, notifier);
> + unsigned long start;
> + unsigned long end;
> +
> + if (!mmu_notifier_range_blockable(range))
> + return false;
> +
> + mutex_lock(&umem_odp->umem_mutex);
> + mmu_interval_set_seq(mni, cur_seq);
> +
> + start = max_t(u64, ib_umem_start(umem_odp), range->start);
> + end = min_t(u64, ib_umem_end(umem_odp), range->end);
> +
> + ib_umem_odp_unmap_dma_pages(umem_odp, start, end);
After bob's xarray conversion this can be done alot faster, it just an
xa_for_each_range and make the xarray items non-present
non-present is probably just a null struct page in the xarray.
Jason
next prev parent reply other threads:[~2023-01-16 18:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-23 6:51 [PATCH for-next v3 0/7] On-Demand Paging on SoftRoCE Daisuke Matsuda
2022-12-23 6:51 ` [PATCH for-next v3 1/7] RDMA/rxe: Convert triple tasklets to use workqueue Daisuke Matsuda
2022-12-28 16:56 ` Bob Pearson
2022-12-29 1:23 ` Zhu Yanjun
2022-12-29 7:02 ` Leon Romanovsky
2023-01-06 2:26 ` Daisuke Matsuda (Fujitsu)
2022-12-23 6:51 ` [PATCH for-next v3 2/7] RDMA/rxe: Always schedule works before accessing user MRs Daisuke Matsuda
2022-12-23 6:51 ` [PATCH for-next v3 3/7] RDMA/rxe: Cleanup code for responder Atomic operations Daisuke Matsuda
2023-01-16 18:21 ` Jason Gunthorpe
2022-12-23 6:51 ` [PATCH for-next v3 4/7] RDMA/rxe: Add page invalidation support Daisuke Matsuda
2023-01-16 18:23 ` Jason Gunthorpe [this message]
2022-12-23 6:51 ` [PATCH for-next v3 5/7] RDMA/rxe: Allow registering MRs for On-Demand Paging Daisuke Matsuda
2022-12-23 6:51 ` [PATCH for-next v3 6/7] RDMA/rxe: Add support for Send/Recv/Write/Read operations with ODP Daisuke Matsuda
2022-12-23 6:51 ` [PATCH for-next v3 7/7] RDMA/rxe: Add support for the traditional Atomic " Daisuke Matsuda
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=Y8WWPAHvZsXpwc0M@nvidia.com \
--to=jgg@nvidia.com \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lizhijian@fujitsu.com \
--cc=matsuda-daisuke@fujitsu.com \
--cc=nvdimm@lists.linux.dev \
--cc=rpearsonhpe@gmail.com \
--cc=y-goto@fujitsu.com \
--cc=yangx.jy@fujitsu.com \
--cc=zyjzyj2000@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).