On 16 March 2015 at 12:37, Alex Lemberg <Alex.Lemberg@xxxxxxxxxxx> wrote: > Hi Ulf, > >> -----Original Message----- >> From: Ulf Hansson [mailto:ulf.hansson@xxxxxxxxxx] >> Sent: Thursday, March 12, 2015 11:10 AM >> To: Alex Lemberg >> Cc: Avi Shchislowski; linux-mmc; Chris Ball >> Subject: Re: [PATCH] mmc: sleep notification >> >> [...] >> >> >> > Also, I think we need to clarify one more point for this patch: >> >> > As was mentioned in commit message - Sleep_Notification can be >> >> > interrupted >> >> by HPI. >> >> > This allows not blocking the host during the Sleep_Notification >> >> > busy time and allows accepting requests coming during this stage. >> >> > Thus, without having HPI supported, suspend/resume process might be >> >> > influenced by Sleep_Notification busy time, and this should not >> >> > happen - >> >> suspend/resume should be done in very fast and not blocking manner. >> >> >> >> I fail to understand your comment here. >> >> >> >> Please tell me at what point(s) your think it make sense to issue the >> >> SLEEP_NOTIFICATION? If that is during the suspend phase, then a HPI >> >> request can't be triggered. >> > >> > I think SLEEP_NOTIFICATION should be issued on mmc_pm_notify() call, >> > on PM_SUSPEND_PREPARE case. >> >> So, exactly why is that to prefer, comparing doing it in system PM >> ->suspend() callback? > > Assuming that SLEEP_NOTIFICATION may take time > (defined in SLEEP_NOTIFICATION_TIME byte in EXT_CSD [216]), > I think it is better to send it from pm notifier - mmc_pm_notify(). I assume you think that you will "earn" some milliseconds doing it in this phase, but I am not so sure. After the PM_SUSPEND_PREPARE notifier, we still have the mmc block queue open and are ready to serve requests. Therefore I would expect the SLEEP_NOTIFICATION to potentially be interrupted by using HPI. Then we end up with the following sequence during the system PM sleep phase. 1. Issue SLEEP_NOTIFICATION. 2. Interrupt SLEEP_NOTIFICATION, using HPI. 3. Serve blk request 4. Issue SLEEP_NOTIFICATION. 5. Issue SLEEP (CMD5). That seems like a bad idea to me. Kind regards Uffe -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html