Any thoughts, suggestions?

Regards,
PG

> -----Original Message-----
> From: Ganesha, Raghavendra Pandimakki
> Sent: Tuesday, November 04, 2008 4:14 PM
> To: [email protected]
> Subject: [Openhpi-devel] Supporting the graceful shutdown for
> openhpi daemon
>
> Hello,
>
> Currently, if user wants to stop the openhpi daemon, then it
> is done by killing the openhpi daemon which results in abrupt
> shutdown. openhpi daemon is not supporting graceful shutdown.
> Graceful shutdown of the OpenHPI helps in closing the
> connections with the managed devices (like shelf manager of
> ATCA, OA of HP c-Class, etc) and releasing all the allocated
> memory by the openhpi.
>
> The most important advantage of the graceful shutdown is that
> it helps in finding the memory leaks.
>
> The attached patch supports the graceful shutdown for OpenHPI
> and close() ABI is completely implemented for simulator plugin.
> The openhpi shutdown request can be sent through the kill
> command with SIGUSR1 signal or via init.d/openhpid shell
> script with shutdown as option. The openhpid shell script
> sends SIGUSR1 signal to openhpid process. The SIGUSR1 signal
> can be caught by the signal handler in openhpid daemon. And
> the shutdown signal can be sent to all the openhpi threads.
> Please note that 'stop' option in init.d/openhpid shell
> script (or kill <pid of openhpid>) stops/kills the openhpid
> abruptly. This is not changed as part of this patch.
>
> The openhpid.sh.in file has been modified to send the SIGUSR1
> signal as part of the shutdown request. BUT, I'm not able to
> test it for the different Linux OS. I'm not sure whether
> changes done for different OS are correct or not. I am
> looking forward for the help from the different OS experts on this.
>
> The focus of the graceful shutdown is for the daemon to be
> able to handle a shutdown signal, close client connections,
> close open handlers, and to release all memory resources.
> Using this patch, memory leaks in openhpi are detected and
> the openhpi memory leak bug #1823713 has been closed.
>
> Since the changes involve many parts of the infrastructure,
> we can discuss the proposed changes.
>
> The advantage
> ---------------
>  * Facilitates use of memory leak detection tools (like valgrind).
>  * Encourages plug-in writers to fully implement close calls
>  * Closes the connection with the managed devices so that
> managed devices can
>    also cleanup the resources allocated.
>  * Most of the telecom players are very strict on memory
> leaks. Since, the
>    openhpi may run for few months to few years, the memory leaks in
>    openhpi (if any) may create serious problems. The end-user
> can test on
>    his/her system for the memory leaks. This helps in
> increasing the end-user
>    confidence in OpenHPI.
>
> The disadvantages
> ------------------
>  * Complicates the socket connection a little, because of the
> use of timeouts
>  * Requires more source code for the shutdown operation,
> which is really wasted
>    since the kernel is going to dispose of the daemon process
> resources anyway.
>
> The attached graceful_shutdown_notes gives more information
> on the changes done as part of this patch.
>
> Regards,
> PG
>
> NOTE: This is tracked in openhpi tracker as feature request #2220356.
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel

Reply via email to