Messages in this thread |  | | Date | Wed, 18 Jan 2012 08:58:47 -0800 | | Subject | Re: [Update][PATCH] PM / Hibernate: Fix s2disk regression related to unlock_system_sleep() | | From | Tejun Heo <> |
| |
Hello,
On Wed, Jan 18, 2012 at 8:54 AM, Srivatsa S. Bhat <srivatsa.bhat@linux.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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |