> > Data loss may be caused for hotplug storage(like USB), or all storage > > when power is exhausted during suspend. > > Which also may very well happen at run time, right?
Intuitively users treat "suspended" as a bit like off and do remove devices they've "finished with". Technically yes the instant off/on on a phone is the same as the suspend to RAM on a laptop but it doesn't mean the model in people's heads is the same... not yet anyway. > > Is there obvious advantage to remove sys_sync() in the case? > > Yes, there is. It is not necessary to sync() every time you suspend > if you do that very often. But if you do it very often you won't have any dirty pages to flush so it will be very fast. > And it is done in such a place that everything needs to wait for it to > complete. Only because the code deciding to trigger any automated suspend doesn't do a sync a few seconds before. In the case the user goes to the menus and does power->suspend then yes it's a delay. In the case where the OS at some level has decided that it's 10 seconds from automatically suspending to something the user space can issue a pre-emptive sync to get the queue size down. Alan -- 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/

