[Openib-windows] HCA: register_segment confusion

Leonid Keller leonid at mellanox.co.il
Tue Oct 11 01:49:34 PDT 2005


> ... 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.

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

> 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.

> -----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
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20051011/722d3554/attachment.html>


More information about the ofw mailing list