stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Murali Karicheri <m-karicheri2@ti.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Greg KH <gregkh@linuxfoundation.org>
Cc: <stable@vger.kernel.org>
Subject: Re: request to merge commit 3302caddf10ad50710dbb7a94ccbdb3ad5bf1412
Date: Mon, 19 Oct 2015 10:15:46 -0400	[thread overview]
Message-ID: <5624FB12.80709@ti.com> (raw)
In-Reply-To: <20151017224018.GS32532@n2100.arm.linux.org.uk>

On 10/17/2015 06:40 PM, Russell King - ARM Linux wrote:
> On Sat, Oct 17, 2015 at 02:32:57PM -0700, Greg KH wrote:
>> On Mon, Sep 21, 2015 at 06:13:01PM -0400, Murali Karicheri wrote:
>>> Hi Maintainer,
>>>
>>> The below commit fixes the Warning shown in the trace below when debug
>>> options are enabled in the kernel build. Could you please merge this to
>>> address the issue for v4.1.9?
>>>
>>> Thanks
>>> ============================================================================
>>> commit 3302caddf10ad50710dbb7a94ccbdb3ad5bf1412
>>> Author: Russell King <rmk+kernel@arm.linux.org.uk>
>>> Date:   Thu Aug 20 16:13:37 2015 +0100
>>>
>>>      ARM: entry: efficiency cleanups
>>>
>>>      Make the "fast" syscall return path fast again.  The addition of IRQ
>>>      tracing and context tracking has made this path grossly inefficient.
>>>      We can do much better if these options are enabled if we save the
>>>      syscall return code on the stack - we then don't need to save a bunch
>>>      of registers around every single callout to C code.
>>>
>>>      Acked-by: Will Deacon <will.deacon@arm.com>
>>>      Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>>> ================================================================================
>>>
>>> Warning log below which is addressed by above commit.
>>
>> How does the above git commit id, solve the warning you show here:
>
> I can't fathom this one out either this evening.  However, I know the
> old code had _some_ issue wrt syscall tracing and the IRQ state which
> this did fix as a side effect, but I don't think this IRQ trace splat
> was it.
>
> All the paths I can see should not cause this.  There are three possible
> paths to work_pending, and thus on to do_work_pending():
>
> 1. via ret_fast_syscall, which always disables interrupts and notifies
>     that they've been disabled.
> 2. via ret_slow_syscall/ret_to_user, which also does the irq disable and
>     notify thing.
> 3. ret_to_user_from_irq, which is called from the IRQ path where we're
>     certain that IRQs have been disabled and been notified as such.
>
> The last seen IRQ events show that we followed a path of ret_slow_syscall,
> where IRQs were disabled, proceeded through (possibly doing some work
> in the process) to no_work_pending, where we notified the impending
> IRQ enable.  From that point, the only way is to drop into userspace.
>
> All routes subsequently back out of userspace, with the exception of FIQs,
> notifies the IRQ tracing stuff that IRQs are disabled on re-entry to
> kernel space, which will have the effect of generating another IRQ-event.
> However, we see that the last IRQ event was the IRQ enable in
> no_work_pending.
>
> So, the mistery is how we got from no_work_pending back into do_work_pending.
>
> If we did, then that shows some other bug - one which is possibly masked
> by this change.
>
> Or, I'm missing something this evening.
>
> Murali, can you explain under what circumstances you see this warning
> please?
>
I had a kernel with most of the debug options enabled and got this. Will 
reproduce and send you the .config at the next available opportunity.

-- 
Murali Karicheri
Linux Kernel, Keystone

  reply	other threads:[~2015-10-19 14:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 22:13 request to merge commit 3302caddf10ad50710dbb7a94ccbdb3ad5bf1412 Murali Karicheri
2015-10-17 21:32 ` Greg KH
2015-10-17 22:40   ` Russell King - ARM Linux
2015-10-19 14:15     ` Murali Karicheri [this message]
2015-10-19 16:19     ` Murali Karicheri
2015-10-19 17:06       ` Russell King - ARM Linux

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=5624FB12.80709@ti.com \
    --to=m-karicheri2@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux@arm.linux.org.uk \
    --cc=stable@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 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).