Re: [RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-17 Thread Sergey Senozhatsky
Hello, On (08/17/17 17:43), Rafael J. Wysocki wrote: [..] > > > In that case I would call printk_emergency_begin_sync() from > > > dpm_prepare() and printk_emergency_end_sync() from dpm_complete(). > > > > hm, isn't it the case that dpm_prepare/dpm_complete are invoked only > > by hibernate

Re: [RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-17 Thread Sergey Senozhatsky
Hello, On (08/17/17 17:43), Rafael J. Wysocki wrote: [..] > > > In that case I would call printk_emergency_begin_sync() from > > > dpm_prepare() and printk_emergency_end_sync() from dpm_complete(). > > > > hm, isn't it the case that dpm_prepare/dpm_complete are invoked only > > by hibernate

Re: [RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-17 Thread Rafael J. Wysocki
On Thursday, August 17, 2017 7:55:58 AM CEST Sergey Senozhatsky wrote: > Hello Rafael, > > On (08/16/17 14:58), Rafael J. Wysocki wrote: > [..] > > > hm, those two are interesting questions. in short - well, it might > > > be. I don't want to interfere with PM by doing 'accidental' offloading > >

Re: [RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-17 Thread Rafael J. Wysocki
On Thursday, August 17, 2017 7:55:58 AM CEST Sergey Senozhatsky wrote: > Hello Rafael, > > On (08/16/17 14:58), Rafael J. Wysocki wrote: > [..] > > > hm, those two are interesting questions. in short - well, it might > > > be. I don't want to interfere with PM by doing 'accidental' offloading > >

Re: [RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-16 Thread Sergey Senozhatsky
Hello Rafael, On (08/16/17 14:58), Rafael J. Wysocki wrote: [..] > > hm, those two are interesting questions. in short - well, it might > > be. I don't want to interfere with PM by doing 'accidental' offloading > > etc., PM is too complicated already. so I'd prefer to switch to old > > printk

Re: [RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-16 Thread Sergey Senozhatsky
Hello Rafael, On (08/16/17 14:58), Rafael J. Wysocki wrote: [..] > > hm, those two are interesting questions. in short - well, it might > > be. I don't want to interfere with PM by doing 'accidental' offloading > > etc., PM is too complicated already. so I'd prefer to switch to old > > printk

Re: [RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-16 Thread Rafael J. Wysocki
On Wednesday, August 16, 2017 9:31:17 AM CEST Sergey Senozhatsky wrote: > On (08/15/17 13:51), Rafael J. Wysocki wrote: > > On Tuesday, August 15, 2017 4:56:18 AM CEST Sergey Senozhatsky wrote: > [..] > > > This patch registers PM notifier, so PM can switch printk > > > to emergency mode from

Re: [RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-16 Thread Rafael J. Wysocki
On Wednesday, August 16, 2017 9:31:17 AM CEST Sergey Senozhatsky wrote: > On (08/15/17 13:51), Rafael J. Wysocki wrote: > > On Tuesday, August 15, 2017 4:56:18 AM CEST Sergey Senozhatsky wrote: > [..] > > > This patch registers PM notifier, so PM can switch printk > > > to emergency mode from

Re: [RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-16 Thread Sergey Senozhatsky
On (08/15/17 13:51), Rafael J. Wysocki wrote: > On Tuesday, August 15, 2017 4:56:18 AM CEST Sergey Senozhatsky wrote: [..] > > This patch registers PM notifier, so PM can switch printk > > to emergency mode from PM_FOO_PREPARE notifiers and return > > Isn't that too early? That's before user

Re: [RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-16 Thread Sergey Senozhatsky
On (08/15/17 13:51), Rafael J. Wysocki wrote: > On Tuesday, August 15, 2017 4:56:18 AM CEST Sergey Senozhatsky wrote: [..] > > This patch registers PM notifier, so PM can switch printk > > to emergency mode from PM_FOO_PREPARE notifiers and return > > Isn't that too early? That's before user

Re: [RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-15 Thread Rafael J. Wysocki
On Tuesday, August 15, 2017 4:56:18 AM CEST Sergey Senozhatsky wrote: > It's not always possible/safe to wake_up() printk kernel > thread. For example, late suspend/early resume may printk() > while timekeeping is not initialized yet, so calling into the > scheduler may result in recursive

Re: [RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-15 Thread Rafael J. Wysocki
On Tuesday, August 15, 2017 4:56:18 AM CEST Sergey Senozhatsky wrote: > It's not always possible/safe to wake_up() printk kernel > thread. For example, late suspend/early resume may printk() > while timekeeping is not initialized yet, so calling into the > scheduler may result in recursive

[RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-14 Thread Sergey Senozhatsky
It's not always possible/safe to wake_up() printk kernel thread. For example, late suspend/early resume may printk() while timekeeping is not initialized yet, so calling into the scheduler may result in recursive warnings. Another thing to notice is the fact that PM at some point freezes user

[RFC][PATCHv5 06/13] printk: register PM notifier

2017-08-14 Thread Sergey Senozhatsky
It's not always possible/safe to wake_up() printk kernel thread. For example, late suspend/early resume may printk() while timekeeping is not initialized yet, so calling into the scheduler may result in recursive warnings. Another thing to notice is the fact that PM at some point freezes user