Re: [Suspend2][ 15/20] [Suspend2] Attempt to freeze processes.

Pavel Machek
2006-06-27T13:47:53Z

Hi!

> Call the freezer code to get processes frozen, and abort suspending if that
> fails. May be called multiple times as we thaw kernel space (only) if we
> need to free memory to meet constraints.

Current code seems to free memory without need to thaw/re-freeze
kernel threads. Have you found bugs in that, or is this unneccessary?

> +static int attempt_to_freeze(void)
> +{
> + int result;
> +
> + /* Stop processes before checking again */
> + thaw_processes(FREEZER_ALL_THREADS);
> + suspend_prepare_status(CLEAR_BAR, "Freezing processes");
> + result = freeze_processes();
> +
> + if (result) {
> + set_result_state(SUSPEND_ABORTED);
> + set_result_state(SUSPEND_FREEZING_FAILED);
> + } else
> + are_frozen = 1;
> +
> + return result;
> +}
> +

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html