[ofa-general] [PATCH 2/4 v2] opensm/osm_state_mgr.c rescan subnet configuration after SIGHUP
Eli Dorfman (Voltaire)
dorfman.eli at gmail.com
Wed Feb 11 01:22:24 PST 2009
Sasha Khapyorsky wrote:
> On 15:47 Mon 09 Feb , Eli Dorfman (Voltaire) wrote:
>> Sasha Khapyorsky wrote:
>>> Hi Eli,
>>>
>>> On 21:23 Sun 08 Feb , Eli Dorfman wrote:
>>>> yes, but wouldn't it be better to separate between heavy sweep and
>>>> config rescan (due to SIGHUP).
>>> SIGHUP main purpose always was to trigger heavy sweep.
>>>
>>>> I think that user should know when configuration is updated and not
>>>> wait for heavy sweep.
>>> I'm not following - SIGHUP will cause heavy sweep and config update,
>>> where is a waiting?
>>>
>> i meant that if the user is changing config file and there is a heavy sweep then
>> config may be updated,
>
> Are you about race between file reading (by OpenSM) and writing (by
> user)? Using write lock on reading would solve an issue.
>
>> while using specific flag for config rescan will avoid this case.
>
> What do you mean by "specific flag"? Using separate signal? Assuming so,
> this will not prevent read/write race.
>
At the moment force_heavy_sweep is set in many places and also after SIGHUP.
opensm rescans the configuration file when this flag is set, so if there is link change
in the subnet while the user is modifying the file, the opensm may update the configuration
even if the user didn't finish updating it.
Using another flag (e.g. rescan_config_file) that will be set only after SIGHUP will
assure that opensm updates subnet configuration when user finished updating the file.
More information about the general
mailing list