Re: crash-suspend teardown races

2008-07-31 Thread David Smith
Roland McGrath wrote: Thanks, David. That is exactly the right example of using kernel synchronization primitives with callbacks to implement blocking behaviors you want. The wrinkle there is that you use UTRACE_INTERRUPT, which (potentially) perturbs the behavior of every traced thread.

Re: crash-suspend teardown races

2008-07-31 Thread Roland McGrath
Is there a way to avoid using UTRACE_INTERRUPT? Certainly I'd like to avoid disturbing the processes we're tracing. That's what the entire asynchronous detach discussion is about! Wade on in with me and Ananth. The brain piranhas are biting! Thanks, Roland

crash-suspend teardown races

2008-07-30 Thread David Smith
For background to this email, read the teardown races section in utrace.txt and Roland's asynchronous detach email. The crash-suspend.c example suffers from the teardown races problem. (Since systemtap's utrace code is a more elaborate version of crash-suspend.c, systemtap has the same problem.)

Re: crash-suspend teardown races

2008-07-30 Thread Roland McGrath
Thanks, David. That is exactly the right example of using kernel synchronization primitives with callbacks to implement blocking behaviors you want. The wrinkle there is that you use UTRACE_INTERRUPT, which (potentially) perturbs the behavior of every traced thread. Doing this gives you a

Re: crash-suspend teardown races

2008-07-30 Thread Ananth N Mavinakayanahalli
On Wed, Jul 30, 2008 at 04:19:44PM -0500, David Smith wrote: ... @@ -197,14 +224,33 @@ static void __exit exit_crash_suspend(vo error, t-pid); } else { - int ret = utrace_control(t, engine, UTRACE_DETACH);