Re: which signal is sent to freeze process?

2007-07-31 Thread Pavel Machek
Hi! > >Can you generate small testcase that demonstrates the problem? > > > >> Then what would be the correct way to handle resume process. The other > >> way of course is to make all the applications check the errno in case of > >> failure. But that seems more more problematic then system call ch

RE: which signal is sent to freeze process?

2007-07-26 Thread Agarwal, Lomesh
This patch works for me too. -Original Message- From: Manfred Spraul [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 24, 2007 11:49 AM To: Pavel Machek Cc: Rafael J. Wysocki; linux-kernel@vger.kernel.org; Agarwal, Lomesh; Nigel Cunningham Subject: Re: which signal is sent to freeze process

Re: which signal is sent to freeze process?

2007-07-25 Thread Rafael J. Wysocki
On Tuesday, 24 July 2007 20:48, Manfred Spraul wrote: > > Hi! > > > > Can you generate small testcase that demonstrates the problem? > > > > > Then what would be the correct way to handle resume process. The other > > > way of course is to make all the applications check the errno in case of > > >

Re: which signal is sent to freeze process?

2007-07-25 Thread Pavel Machek
Hi! > On Thursday 19 July 2007 14:09:56 Agarwal, Lomesh wrote: > > Can you point me to code where kernel captures process in signal > > handling and code which runs after suspend to ram is finished? > > Sure. > > It's in kernel/signal.c (get_signal_to_deliver) for x86 and x86_64, and > arch//ke

Re: which signal is sent to freeze process?

2007-07-24 Thread Manfred Spraul
Hi! Can you generate small testcase that demonstrates the problem? > Then what would be the correct way to handle resume process. The other > way of course is to make all the applications check the errno in case of > failure. But that seems more more problematic then system call checking. > What

Re: which signal is sent to freeze process?

2007-07-24 Thread Pavel Machek
Hi! Can you generate small testcase that demonstrates the problem? > Then what would be the correct way to handle resume process. The other > way of course is to make all the applications check the errno in case of > failure. But that seems more more problematic then system call checking. > What

Re: which signal is sent to freeze process?

2007-07-24 Thread Rafael J. Wysocki
On Tuesday, 24 July 2007 00:18, Agarwal, Lomesh wrote: > The net effect would be same. Why would you choose one over other > (do_sys_poll vs. do_poll)? The last patch is simpler and it doesn't involve the try_to_freeze() thing. > Can you point me to code where socket read returns in case of > sig

RE: which signal is sent to freeze process?

2007-07-23 Thread Agarwal, Lomesh
, July 23, 2007 2:51 PM To: Agarwal, Lomesh Cc: [EMAIL PROTECTED]; linux-kernel@vger.kernel.org Subject: Re: which signal is sent to freeze process? On Monday, 23 July 2007 22:57, Agarwal, Lomesh wrote: > Why do you need try_to_freeze in below patch? Shouldn't > !freezing(current) checkin

Re: which signal is sent to freeze process?

2007-07-23 Thread Rafael J. Wysocki
On Monday, 23 July 2007 22:57, Agarwal, Lomesh wrote: > Why do you need try_to_freeze in below patch? Shouldn't > !freezing(current) checking is enough? The try_to_freeze() is needed so that the process doesn't block the freezing of tasks (it is supposed to call refrigerator() as soon as reasonabl

RE: which signal is sent to freeze process?

2007-07-23 Thread Agarwal, Lomesh
t: Re: which signal is sent to freeze process? On Friday, 20 July 2007 20:07, Agarwal, Lomesh wrote: > Can you suggest a way I can debug the issue why I am getting EINTR error > for system calls in resuming? What else can cause the system call > failure with EINTR? Well, I think I know what

RE: which signal is sent to freeze process?

2007-07-23 Thread Manfred Spraul
Rafael wrote: On Monday, 23 July 2007 20:38, Agarwal, Lomesh wrote: > The other problem I am facing that read from socket returns with ENODATA > when resuming. any ideas? It's of similar kind: the system call checks signal_pending(current) and exit with an error if that's true. Well, I'm afraid

Re: which signal is sent to freeze process?

2007-07-23 Thread Manfred Spraul
Rafael J. Wysocki wrote: Well, look at the code in fs/select.c:do_poll() . If signal_pending(current) is true, the main loop breaks and count is returned to do_sys_poll(). If zero is returned and signal_pending(current) is still true, do_sys_poll() returns -EINTR. Thanks - I looked at sys_

Re: which signal is sent to freeze process?

2007-07-23 Thread Rafael J. Wysocki
On Monday, 23 July 2007 21:52, Manfred Spraul wrote: > Rafael wrote: > > On Monday, 23 July 2007 20:38, Agarwal, Lomesh wrote: > > > The other problem I am facing that read from socket returns with ENODATA > > > when resuming. any ideas? > > > > It's of similar kind: the system call checks signal_p

RE: which signal is sent to freeze process?

2007-07-23 Thread Agarwal, Lomesh
signal_pending(current)? -Original Message- From: Rafael J. Wysocki [mailto:[EMAIL PROTECTED] Sent: Monday, July 23, 2007 12:25 PM To: Agarwal, Lomesh Cc: [EMAIL PROTECTED]; linux-kernel@vger.kernel.org; Pavel Machek Subject: Re: which signal is sent to freeze process? On Monday, 23 July 2007

Re: which signal is sent to freeze process?

2007-07-23 Thread Rafael J. Wysocki
]; linux-kernel@vger.kernel.org > Subject: Re: which signal is sent to freeze process? > > On Friday, 20 July 2007 20:07, Agarwal, Lomesh wrote: > > Can you suggest a way I can debug the issue why I am getting EINTR > error > > for system calls in resuming? What else can c

RE: which signal is sent to freeze process?

2007-07-23 Thread Agarwal, Lomesh
: which signal is sent to freeze process? On Friday, 20 July 2007 20:07, Agarwal, Lomesh wrote: > Can you suggest a way I can debug the issue why I am getting EINTR error > for system calls in resuming? What else can cause the system call > failure with EINTR? Well, I think I know what th

Re: which signal is sent to freeze process?

2007-07-20 Thread Rafael J. Wysocki
On Friday, 20 July 2007 20:07, Agarwal, Lomesh wrote: > Can you suggest a way I can debug the issue why I am getting EINTR error > for system calls in resuming? What else can cause the system call > failure with EINTR? Well, I think I know what the problem is. do_poll checks signal_pending(curren

RE: which signal is sent to freeze process?

2007-07-20 Thread Agarwal, Lomesh
: [EMAIL PROTECTED]; linux-kernel@vger.kernel.org Subject: Re: which signal is sent to freeze process? On Friday, 20 July 2007 01:22, Agarwal, Lomesh wrote: > I am using Linux in an embedded platform with x86. Applications don't do > anything special. The system call which is returning EI

Re: which signal is sent to freeze process?

2007-07-20 Thread Rafael J. Wysocki
ki; linux-kernel@vger.kernel.org > Subject: Re: which signal is sent to freeze process? > > Hi. > > On Friday 20 July 2007 07:06:01 Agarwal, Lomesh wrote: > > So basically I can not install a signal handler to catch freeze signal > > in the process. Right? > > Is the

RE: which signal is sent to freeze process?

2007-07-19 Thread Agarwal, Lomesh
x-kernel@vger.kernel.org Subject: Re: which signal is sent to freeze process? Hi. On Friday 20 July 2007 07:06:01 Agarwal, Lomesh wrote: > So basically I can not install a signal handler to catch freeze signal > in the process. Right? > Is there any other way to solve the problem I am facing? After res

Re: which signal is sent to freeze process?

2007-07-19 Thread Nigel Cunningham
Hi. On Friday 20 July 2007 07:06:01 Agarwal, Lomesh wrote: > So basically I can not install a signal handler to catch freeze signal > in the process. Right? > Is there any other way to solve the problem I am facing? After resume > some of the system calls are failing in some of my applications wit

Re: which signal is sent to freeze process?

2007-07-19 Thread Rafael J. Wysocki
On Thursday, 19 July 2007 06:59, Nigel Cunningham wrote: > Hi. > > On Thursday 19 July 2007 14:09:56 Agarwal, Lomesh wrote: > > Can you point me to code where kernel captures process in signal > > handling and code which runs after suspend to ram is finished? > > Sure. > > It's in kernel/signal.

Re: which signal is sent to freeze process?

2007-07-19 Thread Rafael J. Wysocki
On Thursday, 19 July 2007 23:06, Agarwal, Lomesh wrote: > So basically I can not install a signal handler to catch freeze signal > in the process. Right? > Is there any other way to solve the problem I am facing? After resume > some of the system calls are failing in some of my applications with >

RE: which signal is sent to freeze process?

2007-07-19 Thread Agarwal, Lomesh
this error all over the place and somehow retry failed system call. Any ideas? -Original Message- From: Nigel Cunningham [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 18, 2007 9:59 PM To: Agarwal, Lomesh; Rafael Wysocki Cc: linux-kernel@vger.kernel.org Subject: Re: which signal is sent to

Re: which signal is sent to freeze process?

2007-07-18 Thread Nigel Cunningham
Hi. On Thursday 19 July 2007 14:09:56 Agarwal, Lomesh wrote: > Can you point me to code where kernel captures process in signal > handling and code which runs after suspend to ram is finished? Sure. It's in kernel/signal.c (get_signal_to_deliver) for x86 and x86_64, and arch//kernel/signal.c fo

RE: which signal is sent to freeze process?

2007-07-18 Thread Agarwal, Lomesh
Subject: Re: which signal is sent to freeze process? Hi. On Thursday 19 July 2007 09:42:02 Agarwal, Lomesh wrote: > My understanding is that Linux kernel sends a signal to freeze processes > during suspend2ram operation. Which signal is used to achieve this? > The problem I am facing is

Re: which signal is sent to freeze process?

2007-07-18 Thread Nigel Cunningham
Hi. On Thursday 19 July 2007 09:42:02 Agarwal, Lomesh wrote: > My understanding is that Linux kernel sends a signal to freeze processes > during suspend2ram operation. Which signal is used to achieve this? > The problem I am facing is that some of the system calls are failing > with EINTR errno du