Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-03 Thread Rafael J. Wysocki
Hi, On Tue, Nov 3, 2015 at 10:31 AM, Jan Kara wrote: > On Tue 03-11-15 11:10:53, Dave Chinner wrote: >> On Mon, Nov 02, 2015 at 03:43:07AM +0100, Rafael J. Wysocki wrote: >> > I guess it may also helps to address the case when a device is removed >> > from a >> > suspended system, written to on

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-03 Thread Jan Kara
On Tue 03-11-15 11:10:53, Dave Chinner wrote: > On Mon, Nov 02, 2015 at 03:43:07AM +0100, Rafael J. Wysocki wrote: > > I guess it may also helps to address the case when a device is removed from > > a > > suspended system, written to on another system in the meantime and inserted > > back into

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-03 Thread Jan Kara
On Tue 03-11-15 11:10:53, Dave Chinner wrote: > On Mon, Nov 02, 2015 at 03:43:07AM +0100, Rafael J. Wysocki wrote: > > I guess it may also helps to address the case when a device is removed from > > a > > suspended system, written to on another system in the meantime and inserted > > back into

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-03 Thread Rafael J. Wysocki
Hi, On Tue, Nov 3, 2015 at 10:31 AM, Jan Kara wrote: > On Tue 03-11-15 11:10:53, Dave Chinner wrote: >> On Mon, Nov 02, 2015 at 03:43:07AM +0100, Rafael J. Wysocki wrote: >> > I guess it may also helps to address the case when a device is removed >> > from a >> > suspended system,

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-02 Thread Rafael J. Wysocki
On Tuesday, November 03, 2015 11:10:53 AM Dave Chinner wrote: > On Mon, Nov 02, 2015 at 03:43:07AM +0100, Rafael J. Wysocki wrote: > > I guess it may also helps to address the case when a device is removed from > > a > > suspended system, written to on another system in the meantime and inserted

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-02 Thread Dave Chinner
On Mon, Nov 02, 2015 at 03:43:07AM +0100, Rafael J. Wysocki wrote: > I guess it may also helps to address the case when a device is removed from a > suspended system, written to on another system in the meantime and inserted > back into the (still suspended) original system which then is resumed.

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-02 Thread Alan Stern
On Mon, 2 Nov 2015, Jiri Kosina wrote: > On Mon, 2 Nov 2015, Rafael J. Wysocki wrote: > > BTW, the freezing of filesystems during system suspend (not hibernation) > > makes > > sense too, because it will help to address the long-standing issue with > > storage > > devices that go away while

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-02 Thread Oliver Neukum
On Mon, 2015-11-02 at 11:45 +0100, Jiri Kosina wrote: > > For example, if user space does a "read" or "write" on a character > device > > which is runtime-suspended at that point, the driver may want to > resume the > > device temporarily, carry out the operation and suspend it again, > but that >

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-02 Thread Jiri Kosina
On Mon, 2 Nov 2015, Rafael J. Wysocki wrote: > > > > BTW, a quite some of this has been already "pre-discussed" in > > > > Documentation/power/freezing-of-tasks.txt (which has BTW been written > > > > before we've had the possibility to freeze filesystems, and this fact > > > > is > > > >

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-02 Thread Alan Stern
On Mon, 2 Nov 2015, Jiri Kosina wrote: > On Mon, 2 Nov 2015, Rafael J. Wysocki wrote: > > BTW, the freezing of filesystems during system suspend (not hibernation) > > makes > > sense too, because it will help to address the long-standing issue with > > storage > > devices that go away while

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-02 Thread Dave Chinner
On Mon, Nov 02, 2015 at 03:43:07AM +0100, Rafael J. Wysocki wrote: > I guess it may also helps to address the case when a device is removed from a > suspended system, written to on another system in the meantime and inserted > back into the (still suspended) original system which then is resumed.

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-02 Thread Jiri Kosina
On Mon, 2 Nov 2015, Rafael J. Wysocki wrote: > > > > BTW, a quite some of this has been already "pre-discussed" in > > > > Documentation/power/freezing-of-tasks.txt (which has BTW been written > > > > before we've had the possibility to freeze filesystems, and this fact > > > > is > > > >

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-02 Thread Oliver Neukum
On Mon, 2015-11-02 at 11:45 +0100, Jiri Kosina wrote: > > For example, if user space does a "read" or "write" on a character > device > > which is runtime-suspended at that point, the driver may want to > resume the > > device temporarily, carry out the operation and suspend it again, > but that >

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-02 Thread Rafael J. Wysocki
On Tuesday, November 03, 2015 11:10:53 AM Dave Chinner wrote: > On Mon, Nov 02, 2015 at 03:43:07AM +0100, Rafael J. Wysocki wrote: > > I guess it may also helps to address the case when a device is removed from > > a > > suspended system, written to on another system in the meantime and inserted

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-01 Thread Rafael J. Wysocki
On Saturday, October 31, 2015 09:19:33 AM Jiri Kosina wrote: > On Sat, 31 Oct 2015, Rafael J. Wysocki wrote: > > > > > > > > I would say instead "no I/O is allowed from now on". Maybe > > > > > > > that's an > > > > > > > overstatement, but I think it comes closer to the truth. > > > > > > >

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-11-01 Thread Rafael J. Wysocki
On Saturday, October 31, 2015 09:19:33 AM Jiri Kosina wrote: > On Sat, 31 Oct 2015, Rafael J. Wysocki wrote: > > > > > > > > I would say instead "no I/O is allowed from now on". Maybe > > > > > > > that's an > > > > > > > overstatement, but I think it comes closer to the truth. > > > > > > >

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-31 Thread Alan Stern
On Sat, 31 Oct 2015, Rafael J. Wysocki wrote: > Runtime PM uses a freezable workqueue, allocated in pm_start_workqueue(). > > That's because we don't want async runtime PM to happen during system > suspend/resume and for good reasons, so if you want to remove the freezing > mechanism, you need

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-31 Thread Alan Stern
On Fri, 30 Oct 2015, Jiri Kosina wrote: > On Fri, 30 Oct 2015, Alan Stern wrote: > > > > > > I would say instead "no I/O is allowed from now on". Maybe that's an > > > > > overstatement, but I think it comes closer to the truth. > > > > > > But that's what PM callbacks are for. > > > > Why

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-31 Thread Jiri Kosina
On Sat, 31 Oct 2015, Rafael J. Wysocki wrote: > > > > > > I would say instead "no I/O is allowed from now on". Maybe that's > > > > > > an > > > > > > overstatement, but I think it comes closer to the truth. > > > > > > > > But that's what PM callbacks are for. > > Not really. In fact, PM

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-31 Thread Jiri Kosina
On Sat, 31 Oct 2015, Rafael J. Wysocki wrote: > > > > > > I would say instead "no I/O is allowed from now on". Maybe that's > > > > > > an > > > > > > overstatement, but I think it comes closer to the truth. > > > > > > > > But that's what PM callbacks are for. > > Not really. In fact, PM

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-31 Thread Alan Stern
On Sat, 31 Oct 2015, Rafael J. Wysocki wrote: > Runtime PM uses a freezable workqueue, allocated in pm_start_workqueue(). > > That's because we don't want async runtime PM to happen during system > suspend/resume and for good reasons, so if you want to remove the freezing > mechanism, you need

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-31 Thread Alan Stern
On Fri, 30 Oct 2015, Jiri Kosina wrote: > On Fri, 30 Oct 2015, Alan Stern wrote: > > > > > > I would say instead "no I/O is allowed from now on". Maybe that's an > > > > > overstatement, but I think it comes closer to the truth. > > > > > > But that's what PM callbacks are for. > > > > Why

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Rafael J. Wysocki
On Friday, October 30, 2015 10:17:54 PM Jiri Kosina wrote: > On Fri, 30 Oct 2015, Alan Stern wrote: > > > > > > I would say instead "no I/O is allowed from now on". Maybe that's an > > > > > overstatement, but I think it comes closer to the truth. > > > > > > But that's what PM callbacks are

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Jiri Kosina
On Fri, 30 Oct 2015, Alan Stern wrote: > > > > I would say instead "no I/O is allowed from now on". Maybe that's an > > > > overstatement, but I think it comes closer to the truth. > > > > But that's what PM callbacks are for. > > Why are PM callbacks any more suitable than the freezer?

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Alan Stern
On Fri, 30 Oct 2015, Jiri Kosina wrote: > On Fri, 30 Oct 2015, Pavel Machek wrote: > > > > I would say instead "no I/O is allowed from now on". Maybe that's an > > > overstatement, but I think it comes closer to the truth. > > But that's what PM callbacks are for. Why are PM callbacks any

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Jiri Kosina
On Fri, 30 Oct 2015, Pavel Machek wrote: > > I would say instead "no I/O is allowed from now on". Maybe that's an > > overstatement, but I think it comes closer to the truth. But that's what PM callbacks are for. > Exactly. And I'm pretty sure hardware drivers do use kernel threads, > and do

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Pavel Machek
On Fri 2015-10-30 11:29:08, Alan Stern wrote: > On Fri, 30 Oct 2015, Jiri Kosina wrote: > > > This series is a followup to my proposal I brought up on Kernel Summit in > > Seoul. Noone seemed to had any principal objections, so let's have wider > > audience look into it. > > > > In a nuthsell:

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Alan Stern
On Fri, 30 Oct 2015, Jiri Kosina wrote: > This series is a followup to my proposal I brought up on Kernel Summit in > Seoul. Noone seemed to had any principal objections, so let's have wider > audience look into it. > > In a nuthsell: freezing of kernel threads is horrible interface with >

[PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Jiri Kosina
This series is a followup to my proposal I brought up on Kernel Summit in Seoul. Noone seemed to had any principal objections, so let's have wider audience look into it. In a nuthsell: freezing of kernel threads is horrible interface with unclear semantics and guarantees, and I am surprised it

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Jiri Kosina
On Fri, 30 Oct 2015, Alan Stern wrote: > > > > I would say instead "no I/O is allowed from now on". Maybe that's an > > > > overstatement, but I think it comes closer to the truth. > > > > But that's what PM callbacks are for. > > Why are PM callbacks any more suitable than the freezer?

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Alan Stern
On Fri, 30 Oct 2015, Jiri Kosina wrote: > On Fri, 30 Oct 2015, Pavel Machek wrote: > > > > I would say instead "no I/O is allowed from now on". Maybe that's an > > > overstatement, but I think it comes closer to the truth. > > But that's what PM callbacks are for. Why are PM callbacks any

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Rafael J. Wysocki
On Friday, October 30, 2015 10:17:54 PM Jiri Kosina wrote: > On Fri, 30 Oct 2015, Alan Stern wrote: > > > > > > I would say instead "no I/O is allowed from now on". Maybe that's an > > > > > overstatement, but I think it comes closer to the truth. > > > > > > But that's what PM callbacks are

[PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Jiri Kosina
This series is a followup to my proposal I brought up on Kernel Summit in Seoul. Noone seemed to had any principal objections, so let's have wider audience look into it. In a nuthsell: freezing of kernel threads is horrible interface with unclear semantics and guarantees, and I am surprised it

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Alan Stern
On Fri, 30 Oct 2015, Jiri Kosina wrote: > This series is a followup to my proposal I brought up on Kernel Summit in > Seoul. Noone seemed to had any principal objections, so let's have wider > audience look into it. > > In a nuthsell: freezing of kernel threads is horrible interface with >

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Pavel Machek
On Fri 2015-10-30 11:29:08, Alan Stern wrote: > On Fri, 30 Oct 2015, Jiri Kosina wrote: > > > This series is a followup to my proposal I brought up on Kernel Summit in > > Seoul. Noone seemed to had any principal objections, so let's have wider > > audience look into it. > > > > In a nuthsell:

Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer

2015-10-30 Thread Jiri Kosina
On Fri, 30 Oct 2015, Pavel Machek wrote: > > I would say instead "no I/O is allowed from now on". Maybe that's an > > overstatement, but I think it comes closer to the truth. But that's what PM callbacks are for. > Exactly. And I'm pretty sure hardware drivers do use kernel threads, > and do