[Openib-windows] HCA: register_segment confusion

Fab Tillier ftillier at silverstorm.com
Wed Oct 12 11:24:39 PDT 2005


> From: Leonid Keller [mailto:leonid at mellanox.co.il]
> Sent: Tuesday, October 11, 2005 1:50 AM
> 
> > ... what the code is trying to do here?
>
> This code is trying to produce different and exact return codes in case of
> error.
> "fake_ro" mechanism is intended to check, whether a failure on IoReadAccess is
> caused by access permission violation (then it returns MT_EPERM) or some other
> reason (MT_EAGAIN).
> Retry mechanism helps differentiate between 2 causes of
> STATUS_ACCESS_VIOLATION: wrong access permissions (MT_EPERM) or invalid
> virtual address (MT_ENOMEM).
> Just FYI: the most popular cause of MT_EAGAIN - the exception 0xc00000a1
> ("process memory quote is exceeded"), which happens upon large allocations.

Does the user really care what the actual error cause was, beyond the fact that
there was an access violation?

> > I started looking at adding support for large registrations ...
>
> this code is checked to successfully register 1GB buffers.

You're right - I just wasn't following the code flow properly.

> > Memory locking should be a whole lot simpler ...
>
> As far as Gen2 driver tends to return only several main error codes and i
> needed
> MOSAL_iobuf_register/deregister services, i've taken these routines to the low
> level driver and simplified them by removing both mechanisms.
>
> I'm going to publish the code of the driver as it is, so you'll see the new
> variant and be able to comment on it.

Great, thanks!

- Fab

> > -----Original Message-----
> > From: Fab Tillier [mailto:ftillier at silverstorm.com]
> > Sent: Monday, October 10, 2005 10:50 PM
> > To: openib-windows at openib.org
> > Subject: [Openib-windows] HCA: register_segment confusion
> >
> >
> > The register_segment function (mosal_iobuf.c at 74) is a bit
> > confusing to say the
> > least.  What's the deal with the "fake_ro" checks, and trying
> > to lock the pages
> > multiple times in different ways?  Can someone from Mellanox
> > help explain what
> > the code is trying to do here?  What does the retry flag do?
> > What's going on
> > with the alternating read/write checks if modify right checks fail?
> >
> > I started looking at adding support for large registrations,
> > and I'm worried
> > that if I touch something it'll all fall over.  Memory
> > locking should be a whole
> > lot simpler than what's going on here, and the comments don't
> > really help.
> >
> > Thanks,
> >
> > - Fab
> >
> > _______________________________________________
> > openib-windows mailing list
> > openib-windows at openib.org
> > http://openib.org/mailman/listinfo/openib-windows
> >




More information about the ofw mailing list