[ofa-general] [PATCH 2/4] opensm/main.c rescan subnet configuration after SIGHUP

Sasha Khapyorsky sashak at voltaire.com
Tue Feb 3 05:48:31 PST 2009


On 15:40 Tue 03 Feb     , Eli Dorfman (Voltaire) wrote:
> >> --- a/opensm/opensm/osm_state_mgr.c
> >> +++ b/opensm/opensm/osm_state_mgr.c
> >> @@ -1042,6 +1042,13 @@ static void do_sweep(osm_sm_t * sm)
> >>  	ib_api_status_t status;
> >>  	osm_remote_sm_t *p_remote_sm;
> >>  
> >> +	if (sm->p_subn->rescan_conf_file) {
> >> +		if (osm_subn_rescan_conf_files(sm->p_subn) < 0)
> >> +			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 331A: "
> >> +				"osm_subn_rescan_conf_file failed\n");
> >> +		sm->p_subn->rescan_conf_file = FALSE;
> >> +	}
> >> +
> > 
> > What would be wrong with using exiting 'force_heavy_sweep' flag?
> > 
> 'force_heavy_sweep' flag is set in other occasions as well

Yes. And file is rescanned on heavy sweep (later) anyway :)

> 
> > Another issue with this patch - config file will be rescanned later
> > again (during heavy sweep). It would be really nice to avoid such
> > obviously unneeded double parsing.
> >
> that is correct, but we need a special flag to handle the priority change when SM
> is in standby.
> In that case a rescan at the beginning of do_sweep is a must, otherwise it will 
> simply return without doing anything.
> what was the reason of putting rescan not in the beginning of do_sweep().

I don't remember many details, but originally it was used for updating
only selected parameters. Also (I guess) for eliminating rescanning on
light sweeps.

> If none then we can simply rescan as first step.

After fast thinking - it could be an option, just verify that it will
not break functionality a lot.

Sasha



More information about the general mailing list