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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux