From: Srivatsa V. <va...@in...> - 2003-09-26 14:34:34
|
Dhruv, IMHO when dump is initiated, it should not call _any_ kernel function (because they cant be trusted to run fine). dump should depend on its own set of routines to do its job. If that is the design goal, then dump will not need to depend on system resources like spinlocks, semaphores etc. It's a different thing that we currently dont meet that goal (atleast for the SCSI case) since dump depends on the kernel driver to dump data to disk ! On Fri, Sep 26, 2003 at 05:58:03PM +0530, Dhruv Prem Anand wrote: > Hi, > > I have been browsing through the LKCD code. As an > observation, at the time of dump_execute (), system > resources like spinlocks and semaphores might be required > by the dumping process. These resources might be in a > locked state when the dumping process tries to acquire > them. As a result dump process hangs. > > In order to resolve such scenarios during dump, it is required > that dump is successful in acquiring these resources irrespective > of their state. For the same i have two strategies: > > 1. 'BUST' relevant spinlocks and semaphores :- > This scheme shall explicitly make required resources available. i.e. > > by writing a proper value to the locks pertinent memory location. > The original value can be restored later. > > I am still working out how to gather the details of all the locks > (at least for IDE/SCSI drivers). If I am able to identify the lock > then System.map/Kerntypes.o can help me find out the address of the > lock and I can place the appropriate value. (Reinitialize) > > 2. Put a check in semaphore/spinlock code for dump_in_progress flag :- > This scheme shall provide a check for dump_in_progress flag in the > spinlock and semaphore implementation. > The check for dump_in_progress flag is inserted before the process > enters the busy wait. If dump is in progress this check shall pass > and control will be returned to the process. > > This scheme definitely has got some performance overhead but at the > same time it ensures that dump shall never hang due to resource > locking. > > Your suggestions are most awaited. > Thanks and Regards > Dhruv > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > lkcd-devel mailing list > lkc...@li... > https://lists.sourceforge.net/lists/listinfo/lkcd-devel -- Thanks and Regards, Srivatsa Vaddagiri, Linux Technology Center, IBM Software Labs, Bangalore, INDIA - 560033 |