public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Clark Williams <williams@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: RT <linux-rt-users@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH] netlink workaround silly yield()
Date: Fri, 17 Apr 2009 13:20:10 -0500	[thread overview]
Message-ID: <20090417132010.0191c749@torg> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thomas,

Below is a patch we added to avoid deadlocks in certain RT JVM cases.
The original was authored by rostedt and was modified further by acme.
This version applies to 2.6.29.1-rt7.

Clark


Added test for rt_task(current) to avoid deadlock with
RT task calling sched_yield()

Author: Steven Rostedt <srostedt@redhat.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Signed-off-by: Clark Williams <williams@redhat.com>
- ---

 net/netlink/af_netlink.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 3ae3cb8..e8f2775 100644
- --- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1046,7 +1046,7 @@ int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 pid,
 		kfree_skb(info.skb2);
 
 	if (info.delivered) {
- -		if (info.congested && (allocation & __GFP_WAIT))
+		if (info.congested && (allocation & __GFP_WAIT) && !rt_task(current))
 			yield();
 		return 0;
 	}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)

iEYEARECAAYFAknoyF4ACgkQHyuj/+TTEp2goQCg02BMYUrzs1R+P6WCrAQ32epX
WFAAn2K5VXIQ9lwpcWFv8Ge6R0Lv2CC3
=bnHl
-----END PGP SIGNATURE-----

                 reply	other threads:[~2009-04-17 18:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090417132010.0191c749@torg \
    --to=williams@redhat.com \
    --cc=acme@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.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