[openib-general] Some Missing Features from mthca/user MAD access

Michael S. Tsirkin mst at mellanox.co.il
Thu Jan 6 07:32:16 PST 2005


Hello!
Quoting r. Hal Rosenstock (halr at voltaire.com) "Re: [openib-general] Some Missing Features from mthca/user MAD access":
> On Thu, 2005-01-06 at 05:53, Michael S. Tsirkin wrote:
> > Hello, Roland!
> > Quoting r. Roland Dreier (roland.list at gmail.com) "Re: [openib-general] Some Missing Features from mthca/user MAD access":
> > > > 1. The SM needs the ability to write (set/clear) the 'is_sm' PortInfo
> > > > capability mask bit (from user space).
> > > 
> > > Yes, I'll implement this.
> > 
> > Didnt Shahar already do this?
> 
> Not as far as I know. He was inquiring about this and I don't think he
> got to implementing anything.
> > Anyway, as a reminder, there are a couple of issues to consider with this:
> > 1. there shall, properly, be only one sm at the same time
> > 
> >    so I think an attempt to set it when its already set
> >    shall fail or block.
> 
> I would think failing is a better solution for this. That way the second
> SM attempting to be started on the port can indicate that there already
> is an SM running on the port.

What about writing 1 to a special file for this, and looking at O_NONBLOCK
to decide what to do (block or fail)?
For symmetry, reading will let you know if is_sm is set.

> > 2. when sm exits the bit shall be auto-cleared
> > 
> >    I guess the proper way to do it is on closing the file.
> 
> Making sure the bit is cleared is indeed important. It is simple when SM
> exits properly. Hopefully something can occur at process cleanup time to
> ensure this does happen even in the case where the SM dies. Otherwise a
> special utility might be required to turn this off (so an OpenSM can be
> restarted (when #1 is implemented)).
> 
> -- Hal

Ugh.

The simplest approach I think is, keep some file open, when its closed
(which happends automatically when the process dies) clean the is_sm bit.

MST



More information about the general mailing list