mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Su, David W" <david.w.su@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"bigeasy@linutronix.de" <bigeasy@linutronix.de>,
	"tglx@linutronix.de" <tglx@linutronix.de>
Subject: Re: [PATCH RT] vfio-pci: Set MSI/MSI-X ISR to non-threaded
Date: Thu, 7 Dec 2017 03:52:24 -0500	[thread overview]
Message-ID: <20171207032939.4d9b150d@vmware.local.home> (raw)
In-Reply-To: <3875C02542CA2945BF761013C1F5B8E57F4CE86A@ORSMSX109.amr.corp.intel.com>

On Thu, 7 Dec 2017 01:27:03 +0000
"Su, David W" <david.w.su@intel.com> wrote:

> >And spin_lock() turns into a mutex in PREEMPT_RT, which means it can
> >sleep. You can't sleep in hard interrupt context. This will eventually
> >crash the kernel.  
> 
> Steve, thanks for your review and comment.
> 
> I can think of 2 scenarios where there is contention for the eventfd
> context lock.
> 
> One scenario is an eventfd is used to notify a VFIO application of
> 2 or more IRQs.  But in this case the application wouldn't be able to
> tell which IRQ occurred and so I think it should be considered a
> programming error of the application and not a proper usage of
> VFIO.

Remember, if there is contention, the system will CRASH! Boom, panic,
end of story. Are you blowing this off to just a programming error of
the application? I'm sure lots of root kit developers are excited about
this.

> 
> The other is a device IRQ is configured to be delivered to multiple
> CPU cores at the same time.  However, I have never seen such a
> device and cannot think of any good reason for a device to be
> designed this way.
> 
> So, IMHO it is safe to set vfio-pci ISR to non-threaded.

Please tell me that you are not arguing that it's OK to have a sleeping
mutex in a hard threaded IRQ handler because "proper programming will
prevent contention". If that is truly your argument, then I'm done
here, with a perpetual NACK on your patches.

-- Steve

> 
> >
> >And no, we are not going to convert the ctx->wqh.lock into a
> >raw_spin_lock.
> >

      reply	other threads:[~2017-12-07  8:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01  1:05 David Su
2017-12-01  2:08 ` Steven Rostedt
2017-12-07  1:27   ` Su, David W
2017-12-07  8:52     ` Steven Rostedt [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=20171207032939.4d9b150d@vmware.local.home \
    --to=rostedt@goodmis.org \
    --cc=bigeasy@linutronix.de \
    --cc=david.w.su@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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®