Re: [PATCH rdma-next 3/3] IB/mlx5: Add advise_mr() support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 11, 2018 at 09:15:18AM -0700, Jason Gunthorpe wrote:
> On Tue, Dec 11, 2018 at 11:24:31AM +0200, Moni Shoua wrote:
> > > > @@ -1200,6 +1210,13 @@ static inline void mlx5_odp_populate_klm(struct mlx5_klm *pklm, size_t offset,
> > > >                                        size_t nentries, struct mlx5_ib_mr *mr,
> > > >                                        int flags) {}
> > > >
> > > > +static int mlx5_ib_advise_mr_prefetch(struct ib_pd *pd,
> > > > +                                   enum ib_uverbs_advise_mr_advice advice,
> > > > +                                   u32 flags, struct ib_sge *sg_list,
> > > > +                                   u32 num_sge)
> > > > +{
> > > > +     return -EOPNOTSUPP;
> > > > +}
> > >
> > > For !CONFIG_INFINIBAND_ON_DEMAND_PAGING the function pointer should be
> > > made NULL, not assigned to a dummy function.
> > >
> > This function is not a callback function.
> > It is called from mlx5_ib_advise_mr() for one of the prefetch advices
>
> Well, make sure the callback gets to be NULL..
>
> Don't we compile out mlx5_ib_advise_mr() if ODP is dsiabled too? Is
> this inline needed?

We did it in such way to avoid bringing CONFIG_INFINIBAND_ON_DEMAND_PAGING
to the drivers/infiniband/hw/mlx5/mr.c

>
> > I will solve by making sure that no pending work items are in queue
> > when device is preregistering or module is unloading
>
> I guess it has to be flushed before ib_dealloc

Yes, see v1 of this patch.

>
> Jason

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux