[ofw] RE: Windows DAPL2 woes in Svr 2008 R2 HPC testing

Sean Hefty sean.hefty at intel.com
Thu Aug 13 09:43:17 PDT 2009


copying winof mail list on reply

>I curious if opening the file RO instead of RW would ease the scaling issues as
>with RW you incure multiple writer locking and for the IPv4 --> gid you don't
>really need Write Access.

I think the ibat code needs a different share mode.  Here's the open call from
ibat:

    H hIbatDev = CreateFileW( IBAT_WIN32_NAME,
        MAXIMUM_ALLOWED, 0, NULL,
        OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );

The third parameter is dwShareMode (***** highlight added):

dwShareMode 
The sharing mode of an object, which can be read, write, both, or none.

You cannot request a sharing mode that conflicts with the access mode that is
specified in an open request that has an open handle, because that would result
in the following sharing violation: ERROR_SHARING_VIOLATION. For more
information, see Creating and Opening Files.

*****If this parameter is zero (0) and CreateFile succeeds, the object cannot be
shared and cannot be opened again until the handle is closed*****. For more
information, see the Remarks section of this topic.

Can you try using 'FILE_SHARE_READ | FILE_SHARE_WRITE' in place of '0' for the
dwShareMode parameter?

This seems like an issue, but I'm surprised that no one has run into this
before.

- Sean




More information about the ofw mailing list