Re: [RFC][PATCH -mm 3/6] Freezer: Be more verbose

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

 



Hi,

On Tuesday, 10 July 2007 01:46, Pavel Machek wrote:
> Hi!
> 
> > From: Rafael J. Wysocki <rjw@xxxxxxx>
> > 
> > Increase the freezer's verbosity a bit, so that it's easier to read problem
> > reports related to it.
> > 
> > Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx>
> > ---
> >  kernel/power/process.c |   17 ++++++++++-------
> >  1 file changed, 10 insertions(+), 7 deletions(-)
> > 
> > Index: linux-2.6.22-rc6-mm1/kernel/power/process.c
> > ===================================================================
> > --- linux-2.6.22-rc6-mm1.orig/kernel/power/process.c
> > +++ linux-2.6.22-rc6-mm1/kernel/power/process.c
> > @@ -237,20 +237,23 @@ static int try_to_freeze_tasks(int freez
> >   */
> >  int freeze_processes(void)
> >  {
> > -	int error;
> > +	int error = 0;
> 
> You set error unconditionally few lines below.

Ah, thanks.  There were a couple of versions of this patch and I forgot to
remove this.

> > -	printk("Stopping tasks ... ");
> > +	printk("Freezing user space processes ... ");
> >  	error = try_to_freeze_tasks(FREEZER_USER_SPACE);
> >  	if (error)
> > -		return error;
> > +		goto Exit;
> > +	printk("done.\n");
> >  
> > +	printk("Freezing remaining freezable tasks ... ");
> 
> can we ust do printk(" rest ... "); ? Saves one line... and suspend
> process is too verbose anyway.

In fact, this is related to the next patch, in which try_to_freeze_tasks() is
reworked and without this it won't be clear which phase of the freezing has
failed (in case of failure, that is).

Greetings,
Rafael


-- 
"Premature optimization is the root of all evil." - Donald Knuth
_______________________________________________
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