[Pvfs2-developers] libpvfs2 usage

Troy Benjegerdes troy at scl.ameslab.gov
Wed Oct 18 17:11:02 EDT 2006


>>
>> One question is what does PVFS_Request_contiguous actually do?
>
> It creates a request structure that essentially contains the size  
> and offset into the memory buffer.
>
>> Since I am using the same buffer all the time would it be ok to  
>> setup the request once and then reuse it so long as the io size is  
>> the same?
>
> Yes.  The request structure doesn't get modified by the IO call.   
> You (correctly) use PVFS_BYTE for the file request.  The reason you  
> can't just use PVFS_BYTE for the memory request is that the size  
> has to be encapsulated in the request as well (while the file  
> request gets tiled based on the actual file size).
>
> -sam


Okay, so, is PVFS_Request_contiguous just a fancy way to allocate  
memory?

In that case, can we just use PVFS_Request_contiguous (or add a  
function like it) to allocate our application data buffer that we  
will be reading/writing all the data from? Then we can bypass all the  
memory registration crap and just register the buffer once.


More information about the Pvfs2-developers mailing list