[SCore-users-jp] Re: [SCore-users] Developing with PM

Atsushi HORI hori @ swimmy-soft.com
2002年 10月 23日 (水) 18:17:05 JST


Hi.

Thanks Uebayasi-san.

>As far as I read the code, an fd is accosiated with a context by the
>device number of the device file opened by a process.  System calls
>like poll() can identify which context the fd (or `struct file' in the
>kernel) directs to only by knowing the fd's device number.

No. This is true and untrue. In PM/Myrinet case, this is true. It 
depends on implementation of a PM device.

I just remeber what I have to say for select() or poll(). You have to 
call pmBeforeSelect() before calling select() or poll(), and you have 
to call pmAfterSelect() after calling select() or poll(). By calling 
these two wrapping functions, you can avoid "FLOOD of INTERRUPTIONS" 
with Myrinet. Further, when select() or poll() succeeds, however, it 
is NOT guaranteed that one or more PMM messages arrived indeed. There 
is a race condition between the pmBeforeSelect() and select() calls. 
In most cases, the blocking receive code may look like this:

    pmBeforeSelect( pmc );
    if( pmReceive( ... ) == PM_SUCCES ) {
        /* do something */
        pmReleaseReceiveBuffer( pmc );
    }
    n = select( ... );
    pmAfterSelect( pmc );

----
Atsushi HORI
SCore Developer
Swimmy Software, Inc.

_______________________________________________
SCore-users mailing list
SCore-users @ pccluster.org
http://www.pccluster.org/mailman/listinfo/score-users



SCore-users-jp メーリングリストの案内