[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOS58YPW3hB3ibaYPLBqhu=2jZTAjjF7DZaXO=hK5tookAX7YA@mail.gmail.com>
Date: Wed, 18 Jan 2012 08:58:47 -0800
From: Tejun Heo <tj@...nel.org>
To: "Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>,
Linux PM list <linux-pm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, horms@...ge.net.au,
"pavel@....cz" <pavel@....cz>, Len Brown <lenb@...nel.org>
Subject: Re: [Update][PATCH] PM / Hibernate: Fix s2disk regression related to unlock_system_sleep()
Hello,
On Wed, Jan 18, 2012 at 8:54 AM, Srivatsa S. Bhat
<srivatsa.bhat@...ux.vnet.ibm.com> wrote:
> + /*
> + * Don't use freezer_count() because we don't want the call to
> + * try_to_freeze() here.
> + *
> + * Reason:
> + * unlock_system_sleep() gets called in snapshot_read() and
> + * snapshot_write() when the freezing condition is still in effect.
> + * Which means, if we use try_to_freeze() here, it would make them
> + * enter the refrigerator, thus causing suspend-to-disk to lockup.
> + */
Yeap, much better but wouldn't it be better if the description was
higher level? ie. Explain why try_to_freeze() doesn't make sense for
this operation semantically and then, optionally, give an example of
breakage. It usually is lack of proper rationale / reasoning that
confuses people reading the code.
Thank you.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists