1 From 506b107258faad9ea2168f543fed81666caa68d2 Mon Sep 17 00:00:00 2001
2 From: Thomas Gleixner <tglx@linutronix.de>
3 Date: Wed, 7 Mar 2012 21:10:04 +0100
4 Subject: [PATCH 169/366] net: Use cpu_chill() instead of cpu_relax()
6 Retry loops on RT might loop forever when the modifying side was
7 preempted. Use cpu_chill() instead of cpu_relax() to let the system
10 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
12 net/packet/af_packet.c | 5 +++--
13 net/rds/ib_rdma.c | 3 ++-
14 2 files changed, 5 insertions(+), 3 deletions(-)
16 diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
17 index c148581..759d6ed 100644
18 --- a/net/packet/af_packet.c
19 +++ b/net/packet/af_packet.c
21 #include <linux/if_packet.h>
22 #include <linux/wireless.h>
23 #include <linux/kernel.h>
24 +#include <linux/delay.h>
25 #include <linux/kmod.h>
26 #include <linux/slab.h>
27 #include <linux/vmalloc.h>
28 @@ -694,7 +695,7 @@ static void prb_retire_rx_blk_timer_expired(unsigned long data)
29 if (BLOCK_NUM_PKTS(pbd)) {
30 while (atomic_read(&pkc->blk_fill_in_prog)) {
31 /* Waiting for skb_copy_bits to finish... */
37 @@ -956,7 +957,7 @@ static void prb_retire_current_block(struct tpacket_kbdq_core *pkc,
38 if (!(status & TP_STATUS_BLK_TMO)) {
39 while (atomic_read(&pkc->blk_fill_in_prog)) {
40 /* Waiting for skb_copy_bits to finish... */
45 prb_close_block(pkc, pbd, po, status);
46 diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c
47 index a234074..19123a9 100644
48 --- a/net/rds/ib_rdma.c
49 +++ b/net/rds/ib_rdma.c
51 #include <linux/slab.h>
52 #include <linux/rculist.h>
53 #include <linux/llist.h>
54 +#include <linux/delay.h>
58 @@ -313,7 +314,7 @@ static inline void wait_clean_list_grace(void)
59 for_each_online_cpu(cpu) {
60 flag = &per_cpu(clean_list_grace, cpu);
61 while (test_bit(CLEAN_LIST_BUSY_BIT, flag))