lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200906031116.05114.rjw@sisk.pl>
Date:	Wed, 3 Jun 2009 11:16:04 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Johannes Berg <johannes@...solutions.net>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Kernel Testers List <kernel-testers@...r.kernel.org>
Subject: Re: [Bug #13306] hibernate slow on _second_ run

On Wednesday 03 June 2009, Johannes Berg wrote:
> On Mon, 2009-06-01 at 22:48 +0200, Rafael J. Wysocki wrote:
> > > No, it's now hanging 20 seconds much later, after returning to
> > > userspace :( But the dmesg log still has a hang of ~20.5 seconds just
> > > like before, between two kernel messages...
> > 
> > Hmm.  Can you try to comment out suspend_device_irqs() and resume_device_irqs()
> > in drivers/base/power/main.c and see what happens?
> 
> Oddly, that does seem to help. I'm sure it can't be a solution though :)

Not really. ;-)

Still, something like the (untested) patch below can be.  Can you please give
it a try?

Rafael

---
 kernel/irq/manage.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Index: linux-2.6/kernel/irq/manage.c
===================================================================
--- linux-2.6.orig/kernel/irq/manage.c
+++ linux-2.6/kernel/irq/manage.c
@@ -187,9 +187,9 @@ static inline int setup_affinity(unsigne
 void __disable_irq(struct irq_desc *desc, unsigned int irq, bool suspend)
 {
 	if (suspend) {
-		if (!desc->action || (desc->action->flags & IRQF_TIMER))
-			return;
-		desc->status |= IRQ_SUSPENDED;
+		if (desc->action && !(desc->action->flags & IRQF_TIMER))
+			desc->status |= IRQ_SUSPENDED | IRQ_DISABLED;
+		return;
 	}
 
 	if (!desc->depth++) {
@@ -250,8 +250,12 @@ EXPORT_SYMBOL(disable_irq);
 
 void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume)
 {
-	if (resume)
+	if (resume) {
 		desc->status &= ~IRQ_SUSPENDED;
+		if (!desc->depth)
+			desc->status &= ~IRQ_DISABLED;
+		return;
+	}
 
 	switch (desc->depth) {
 	case 0:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ