linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jason77.wang@gmail.com (Hui Wang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: SMP: use per cpu state to replace
Date: Tue, 22 May 2012 10:16:34 +0800	[thread overview]
Message-ID: <4FBAF702.8020900@gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1205211524040.3231@ionos>

Thanks for review and glad to know this will be fixed from the root cause.

Hi Russell,

What about my first patch, the tasklist_lock is not easy changed to the 
raw lock in the RT kernel since this lock is used by various subsystems, 
and change this lock to raw lock will affect RT performance.

Regards,
Hui.

Thomas Gleixner wrote:
> On Mon, 21 May 2012, Russell King - ARM Linux wrote:
>
>   
>> On Mon, May 21, 2012 at 05:45:31PM +0800, Hui Wang wrote:
>>     
>>> CPU hotplug will bring following call trace in the RT kernel:
>>> BUG: sleeping function called from invalid context at linux/kernel/rtmutex.c:707
>>> pcnt: 1 0 in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper
>>> [<800413a0>] (unwind_backtrace+0x0/0xe4) from [<804ff214>] (rt_spin_lock+0x30/0x5c)
>>> [<804ff214>] (rt_spin_lock+0x30/0x5c) from [<8005a848>] (complete+0x1c/0x54)
>>> [<8005a848>] (complete+0x1c/0x54) from [<804f59f8>] (cpu_die+0x34/0x70)
>>> [<804f59f8>] (cpu_die+0x34/0x70) from [<8003b840>] (cpu_idle+0x54/0xd8)
>>> [<8003b840>] (cpu_idle+0x54/0xd8) from [<104f9ecc>] (0x104f9ecc)
>>>
>>> To avoid this call trace, we use per cpu variable to replace
>>> completion, and it is safe for this modification since all reference
>>> of per cpu_state variable is in the preempt disabled context.
>>>       
>> This is silly.  Why is RT preventing things that work perfectly well in
>> the standard kernel from being used in the RT kernel?
>>     
>
> The silliness is in some of the users of waitqueues. waitqueues are
> protected by a spinlock, which we cannot convert to a raw spinlock on
> rt because some of the wq users run insane callbacks from the wakeup
> context with interrupts disabled.....
>  
>   
>> Being able to call complete() from atomic contexts is one of the
>> fundamentals that RT seems to be breaking here.
>>     
>
> Yeah, I have a simpler waitqueue variant (no callbacks) which I want
> to use for completions.
>
> Thanks,
>
> 	tglx
>
>   

      reply	other threads:[~2012-05-22  2:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21  9:45 [PATCH 0/2] ARM: SMP: Fix cpu hotplug problems Hui Wang
2012-05-21  9:45 ` [PATCH 1/2] ARM: SMP: move mm_cpumask clearing to the __cpu_die() Hui Wang
2012-05-21  9:45   ` [PATCH 2/2] ARM: SMP: use per cpu state to replace Hui Wang
2012-05-21 12:33     ` Russell King - ARM Linux
2012-05-21 13:26       ` Thomas Gleixner
2012-05-22  2:16         ` Hui Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FBAF702.8020900@gmail.com \
    --to=jason77.wang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).