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

From: Pavel Machek
Date: Tue Jun 27 2006 - 09:46:39 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/