All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Lemberg <Alex.Lemberg@sandisk.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Avi Shchislowski <Avi.Shchislowski@sandisk.com>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Chris Ball <chris@printf.net>
Subject: RE: [PATCH] mmc: sleep notification
Date: Tue, 31 Mar 2015 16:22:58 +0000	[thread overview]
Message-ID: <282CEDFCBC30114F83C499CB8F2ED5333FA5B753@SACMBXIP01.sdcorp.global.sandisk.com> (raw)
In-Reply-To: <CAPDyKFroXQ8CThExfbn3F+wMX6=6+-OgLawx2+RA8WC-Y-EKrw@mail.gmail.com>

Hi Ulf,

> -----Original Message-----
> From: Ulf Hansson [mailto:ulf.hansson@linaro.org]
> Sent: Friday, March 27, 2015 3:57 PM
> To: Alex Lemberg
> Cc: Avi Shchislowski; linux-mmc; Chris Ball
> Subject: Re: [PATCH] mmc: sleep notification
> 
> [...]
> 
> >> > What if Sleep_Notification will take several seconds?
> >>
> >> Yes, that horrible! You should tell your colleagues designing FTLs to
> >> make sure that _never_ happens.
> >
> > Agree, but we need to consider and take care of all such cases in the driver
> side.
> > Device might be busy with its internal garbage collection, and as spec
> > allows, it will complete it in a great manner after host sends PON command.
> >
> 
> Okay, so to me, I think the SLEEP notification needs to be sent as a part of the
> system PM suspend phase. And more exactly from the
> bus_ops->suspend() callback.
> 

PM suspend phase is a right place for PON Sleep_Notification,
but it also the critical one and need to be completed as fast as possible.

If I'm not mistaken, during the PM Suspend, the user space is freezing.
Is it OK to let PON Sleep_Notification to be called at that stage?

Calling from the notifier_call (mmc_pm_notify()) will allow to complete 
Sleep_Notification process before entering to the critical part - the Suspend.
Isn't it?

> In addition to that, we should be able improve the situation by also sending the
> SLEEP notification as part of an "idle operation". With "idle operation" I mean
> the mmc block layer hasn’t received any new request for a while (the
> framework for this is already implemented by using runtime PM).

OK, sounds like a good approach. 
In case runtime PM is supported, we can call PON Sleep_Notification from 
mmc_runtime_suspend() during the "idle operation",
and then call it again during PM Suspend.

> 
> So if the SLEEP notification was sent during the "idle operation" and no new
> request was needed during the system PM suspend phase we wouldn't have to
> wake up the card again using HPI, but instead just leave it "sleeping" and send
> CMD5.
> 
> Still, there would be no guarantees that "idle operations" is executed before a
> system PM suspend phase starts. So there are no way we can improve the
> worst case scenario.
> 
> Kind regards
> Uffe

  reply	other threads:[~2015-03-31 16:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10  9:36 [PATCH] mmc: sleep notification Avi Shchislowski
2015-03-10 12:07 ` Ulf Hansson
2015-03-10 14:32   ` Alex Lemberg
2015-03-11 11:50     ` Ulf Hansson
2015-03-11 18:38       ` Alex Lemberg
2015-03-12  9:09         ` Ulf Hansson
2015-03-13 11:46           ` Jaehoon Chung
2015-03-16 11:37           ` Alex Lemberg
2015-03-16 13:34             ` Ulf Hansson
2015-03-16 16:58               ` Alex Lemberg
2015-03-17 10:43                 ` Ulf Hansson
2015-03-27 12:13                   ` Alex Lemberg
2015-03-27 12:57                     ` Ulf Hansson
2015-03-31 16:22                       ` Alex Lemberg [this message]
2015-04-01 11:46                         ` Ulf Hansson
2015-04-06 13:44                           ` Alex Lemberg
2015-04-08  9:49                             ` Ulf Hansson
2015-03-10 13:36 ` Adrian Hunter
2015-03-10 16:32   ` Alex Lemberg
2015-03-10 17:22     ` Ulf Hansson
2015-03-10 18:01       ` Alex Lemberg
2015-03-15  9:04   ` Avi Shchislowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=282CEDFCBC30114F83C499CB8F2ED5333FA5B753@SACMBXIP01.sdcorp.global.sandisk.com \
    --to=alex.lemberg@sandisk.com \
    --cc=Avi.Shchislowski@sandisk.com \
    --cc=chris@printf.net \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.