mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: anish singh <anish198519851985@gmail.com>
Cc: "Shailaja Neelam" <neelamshaila@gmail.com>,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	james.hogan@imgtec.com,
	linux-kernel-mail <linux-kernel@vger.kernel.org>,
	"Ingo Molnar" <mingo@kernel.org>
Subject: Re: [PATCH] fix a Sparse warning in the arch/x86/kernel/irq_work.c file
Date: Tue, 13 Aug 2013 07:33:57 -0400	[thread overview]
Message-ID: <20130813073357.3099e8d4@gandalf.local.home> (raw)
In-Reply-To: <CAK7N6vp0jw+fxYHF-i-BrCCKGND5vGqvn-A7oX=+iZnTJ=w9Ww@mail.gmail.com>

On Tue, 13 Aug 2013 11:09:34 +0530
anish singh <anish198519851985@gmail.com> wrote:


> > Instead, it calls irq_work() to do the event within a normal interrupt
> > context. Some architectures have the ability to trigger an interrupt on
> 
> irq_work processes event in normal interrupt context as you said but
> why interrupt context ? Is it because of the fast processing which is
> needed? Can we use softirq as anyways we have interrupt
> disabled(functions which calls irq_work makes sure of that right?).
> Hope I am not asking something very obvious.
>

We just need to make sure the work gets done outside of problem areas.
Usually, outside of locks, and specifically locks that disable
interrupts. Now, if irq_work() is needed outside of a lock that
only disables softirq, then you are correct, this would not be enough.
But really, because it's called "irq_work()" and not "softirq_work()",
you shouldn't be using locks that don't disable interrupts with a
irq_work handler.

Making it happen in softirq will just complicate the process. Real
interrupts are just easier to implement and suits the job well.

-- Steve

  reply	other threads:[~2013-08-13 11:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12 22:18 Shailaja Neelam
2013-08-13  0:29 ` Steven Rostedt
2013-08-13  5:39   ` anish singh
2013-08-13 11:33     ` Steven Rostedt [this message]
2013-08-13  9:37   ` Borislav Petkov

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=20130813073357.3099e8d4@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=anish198519851985@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=neelamshaila@gmail.com \
    /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

all inboxes | Powered by JetHome®