public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* swsusp not able to stop tasks
@ 2005-11-02 13:22 Pierre Ossman
  2005-11-02 13:38 ` Pavel Machek
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Ossman @ 2005-11-02 13:22 UTC (permalink / raw)
  To: Pavel Machek, LKML

I'm having problem with swsusp in the recent kernels (somewhere around 
the late 2.6.14 rc:s). It says it cannot suspend all tasks:

[ 7221.993472] ehci_hcd 0000:00:1d.7: remove, state 1
[ 7221.993656] usb usb1: USB disconnect, address 1
[ 7222.043455] ehci_hcd 0000:00:1d.7: USB bus 1 deregistered
[ 7222.057147] ACPI: PCI interrupt for device 0000:00:1d.7 disabled
[ 7222.118871] uhci_hcd 0000:00:1d.2: remove, state 1
[ 7222.119060] usb usb4: USB disconnect, address 1
[ 7222.120849] uhci_hcd 0000:00:1d.2: USB bus 4 deregistered
[ 7222.121875] ACPI: PCI interrupt for device 0000:00:1d.2 disabled
[ 7222.122053] uhci_hcd 0000:00:1d.1: remove, state 1
[ 7222.122197] usb usb3: USB disconnect, address 1
[ 7222.177656] uhci_hcd 0000:00:1d.1: USB bus 3 deregistered
[ 7222.193209] ACPI: PCI interrupt for device 0000:00:1d.1 disabled
[ 7222.193397] uhci_hcd 0000:00:1d.0: remove, state 1
[ 7222.193494] usb usb2: USB disconnect, address 1
[ 7222.238614] uhci_hcd 0000:00:1d.0: USB bus 2 deregistered
[ 7222.252926] ACPI: PCI interrupt for device 0000:00:1d.0 disabled
[ 7222.858099] PM: suspend-to-disk mode set to 'platform'
[ 7223.525225] Stopping tasks: 
=======================================================================================================================================
[ 7229.532506]  stopping tasks failed (1 tasks remaining)
[ 7229.532529] Restarting tasks...<6> Strange, kauditd not stopped
[ 5422.163830]  done
[ 2711.145009] ACPI: PCI Interrupt 0000:00:1d.7[D] -> Link [C0C9] -> GSI 
5 (level, low) -> IRQ 5
[ 2711.145149] PCI: Setting latency timer of device 0000:00:1d.7 to 64
[ 2711.145183] ehci_hcd 0000:00:1d.7: EHCI Host Controller
[ 2711.145228] ehci_hcd 0000:00:1d.7: debug port 1
[ 2711.148734] ehci_hcd 0000:00:1d.7: new USB bus registered, assigned 
bus number 1
[ 2711.148873] ehci_hcd 0000:00:1d.7: irq 5, io mem 0xa0000000
[ 2711.148923] PCI: cache line size of 32 is not supported by device 
0000:00:1d.7
[ 2711.152855] ehci_hcd 0000:00:1d.7: USB 2.0 initialized, EHCI 1.00, 
driver 10 Dec 2004
[ 2711.155516] hub 1-0:1.0: USB hub found
[ 2711.155610] hub 1-0:1.0: 6 ports detected
[ 2711.520868] USB Universal Host Controller Interface driver v2.3
[ 2711.522329] ACPI: PCI Interrupt 0000:00:1d.0[A] -> Link [C0C2] -> GSI 
10 (level, low) -> IRQ 10
[ 2711.522436] PCI: Setting latency timer of device 0000:00:1d.0 to 64
[ 2711.522469] uhci_hcd 0000:00:1d.0: UHCI Host Controller
[ 2711.523737] uhci_hcd 0000:00:1d.0: new USB bus registered, assigned 
bus number 2
[ 2711.523821] uhci_hcd 0000:00:1d.0: irq 10, io base 0x000048c0
[ 2711.526128] hub 2-0:1.0: USB hub found
[ 2711.526214] hub 2-0:1.0: 2 ports detected
[ 2711.631308] ACPI: PCI Interrupt 0000:00:1d.1[B] -> Link [C0C5] -> GSI 
5 (level, low) -> IRQ 5
[ 2711.631438] PCI: Setting latency timer of device 0000:00:1d.1 to 64
[ 2711.631471] uhci_hcd 0000:00:1d.1: UHCI Host Controller
[ 2711.632744] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned 
bus number 3
[ 2711.632826] uhci_hcd 0000:00:1d.1: irq 5, io base 0x000048e0
[ 2711.635127] hub 3-0:1.0: USB hub found
[ 2711.635211] hub 3-0:1.0: 2 ports detected
[ 2711.739199] ACPI: PCI Interrupt 0000:00:1d.2[C] -> Link [C0C4] -> GSI 
5 (level, low) -> IRQ 5
[ 2711.739337] PCI: Setting latency timer of device 0000:00:1d.2 to 64
[ 2711.739371] uhci_hcd 0000:00:1d.2: UHCI Host Controller
[ 2711.740700] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned 
bus number 4
[ 2711.740789] uhci_hcd 0000:00:1d.2: irq 5, io base 0x00004c00
[ 2711.743189] hub 4-0:1.0: USB hub found
[ 2711.743280] hub 4-0:1.0: 2 ports detected
[ 2711.870191] ACPI: Power Button (FF) [PWRF]
[ 2711.870350] ACPI: Power Button (CM) [C1BE]
[ 2711.870393] ACPI: Lid Switch [C136]

The TSC counter is behaving very strangely aswell, as you can see, so it 
seems to be doing something low-level.

Some late addition (post 2.6.14) also makes my keyboard crap out after 
one of these cycles. Not sure it the TSC funkiness was present before this.

Any ideas or is it time to start bisecting?

Rgds
Pierre

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: swsusp not able to stop tasks
  2005-11-02 13:22 swsusp not able to stop tasks Pierre Ossman
@ 2005-11-02 13:38 ` Pavel Machek
  2005-11-02 15:29   ` Pierre Ossman
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Machek @ 2005-11-02 13:38 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: LKML

Hi!

> I'm having problem with swsusp in the recent kernels (somewhere around 
> the late 2.6.14 rc:s). It says it cannot suspend all tasks:

> [ 7223.525225] Stopping tasks: 
> =======================================================================================================================================
> [ 7229.532506]  stopping tasks failed (1 tasks remaining)
> [ 7229.532529] Restarting tasks...<6> Strange, kauditd not stopped

What is this kauditd? Try turning auditing off in kernel config, and
it should go away. If it does, add try_to_freeze() at place where
sleep is possible into kauditd...

> Some late addition (post 2.6.14) also makes my keyboard crap out after 
> one of these cycles. Not sure it the TSC funkiness was present
> before this.

Is that reproducible?
								Pavel
-- 
Thanks, Sharp!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: swsusp not able to stop tasks
  2005-11-02 13:38 ` Pavel Machek
@ 2005-11-02 15:29   ` Pierre Ossman
  2005-11-02 21:03     ` Pavel Machek
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Ossman @ 2005-11-02 15:29 UTC (permalink / raw)
  To: Pavel Machek; +Cc: LKML

Pavel Machek wrote:
> Hi!
>
>   
>> I'm having problem with swsusp in the recent kernels (somewhere around 
>> the late 2.6.14 rc:s). It says it cannot suspend all tasks:
>>     
>
>   
>> [ 7223.525225] Stopping tasks: 
>> =======================================================================================================================================
>> [ 7229.532506]  stopping tasks failed (1 tasks remaining)
>> [ 7229.532529] Restarting tasks...<6> Strange, kauditd not stopped
>>     
>
> What is this kauditd? Try turning auditing off in kernel config, and
> it should go away. If it does, add try_to_freeze() at place where
> sleep is possible into kauditd...
>
>   

That it did. And the machine suspends fine with audit removed. I'll have 
a look at inserting those try_to_freeze().

>> Some late addition (post 2.6.14) also makes my keyboard crap out after 
>> one of these cycles. Not sure it the TSC funkiness was present
>> before this.
>>     
>
> Is that reproducible?
> 								Pavel
>   

Somewhat. My short test now seems to indicate that it happens about 50% 
of the time.

Rgds
Pierre

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: swsusp not able to stop tasks
  2005-11-02 15:29   ` Pierre Ossman
@ 2005-11-02 21:03     ` Pavel Machek
  2005-11-03  8:47       ` Pierre Ossman
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Machek @ 2005-11-02 21:03 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: LKML

Hi!

> >>I'm having problem with swsusp in the recent kernels (somewhere around 
> >>the late 2.6.14 rc:s). It says it cannot suspend all tasks:

> >>[ 7223.525225] Stopping tasks: 
> >>=======================================================================================================================================
> >>[ 7229.532506]  stopping tasks failed (1 tasks remaining)
> >>[ 7229.532529] Restarting tasks...<6> Strange, kauditd not stopped
> >>    
> >
> >What is this kauditd? Try turning auditing off in kernel config, and
> >it should go away. If it does, add try_to_freeze() at place where
> >sleep is possible into kauditd...
> 
> That it did. And the machine suspends fine with audit removed. I'll have 
> a look at inserting those try_to_freeze().

Good.

> >>Some late addition (post 2.6.14) also makes my keyboard crap out after 
> >>one of these cycles. Not sure it the TSC funkiness was present
> >>before this.
> >
> >Is that reproducible?
> 
> Somewhat. My short test now seems to indicate that it happens about 50% 
> of the time.

Try asking vojtech and dmitry, keyboard problems may be reason for git
bisect. But ask vojtech/dmitry first.
								Pavel
-- 
Thanks, Sharp!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: swsusp not able to stop tasks
  2005-11-02 21:03     ` Pavel Machek
@ 2005-11-03  8:47       ` Pierre Ossman
  2005-11-06 21:34         ` Pavel Machek
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Ossman @ 2005-11-03  8:47 UTC (permalink / raw)
  To: Pavel Machek; +Cc: LKML

Pavel Machek wrote:
> Hi!
>
>   
>>> What is this kauditd? Try turning auditing off in kernel config, and
>>> it should go away. If it does, add try_to_freeze() at place where
>>> sleep is possible into kauditd...
>>>       
>> That it did. And the machine suspends fine with audit removed. I'll have 
>> a look at inserting those try_to_freeze().
>>     
>
> Good.
>
>   

The following did the trick:

diff --git a/kernel/audit.c b/kernel/audit.c
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -291,8 +291,10 @@ int kauditd_thread(void *dummy)
                        set_current_state(TASK_INTERRUPTIBLE);
                        add_wait_queue(&kauditd_wait, &wait);

-                       if (!skb_queue_len(&audit_skb_queue))
+                       if (!skb_queue_len(&audit_skb_queue)) {
+                               try_to_freeze();
                                schedule();
+                       }

                        __set_current_state(TASK_RUNNING);
                        remove_wait_queue(&kauditd_wait, &wait);


Rgds
Pierre


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: swsusp not able to stop tasks
  2005-11-03  8:47       ` Pierre Ossman
@ 2005-11-06 21:34         ` Pavel Machek
  0 siblings, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2005-11-06 21:34 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: LKML

Hi!

> >>>What is this kauditd? Try turning auditing off in kernel config, and
> >>>it should go away. If it does, add try_to_freeze() at place where
> >>>sleep is possible into kauditd...
> >>>      
> >>That it did. And the machine suspends fine with audit removed. I'll have 
> >>a look at inserting those try_to_freeze().
> >>    
> >
> >Good.

> The following did the trick:

Looks good to me. I'm not sure, but whitespace looks slightly wrong to
me. Can you write changelog, sign it off, add my acked-by, and send it
to akpm?

								Pavel

> diff --git a/kernel/audit.c b/kernel/audit.c
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -291,8 +291,10 @@ int kauditd_thread(void *dummy)
>                        set_current_state(TASK_INTERRUPTIBLE);
>                        add_wait_queue(&kauditd_wait, &wait);
> 
> -                       if (!skb_queue_len(&audit_skb_queue))
> +                       if (!skb_queue_len(&audit_skb_queue)) {
> +                               try_to_freeze();
>                                schedule();
> +                       }
> 
>                        __set_current_state(TASK_RUNNING);
>                        remove_wait_queue(&kauditd_wait, &wait);

-- 
Thanks, Sharp!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-11-06 21:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-02 13:22 swsusp not able to stop tasks Pierre Ossman
2005-11-02 13:38 ` Pavel Machek
2005-11-02 15:29   ` Pierre Ossman
2005-11-02 21:03     ` Pavel Machek
2005-11-03  8:47       ` Pierre Ossman
2005-11-06 21:34         ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox