All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Kappen <skappen@mvista.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: schedule under irqs_disabled in SLUB problem
Date: Mon, 5 Mar 2018 14:17:29 +0530	[thread overview]
Message-ID: <CAJ9FNxtVuwtXhtPUoBQJTD=eO3dKznP9xtE2Yde4Q+p1Mr2iQQ@mail.gmail.com> (raw)
In-Reply-To: <20171212101816.ux24jdai4fftd7ro@linutronix.de>

On Tue, Dec 12, 2017 at 3:48 PM, Sebastian Andrzej Siewior
<bigeasy@linutronix.de> wrote:
> On 2017-12-05 22:01:19 [+0530], Sam Kappen wrote:
>> Hi,
> Hi,
>
>> Thanks for looking at my queries. Please see my answers inline.
> please don't top-post. Please use a client which adds proper indention
> while quoting the email.
>
>>  1.)
>> > I had derived and tried a patch based on the below analysis.
>> > ( I referred below open source commit, to derive on this patch.
>> > https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git/commit/?h=v4.9.47-rt37-rebase&id=7a347757f027190c95a363a491c18156a926a370
>> > )
>> >
>> We see this issue when there is a state change for irqs from disabled
>> to enabled. During slab allocations for SCSI on bootup
>> the irqs are found to be in disabled state since the system state is
>> not yet in "RUNNING".
>>
>> So we have added instrument code throughout the call trace and
>> confirmed culprit as pi_lock()/pi_unlock for changing the irqs state.
>> Basically it happens when it acquires the lock with irqs in disabled state.
>
> but by pi_lock/pi_unlock you don't mean the futex operation, do you?
>
> based on the fact that the system is not in state "running" yet and this
> trace here:
>> ------------[ cut here ]------------
>> WARNING: at kernel/sched/core.c:3052 migrate_disable+0x10b/0x120()
>> Modules linked in:
>> CPU: 1 PID: 7 Comm: kworker/u8:0 Not tainted 3.10.107-rt120+ #49
>> Hardware name: To be filled by O.E.M. To be filled by
> …
>> Call Trace:
> …
>>  [<ffffffff8105fcd5>] warn_slowpath_null+0x15/0x20
>>  [<ffffffff8109569c>] migrate_enable+0x14c/0x200
>>  [<ffffffff81100fb1>] get_page_from_freelist+0x9a1/0xbc0
>>  [<ffffffff81101f89>] __alloc_pages_nodemask+0x179/0xa50
>>  [<ffffffff81138ab1>] alloc_pages_current+0x101/0x1f0
>>  [<ffffffff8113cf95>] new_slab+0x265/0x310
>>  [<ffffffff816b386e>] __slab_alloc.isra.62+0x4e0/0x6ca
>>  [<ffffffff8113f5d0>] kmem_cache_alloc+0x170/0x190
>>  [<ffffffff810fbd0a>] mempool_alloc_slab+0x3a/0x70
>>  [<ffffffff810fc0be>] mempool_alloc+0xae/0x210
>>  [<ffffffff812d5ce8>] get_request+0x3a8/0x7c0
>>  [<ffffffff812d619a>] blk_get_request+0x9a/0x140
>>  [<ffffffff813ef02a>] scsi_execute+0x4a/0x170
> …
>> ---[ end trace 0000000000000001 ]---
>
> I would that this is the same issue and the patch I posted should help.
>
>> > 2.) With your patch during the slab allocations irqs will be in enabled state.
>>
>> Thanks. I have been testing your patch, I will update once I finish the long
>> run test.
>
> Okay, so a note to myself, there is nothing outstanding for me to do so
> far.
>We have tested it for nearly a month and issue is not reproducible with your patch. Many thanks.

>> Regards,
>> Sam
>
> Sebastian

  reply	other threads:[~2018-03-05  8:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CADF-jezvVP2O++FR2KiRSSSJF7oObjy8LSP3-yj1HCmxyTzB_Q@mail.gmail.com>
2017-11-02 16:50 ` schedule under irqs_disabled in SLUB problem Sebastian Andrzej Siewior
2017-11-02 20:55   ` Grygorii Strashko
     [not found]   ` <CADF-jexLs9vRuiuoRmcA+0L6Mp-XxW75okheWV+ipGf1b_Ua1w@mail.gmail.com>
2017-11-03 10:23     ` Pavel V. Panteleev
2017-11-07  9:00       ` Pavel V. Panteleev
2017-11-07  9:14       ` Pavel V. Panteleev
2017-11-07  9:47       ` Pavel V. Panteleev
2017-11-16 16:08         ` Sebastian Andrzej Siewior
2017-11-16 16:39           ` Pavel V. Panteleev
2017-11-17 17:38           ` Julia Cartwright
2017-11-24  6:39             ` Sam Kappen
2017-11-24  9:37               ` Sebastian Andrzej Siewior
2017-11-27  6:46                 ` Sam Kappen
2017-12-04  9:59                   ` Sebastian Andrzej Siewior
2017-12-05 16:31                     ` Sam Kappen
2017-12-12 10:18                       ` Sebastian Andrzej Siewior
2018-03-05  8:47                         ` Sam Kappen [this message]
2018-03-05 17:40                           ` Sebastian Andrzej Siewior
2017-11-24  9:35             ` [PATCH] mm/slub: enable IRQs once scheduling is working Sebastian Andrzej Siewior
2017-11-01 11:31 schedule under irqs_disabled in SLUB problem Pavel V. Panteleev

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='CAJ9FNxtVuwtXhtPUoBQJTD=eO3dKznP9xtE2Yde4Q+p1Mr2iQQ@mail.gmail.com' \
    --to=skappen@mvista.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-rt-users@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.