linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: John Allen <jallen@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au
Cc: nfont@linux.vnet.ibm.com, desnesn@linux.vnet.ibm.com,
	John Allen <jallen@linux.ibm.com>
Subject: [PATCH v3 1/2] powerpc/pseries: Avoid blocking rtas polling handling multiple PRRN events
Date: Wed,  8 Aug 2018 10:29:25 -0500	[thread overview]
Message-ID: <20180808152926.28842-2-jallen@linux.ibm.com> (raw)
In-Reply-To: <20180808152926.28842-1-jallen@linux.ibm.com>

When a PRRN event is being handled and another PRRN event comes in, the
second event will block rtas polling waiting on the first to complete,
preventing any further rtas events from being handled. This can be
especially problematic in case that PRRN events are continuously being
queued in which case rtas polling gets indefinitely blocked completely.

This patch removes the blocking call to flush_work and allows the
default workqueue behavior to handle duplicate events.

Signed-off-by: John Allen <jallen@linux.ibm.com>
---
v3:
  -Scrap the mutex as it only replicates existing workqueue behavior.
v2:
  -Unlock prrn_lock when PRRN operations are complete, not after handler is
   scheduled.
  -Remove call to flush_work, the previous broken method of serializing
   PRRN events.
---
 arch/powerpc/kernel/rtasd.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c
index 44d66c33d59d..2017934e5985 100644
--- a/arch/powerpc/kernel/rtasd.c
+++ b/arch/powerpc/kernel/rtasd.c
@@ -290,7 +290,6 @@ static DECLARE_WORK(prrn_work, prrn_work_fn);
 
 static void prrn_schedule_update(u32 scope)
 {
-	flush_work(&prrn_work);
 	prrn_update_scope = scope;
 	schedule_work(&prrn_work);
 }
-- 
2.17.1

  reply	other threads:[~2018-08-08 15:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08 15:29 [PATCH v3 0/2] powerpc/pseries: Improve serialization of PRRN events John Allen
2018-08-08 15:29 ` John Allen [this message]
2018-08-10 11:53   ` [PATCH v3 1/2] powerpc/pseries: Avoid blocking rtas polling handling multiple " Michael Ellerman
2018-08-08 15:29 ` [PATCH v3 2/2] powerpc/pseries: Wait for completion of hotplug events during PRRN handling John Allen
2018-08-09 16:15   ` Nathan Fontenot
2018-08-10 11:47     ` Michael Ellerman

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=20180808152926.28842-2-jallen@linux.ibm.com \
    --to=jallen@linux.ibm.com \
    --cc=desnesn@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=nfont@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).