Re: [PATCH] pm/sleep: Add PM_USERSPACE_AUTOSLEEP Kconfig

2022-07-01 Thread Greg KH
On Thu, Jun 30, 2022 at 09:49:24PM +0200, Jason A. Donenfeld wrote:
> Hi Kalesh,
> 
> On Thu, Jun 30, 2022 at 07:12:29PM +, Kalesh Singh wrote:
> > Systems that initiate frequent suspend/resume from userspace
> > can make the kernel aware by enabling PM_USERSPACE_AUTOSLEEP
> > config.
> > 
> > This allows for certain sleep-sensitive code (wireguard/rng) to
> > decide on what preparatory work should be performed (or not) in
> > their pm_notification callbacks.
> > 
> > This patch was prompted by the discussion at [1] which attempts
> > to remove CONFIG_ANDROID that currently guards these code paths.
> > 
> > [1] https://lore.kernel.org/r/20220629150102.1582425-1-...@lst.de/
> > 
> > Suggested-by: Jason A. Donenfeld 
> > Signed-off-by: Kalesh Singh 
> 
> Thanks, looks good to me. Do you have a corresponding Gerrit link to the
> change adding this to the base Android kernel config? If so, have my
> Ack:
> 
> Acked-by: Jason A. Donenfeld 

Cool, I'll queue this up and also the CONFIG_ANDROID removal into my
tree now, thanks all for working it out!

greg k-h


Re: [PATCH] pm/sleep: Add PM_USERSPACE_AUTOSLEEP Kconfig

2022-06-30 Thread Jason A. Donenfeld
Hi Kalesh,

On Thu, Jun 30, 2022 at 03:02:46PM -0700, Kalesh Singh wrote:
> I've uploaded the changes on android-mainline [1]. We'll submit there
> once the upstream changes are finalized.
> 
> [1] https://android-review.googlesource.com/c/kernel/common/+/2142693/1

Excellent. I think everything is all set then, at least from my
perspective. There's a viable replacement for this usage of
CONFIG_ANDROID, there are patches ready to go both in the kernel and on
Android's configs, and now all we do is wait for Rafael. Great!

Maybe people will have opinions on the naming
(CONFIG_PM_RAPID_USERSPACE_AUTOSLEEP vs
CONFIG_PM_ANDROID_USERAPCE_AUTO_SLEEP vs what you have vs something else
vs who knows), but whatever is chosen seems probably fine, as this is a
pretty low key change since it can always be tweaked further later (it's
not ABI).

Jason


Re: [PATCH] pm/sleep: Add PM_USERSPACE_AUTOSLEEP Kconfig

2022-06-30 Thread Kalesh Singh
On Thu, Jun 30, 2022 at 2:14 PM Jason A. Donenfeld  wrote:
>
> On Thu, Jun 30, 2022 at 01:41:40PM -0700, Kalesh Singh wrote:
> > Our latest supported kernels in Android are based on 5.15 so the
> > config change isn't yet needed. Once there are newer versions with the
> > CONFIG_ANDROID removed I will add this to the defconfig.
>
> Okay. It might be still worth getting something uploaded to gerrit so
> that it's easy to remember and submit whenever the time comes.
>
> Also, what about android running on mainline? Where does that base
> config live?

I've uploaded the changes on android-mainline [1]. We'll submit there
once the upstream changes are finalized.

[1] https://android-review.googlesource.com/c/kernel/common/+/2142693/1

Thanks,
Kalesh
>
> Jason


Re: [PATCH] pm/sleep: Add PM_USERSPACE_AUTOSLEEP Kconfig

2022-06-30 Thread Jason A. Donenfeld
On Thu, Jun 30, 2022 at 01:41:40PM -0700, Kalesh Singh wrote:
> Our latest supported kernels in Android are based on 5.15 so the
> config change isn't yet needed. Once there are newer versions with the
> CONFIG_ANDROID removed I will add this to the defconfig.

Okay. It might be still worth getting something uploaded to gerrit so
that it's easy to remember and submit whenever the time comes.

Also, what about android running on mainline? Where does that base
config live?

Jason


Re: [PATCH] pm/sleep: Add PM_USERSPACE_AUTOSLEEP Kconfig

2022-06-30 Thread Kalesh Singh
On Thu, Jun 30, 2022 at 12:49 PM Jason A. Donenfeld  wrote:
>
> Hi Kalesh,
>
> On Thu, Jun 30, 2022 at 07:12:29PM +, Kalesh Singh wrote:
> > Systems that initiate frequent suspend/resume from userspace
> > can make the kernel aware by enabling PM_USERSPACE_AUTOSLEEP
> > config.
> >
> > This allows for certain sleep-sensitive code (wireguard/rng) to
> > decide on what preparatory work should be performed (or not) in
> > their pm_notification callbacks.
> >
> > This patch was prompted by the discussion at [1] which attempts
> > to remove CONFIG_ANDROID that currently guards these code paths.
> >
> > [1] https://lore.kernel.org/r/20220629150102.1582425-1-...@lst.de/
> >
> > Suggested-by: Jason A. Donenfeld 
> > Signed-off-by: Kalesh Singh 
>
> Thanks, looks good to me. Do you have a corresponding Gerrit link to the
> change adding this to the base Android kernel config? If so, have my
> Ack:
>
> Acked-by: Jason A. Donenfeld 

Hi Jason,

Our latest supported kernels in Android are based on 5.15 so the
config change isn't yet needed. Once there are newer versions with the
CONFIG_ANDROID removed I will add this to the defconfig.

Thanks,
Kalesh

>
> Jason
>
> --
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to kernel-team+unsubscr...@android.com.
>


Re: [PATCH] pm/sleep: Add PM_USERSPACE_AUTOSLEEP Kconfig

2022-06-30 Thread Jason A. Donenfeld
Hi Kalesh,

On Thu, Jun 30, 2022 at 07:12:29PM +, Kalesh Singh wrote:
> Systems that initiate frequent suspend/resume from userspace
> can make the kernel aware by enabling PM_USERSPACE_AUTOSLEEP
> config.
> 
> This allows for certain sleep-sensitive code (wireguard/rng) to
> decide on what preparatory work should be performed (or not) in
> their pm_notification callbacks.
> 
> This patch was prompted by the discussion at [1] which attempts
> to remove CONFIG_ANDROID that currently guards these code paths.
> 
> [1] https://lore.kernel.org/r/20220629150102.1582425-1-...@lst.de/
> 
> Suggested-by: Jason A. Donenfeld 
> Signed-off-by: Kalesh Singh 

Thanks, looks good to me. Do you have a corresponding Gerrit link to the
change adding this to the base Android kernel config? If so, have my
Ack:

Acked-by: Jason A. Donenfeld 

Jason