* swsusp: fix suspending with mysqld
@ 2004-10-04 12:24 Pavel Machek
2004-10-04 19:09 ` Jan De Luyck
2004-10-04 22:04 ` Andrew Morton
0 siblings, 2 replies; 5+ messages in thread
From: Pavel Machek @ 2004-10-04 12:24 UTC (permalink / raw)
To: lkml, kernel list, Andrew Morton
Hi!
mysqld does signal calls in pretty tight loop, and swsusp is not able
to stop processes in such case. This should fix it. Please apply,
Pavel
Index: linux/kernel/signal.c
===================================================================
--- linux.orig/kernel/signal.c 2004-10-01 12:24:26.000000000 +0200
+++ linux/kernel/signal.c 2004-10-01 01:00:26.000000000 +0200
@@ -1483,8 +1483,7 @@
unsigned long flags;
struct sighand_struct *psig;
- if (sig == -1)
- BUG();
+ BUG_ON(sig == -1);
/* do_notify_parent_cldstop should have been called instead. */
BUG_ON(tsk->state & (TASK_STOPPED|TASK_TRACED));
@@ -2260,6 +2259,8 @@
ret = -EINTR;
}
+ if (current->flags & PF_FREEZE)
+ refrigerator(1);
return ret;
}
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: swsusp: fix suspending with mysqld
2004-10-04 12:24 swsusp: fix suspending with mysqld Pavel Machek
@ 2004-10-04 19:09 ` Jan De Luyck
2004-10-04 22:26 ` Pavel Machek
2004-10-04 22:04 ` Andrew Morton
1 sibling, 1 reply; 5+ messages in thread
From: Jan De Luyck @ 2004-10-04 19:09 UTC (permalink / raw)
To: Pavel Machek, linux-kernel
On Monday 04 October 2004 14:24, Pavel Machek wrote:
> Hi!
>
> mysqld does signal calls in pretty tight loop, and swsusp is not able
> to stop processes in such case. This should fix it. Please apply,
> Pavel
Pavel,
I applied your patch to 2.6.9-rc3. Unfortunately, now the system doesn't suspend anymore, it comes back almost immediately:
Stopping tasks: ====================================================|
Freeing memory: ...................................|
radeonfb: suspending to state: 3...
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 0x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 0x mode
PCI: Setting latency timer of device 0000:00:1d.0 to 64
PCI: Setting latency timer of device 0000:00:1d.0 to 64
PCI: Setting latency timer of device 0000:00:1d.1 to 64
PCI: Setting latency timer of device 0000:00:1d.1 to 64
PCI: Setting latency timer of device 0000:00:1d.2 to 64
PCI: Setting latency timer of device 0000:00:1d.2 to 64
PCI: Setting latency timer of device 0000:00:1d.7 to 64
ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 10 (level, low) -> IRQ 10
ACPI: PCI interrupt 0000:00:1f.5[B] -> GSI 10 (level, low) -> IRQ 10
PCI: Setting latency timer of device 0000:00:1f.5 to 64
ACPI: PCI interrupt 0000:00:1f.6[B] -> GSI 10 (level, low) -> IRQ 10
PCI: Setting latency timer of device 0000:00:1f.6 to 64
radeonfb: resumed !
Restarting tasks... done
The system never reaches suspend.
Jan
--
BOFH excuse #323:
Your processor has processed too many instructions. Turn it off immediately, do not type any commands!!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: swsusp: fix suspending with mysqld
2004-10-04 19:09 ` Jan De Luyck
@ 2004-10-04 22:26 ` Pavel Machek
2004-10-05 14:46 ` Jan De Luyck
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Machek @ 2004-10-04 22:26 UTC (permalink / raw)
To: Jan De Luyck; +Cc: linux-kernel
Hi!
> > mysqld does signal calls in pretty tight loop, and swsusp is not able
> > to stop processes in such case. This should fix it. Please apply,
>
> I applied your patch to 2.6.9-rc3. Unfortunately, now the system doesn't suspend anymore, it comes back almost immediately:
>
And it did work before that patch? I fail to see how this patch could have
broken anything.
Pavel
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: swsusp: fix suspending with mysqld
2004-10-04 22:26 ` Pavel Machek
@ 2004-10-05 14:46 ` Jan De Luyck
0 siblings, 0 replies; 5+ messages in thread
From: Jan De Luyck @ 2004-10-05 14:46 UTC (permalink / raw)
To: Pavel Machek; +Cc: linux-kernel
On Tuesday 05 October 2004 00:26, Pavel Machek wrote:
> Hi!
>
> > > mysqld does signal calls in pretty tight loop, and swsusp is not able
> > > to stop processes in such case. This should fix it. Please apply,
> >
> > I applied your patch to 2.6.9-rc3. Unfortunately, now the system doesn't
> > suspend anymore, it comes back almost immediately:
>
> And it did work before that patch? I fail to see how this patch could have
> broken anything.
Suspending worked (besides mysql, which I had to kill manually). With this
patch it doesn't.
Jan
--
BOFH excuse #418:
Sysadmins busy fighting SPAM.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: swsusp: fix suspending with mysqld
2004-10-04 12:24 swsusp: fix suspending with mysqld Pavel Machek
2004-10-04 19:09 ` Jan De Luyck
@ 2004-10-04 22:04 ` Andrew Morton
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2004-10-04 22:04 UTC (permalink / raw)
To: Pavel Machek; +Cc: lkml, linux-kernel, akpm
Pavel Machek <pavel@ucw.cz> wrote:
>
> mysqld does signal calls in pretty tight loop, and swsusp is not able
> to stop processes in such case. This should fix it. Please apply,
>
> ...
> @@ -2260,6 +2259,8 @@
> ret = -EINTR;
> }
>
> + if (current->flags & PF_FREEZE)
> + refrigerator(1);
> return ret;
> }
This seems hacky, and arbitrary. I mean, why add this in
sys_rt_sigtimedwait()? Because that is the syscall which mysql appears to
use? What if a different application were to be using a different syscall?
Do we add a refrigerator() call there too?
Or am I missing something?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-05 14:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-04 12:24 swsusp: fix suspending with mysqld Pavel Machek
2004-10-04 19:09 ` Jan De Luyck
2004-10-04 22:26 ` Pavel Machek
2004-10-05 14:46 ` Jan De Luyck
2004-10-04 22:04 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox