Re: [RFC][PATCH -mm 2/3] Freezer: Measure the time of freezing tasks

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

 



Hi!

> Measure the time of the freezing of tasks, even if it doesn't fail.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx>

Ok, why not.

> @@ -233,10 +243,9 @@ static int try_to_freeze_tasks(int freez
>  		 * but it cleans up leftover PF_FREEZE requests.
>  		 */
>  		printk("\n");
> -		printk(KERN_ERR "Freezing of %s timed out after %d seconds "
> +		printk(KERN_ERR "Freezing of tasks failed after %d.%d seconds "

%d.%02d... or it will report bogus numbers.

>  				"(%d tasks refusing to freeze):\n",
> -				freeze_user_space ? "user space " : "tasks ",
> -				TIMEOUT / HZ, todo);
> +				elapsed_csecs / 100, elapsed_csecs % 100, todo);
>  		show_state();
>  		read_lock(&tasklist_lock);
>  		do_each_thread(g, p) {
> @@ -247,6 +256,9 @@ static int try_to_freeze_tasks(int freez
>  			task_unlock(p);
>  		} while_each_thread(g, p);
>  		read_unlock(&tasklist_lock);
> +	} else {
> +		printk("(elapsed %d.%d seconds) ", elapsed_csecs / 100,
> +			elapsed_csecs % 100);
>  	}

Same here. You have my ACK with that change.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux