[Pvfs2-developers] libpvfs2 usage

Sam Lang slang at mcs.anl.gov
Wed Oct 18 17:14:19 EDT 2006


On Oct 18, 2006, at 4:11 PM, Troy Benjegerdes wrote:

>>>
>>> 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.
>
No it doesn't do any allocation, just encapsulation of the offset and  
size parameters.

-sam


More information about the Pvfs2-developers mailing list