From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>, John Kacur <jkacur@redhat.com>,
Priyanka Jain <Priyanka.Jain@freescale.com>,
Rajan Srivastava <Rajan.Srivastava@freescale.com>
Subject: [PATCH RT 2/4] net,RT:REmove preemption disabling in netif_rx()
Date: Thu, 07 Jun 2012 11:51:50 -0400 [thread overview]
Message-ID: <20120607155221.623644092@goodmis.org> (raw)
In-Reply-To: 20120607155148.698959275@goodmis.org
[-- Attachment #1: 0002-net-RT-REmove-preemption-disabling-in-netif_rx.patch --]
[-- Type: text/plain, Size: 2090 bytes --]
From: Priyanka Jain <Priyanka.Jain@freescale.com>
1)enqueue_to_backlog() (called from netif_rx) should be
bind to a particluar CPU. This can be achieved by
disabling migration. No need to disable preemption
2)Fixes crash "BUG: scheduling while atomic: ksoftirqd"
in case of RT.
If preemption is disabled, enqueue_to_backog() is called
in atomic context. And if backlog exceeds its count,
kfree_skb() is called. But in RT, kfree_skb() might
gets scheduled out, so it expects non atomic context.
3)When CONFIG_PREEMPT_RT_FULL is not defined,
migrate_enable(), migrate_disable() maps to
preempt_enable() and preempt_disable(), so no
change in functionality in case of non-RT.
-Replace preempt_enable(), preempt_disable() with
migrate_enable(), migrate_disable() respectively
-Replace get_cpu(), put_cpu() with get_cpu_light(),
put_cpu_light() respectively
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Acked-by: Rajan Srivastava <Rajan.Srivastava@freescale.com>
Cc: <rostedt@goodmis.orgn>
Link: http://lkml.kernel.org/r/1337227511-2271-1-git-send-email-Priyanka.Jain@freescale.com
Cc: stable-rt@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
net/core/dev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 79e9903..d9f43e1 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2898,7 +2898,7 @@ int netif_rx(struct sk_buff *skb)
struct rps_dev_flow voidflow, *rflow = &voidflow;
int cpu;
- preempt_disable();
+ migrate_disable();
rcu_read_lock();
cpu = get_rps_cpu(skb->dev, skb, &rflow);
@@ -2908,13 +2908,13 @@ int netif_rx(struct sk_buff *skb)
ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail);
rcu_read_unlock();
- preempt_enable();
+ migrate_enable();
}
#else
{
unsigned int qtail;
- ret = enqueue_to_backlog(skb, get_cpu(), &qtail);
- put_cpu();
+ ret = enqueue_to_backlog(skb, get_cpu_light(), &qtail);
+ put_cpu_light();
}
#endif
return ret;
--
1.7.10
next prev parent reply other threads:[~2012-06-07 15:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 15:51 [PATCH RT 0/4] [ANNOUNCE] 3.0.33-rt54-rc1 Steven Rostedt
2012-06-07 15:51 ` [PATCH RT 1/4] scsi: qla2xxx: Use local_irq_save_nort() in qla2x00_poll Steven Rostedt
2012-06-07 15:51 ` Steven Rostedt [this message]
2012-06-07 15:51 ` [PATCH RT 3/4] mips-remove-smp-reserve-lock.patch Steven Rostedt
2012-06-07 17:50 ` David Daney
2012-06-07 18:56 ` Steven Rostedt
2012-06-07 19:08 ` David Daney
2012-06-07 19:32 ` Steven Rostedt
2012-06-07 19:47 ` David Daney
2012-06-07 15:51 ` [PATCH RT 4/4] Linux 3.0.33-rt54-rc1 Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2012-06-07 15:42 [PATCH RT 0/4] [ANNOUNCE] 3.2.19-rt31-rc1 Steven Rostedt
2012-06-07 15:42 ` [PATCH RT 2/4] net,RT:REmove preemption disabling in netif_rx() Steven Rostedt
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=20120607155221.623644092@goodmis.org \
--to=rostedt@goodmis.org \
--cc=C.Emde@osadl.org \
--cc=Priyanka.Jain@freescale.com \
--cc=Rajan.Srivastava@freescale.com \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@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;
as well as URLs for NNTP newsgroup(s).