Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-08 Thread Gautham R Shenoy
On Mon, Apr 02, 2007 at 10:51:27PM +0200, Pavel Machek wrote: > > > > > > Should we create CONFIG_FREEZER? > > > > Why do you think so? I think the freezer should be compiled automatically > > if any of the above is set, which is what this directive really means. > > Kconfig can do that.

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-08 Thread Gautham R Shenoy
On Mon, Apr 02, 2007 at 10:51:27PM +0200, Pavel Machek wrote: Should we create CONFIG_FREEZER? Why do you think so? I think the freezer should be compiled automatically if any of the above is set, which is what this directive really means. Kconfig can do that. (select statement).

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-07 Thread Nigel Cunningham
Hi. On Sat, 2007-04-07 at 11:33 +0200, Rafael J. Wysocki wrote: > On Saturday, 7 April 2007 00:20, Nigel Cunningham wrote: > > > > > > > - current->flags |= PF_NOFREEZE; > > > > > > > + freezer_exempt(FE_ALL); > > > > > > > pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); > > > > > > >

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-07 Thread Rafael J. Wysocki
On Saturday, 7 April 2007 00:20, Nigel Cunningham wrote: > Hi. > > On Fri, 2007-04-06 at 16:34 +0200, Rafael J. Wysocki wrote: > > On Monday, 2 April 2007 22:51, Pavel Machek wrote: > > > Hi! > > > > > > > > > +/* Per process freezer specific flags */ > > > > > > +#define PF_FE_SUSPEND

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-07 Thread Rafael J. Wysocki
On Saturday, 7 April 2007 00:20, Nigel Cunningham wrote: Hi. On Fri, 2007-04-06 at 16:34 +0200, Rafael J. Wysocki wrote: On Monday, 2 April 2007 22:51, Pavel Machek wrote: Hi! +/* Per process freezer specific flags */ +#define PF_FE_SUSPEND 0x8000 /* This

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-07 Thread Nigel Cunningham
Hi. On Sat, 2007-04-07 at 11:33 +0200, Rafael J. Wysocki wrote: On Saturday, 7 April 2007 00:20, Nigel Cunningham wrote: - current-flags |= PF_NOFREEZE; + freezer_exempt(FE_ALL); pid = kernel_thread(do_linuxrc, /linuxrc, SIGCHLD); if (pid 0) {

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-06 Thread Nigel Cunningham
Hi. On Fri, 2007-04-06 at 16:34 +0200, Rafael J. Wysocki wrote: > On Monday, 2 April 2007 22:51, Pavel Machek wrote: > > Hi! > > > > > > > +/* Per process freezer specific flags */ > > > > > +#define PF_FE_SUSPEND0x8000 /* This thread should > > > > > not be frozen > > > > > +

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-06 Thread Rafael J. Wysocki
On Monday, 2 April 2007 22:51, Pavel Machek wrote: > Hi! > > > > > +/* Per process freezer specific flags */ > > > > +#define PF_FE_SUSPEND 0x8000 /* This thread should not be > > > > frozen > > > > +* for suspend > > > > +

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-06 Thread Pavel Machek
Hi! > > > +/* Per process freezer specific flags */ > > > +#define PF_FE_SUSPEND0x8000 /* This thread should not be > > > frozen > > > + * for suspend > > > + */ > > > + > > > +#define PF_FE_KPROBES0x0010

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-06 Thread Pavel Machek
Hi! +/* Per process freezer specific flags */ +#define PF_FE_SUSPEND0x8000 /* This thread should not be frozen + * for suspend + */ + +#define PF_FE_KPROBES0x0010 /* This thread

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-06 Thread Rafael J. Wysocki
On Monday, 2 April 2007 22:51, Pavel Machek wrote: Hi! +/* Per process freezer specific flags */ +#define PF_FE_SUSPEND 0x8000 /* This thread should not be frozen +* for suspend +*/

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-06 Thread Nigel Cunningham
Hi. On Fri, 2007-04-06 at 16:34 +0200, Rafael J. Wysocki wrote: On Monday, 2 April 2007 22:51, Pavel Machek wrote: Hi! +/* Per process freezer specific flags */ +#define PF_FE_SUSPEND0x8000 /* This thread should not be frozen +

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-05 Thread Gautham R Shenoy
On Thu, Apr 05, 2007 at 01:46:33PM +0400, Oleg Nesterov wrote: > On 04/02, Gautham R Shenoy wrote: > > > > +/* > > + * Exempt the current process from being frozen for a certain event > > + */ > > +static inline void freezer_exempt(unsigned long exempt_freeze_event) > > +{ > > + if

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-05 Thread Oleg Nesterov
On 04/05, Gautham R Shenoy wrote: > > On Thu, Apr 05, 2007 at 01:46:33PM +0400, Oleg Nesterov wrote: > > > > > --- linux-2.6.21-rc5.orig/kernel/sched.c > > > +++ linux-2.6.21-rc5/kernel/sched.c > > > @@ -5057,6 +5057,7 @@ static int migration_thread(void *data) > > > BUG_ON(rq->migration_thread

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-05 Thread Oleg Nesterov
On 04/02, Gautham R Shenoy wrote: > > +/* > + * Exempt the current process from being frozen for a certain event > + */ > +static inline void freezer_exempt(unsigned long exempt_freeze_event) > +{ > + if (exempt_freeze_event == FE_NONE) > + current->flags &= ~PF_FE_ALL; > +

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-05 Thread Oleg Nesterov
On 04/05, Gautham R Shenoy wrote: On Thu, Apr 05, 2007 at 01:46:33PM +0400, Oleg Nesterov wrote: --- linux-2.6.21-rc5.orig/kernel/sched.c +++ linux-2.6.21-rc5/kernel/sched.c @@ -5057,6 +5057,7 @@ static int migration_thread(void *data) BUG_ON(rq-migration_thread != current);

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-05 Thread Gautham R Shenoy
On Thu, Apr 05, 2007 at 01:46:33PM +0400, Oleg Nesterov wrote: On 04/02, Gautham R Shenoy wrote: +/* + * Exempt the current process from being frozen for a certain event + */ +static inline void freezer_exempt(unsigned long exempt_freeze_event) +{ + if (exempt_freeze_event ==

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-05 Thread Oleg Nesterov
On 04/02, Gautham R Shenoy wrote: +/* + * Exempt the current process from being frozen for a certain event + */ +static inline void freezer_exempt(unsigned long exempt_freeze_event) +{ + if (exempt_freeze_event == FE_NONE) + current-flags = ~PF_FE_ALL; + else +

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-03 Thread Gautham R Shenoy
On Mon, Apr 02, 2007 at 10:48:24PM +0200, Rafael J. Wysocki wrote: > On Monday, 2 April 2007 15:56, Pavel Machek wrote: > > Hi! > > > > > This patch provides an interface to extend the use of the process > > > freezer beyond Suspend. > > > > > > The tasks can selectively mark themselves to be

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-03 Thread Gautham R Shenoy
On Mon, Apr 02, 2007 at 10:48:24PM +0200, Rafael J. Wysocki wrote: On Monday, 2 April 2007 15:56, Pavel Machek wrote: Hi! This patch provides an interface to extend the use of the process freezer beyond Suspend. The tasks can selectively mark themselves to be exempted from

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-02 Thread Rafael J. Wysocki
On Monday, 2 April 2007 15:56, Pavel Machek wrote: > Hi! > > > This patch provides an interface to extend the use of the process > > freezer beyond Suspend. > > > > The tasks can selectively mark themselves to be exempted from specific > > freeze events like SUSPEND /KPROBES/CPU_HOTPLUG. > >

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-02 Thread Pavel Machek
Hi! > This patch provides an interface to extend the use of the process > freezer beyond Suspend. > > The tasks can selectively mark themselves to be exempted from specific > freeze events like SUSPEND /KPROBES/CPU_HOTPLUG. > > This patch however, *does not* sort non freezable threads into >

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-02 Thread Pavel Machek
Hi! This patch provides an interface to extend the use of the process freezer beyond Suspend. The tasks can selectively mark themselves to be exempted from specific freeze events like SUSPEND /KPROBES/CPU_HOTPLUG. This patch however, *does not* sort non freezable threads into

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-02 Thread Rafael J. Wysocki
On Monday, 2 April 2007 15:56, Pavel Machek wrote: Hi! This patch provides an interface to extend the use of the process freezer beyond Suspend. The tasks can selectively mark themselves to be exempted from specific freeze events like SUSPEND /KPROBES/CPU_HOTPLUG. This patch

[PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-01 Thread Gautham R Shenoy
This patch provides an interface to extend the use of the process freezer beyond Suspend. The tasks can selectively mark themselves to be exempted from specific freeze events like SUSPEND /KPROBES/CPU_HOTPLUG. This patch however, *does not* sort non freezable threads into different categories

[PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-01 Thread Gautham R Shenoy
This patch provides an interface to extend the use of the process freezer beyond Suspend. The tasks can selectively mark themselves to be exempted from specific freeze events like SUSPEND /KPROBES/CPU_HOTPLUG. This patch however, *does not* sort non freezable threads into different categories