| .. | .. |
|---|
| 222 | 222 | static inline void rps_lock(struct softnet_data *sd) |
|---|
| 223 | 223 | { |
|---|
| 224 | 224 | #ifdef CONFIG_RPS |
|---|
| 225 | | - raw_spin_lock(&sd->input_pkt_queue.raw_lock); |
|---|
| 225 | + spin_lock(&sd->input_pkt_queue.lock); |
|---|
| 226 | 226 | #endif |
|---|
| 227 | 227 | } |
|---|
| 228 | 228 | |
|---|
| 229 | 229 | static inline void rps_unlock(struct softnet_data *sd) |
|---|
| 230 | 230 | { |
|---|
| 231 | 231 | #ifdef CONFIG_RPS |
|---|
| 232 | | - raw_spin_unlock(&sd->input_pkt_queue.raw_lock); |
|---|
| 232 | + spin_unlock(&sd->input_pkt_queue.lock); |
|---|
| 233 | 233 | #endif |
|---|
| 234 | 234 | } |
|---|
| 235 | 235 | |
|---|
| .. | .. |
|---|
| 3055 | 3055 | sd->output_queue_tailp = &q->next_sched; |
|---|
| 3056 | 3056 | raise_softirq_irqoff(NET_TX_SOFTIRQ); |
|---|
| 3057 | 3057 | local_irq_restore(flags); |
|---|
| 3058 | | - preempt_check_resched_rt(); |
|---|
| 3059 | 3058 | } |
|---|
| 3060 | 3059 | |
|---|
| 3061 | 3060 | void __netif_schedule(struct Qdisc *q) |
|---|
| .. | .. |
|---|
| 3118 | 3117 | __this_cpu_write(softnet_data.completion_queue, skb); |
|---|
| 3119 | 3118 | raise_softirq_irqoff(NET_TX_SOFTIRQ); |
|---|
| 3120 | 3119 | local_irq_restore(flags); |
|---|
| 3121 | | - preempt_check_resched_rt(); |
|---|
| 3122 | 3120 | } |
|---|
| 3123 | 3121 | EXPORT_SYMBOL(__dev_kfree_skb_irq); |
|---|
| 3124 | 3122 | |
|---|
| .. | .. |
|---|
| 3797 | 3795 | * This permits qdisc->running owner to get the lock more |
|---|
| 3798 | 3796 | * often and dequeue packets faster. |
|---|
| 3799 | 3797 | */ |
|---|
| 3800 | | -#ifdef CONFIG_PREEMPT_RT |
|---|
| 3801 | | - contended = true; |
|---|
| 3802 | | -#else |
|---|
| 3803 | 3798 | contended = qdisc_is_running(q); |
|---|
| 3804 | | -#endif |
|---|
| 3805 | 3799 | if (unlikely(contended)) |
|---|
| 3806 | 3800 | spin_lock(&q->busylock); |
|---|
| 3807 | 3801 | |
|---|
| .. | .. |
|---|
| 4601 | 4595 | rps_unlock(sd); |
|---|
| 4602 | 4596 | |
|---|
| 4603 | 4597 | local_irq_restore(flags); |
|---|
| 4604 | | - preempt_check_resched_rt(); |
|---|
| 4605 | 4598 | |
|---|
| 4606 | 4599 | atomic_long_inc(&skb->dev->rx_dropped); |
|---|
| 4607 | 4600 | kfree_skb(skb); |
|---|
| .. | .. |
|---|
| 4817 | 4810 | struct rps_dev_flow voidflow, *rflow = &voidflow; |
|---|
| 4818 | 4811 | int cpu; |
|---|
| 4819 | 4812 | |
|---|
| 4820 | | - migrate_disable(); |
|---|
| 4813 | + preempt_disable(); |
|---|
| 4821 | 4814 | rcu_read_lock(); |
|---|
| 4822 | 4815 | |
|---|
| 4823 | 4816 | cpu = get_rps_cpu(skb->dev, skb, &rflow); |
|---|
| .. | .. |
|---|
| 4827 | 4820 | ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail); |
|---|
| 4828 | 4821 | |
|---|
| 4829 | 4822 | rcu_read_unlock(); |
|---|
| 4830 | | - migrate_enable(); |
|---|
| 4823 | + preempt_enable(); |
|---|
| 4831 | 4824 | } else |
|---|
| 4832 | 4825 | #endif |
|---|
| 4833 | 4826 | { |
|---|
| 4834 | 4827 | unsigned int qtail; |
|---|
| 4835 | 4828 | |
|---|
| 4836 | | - ret = enqueue_to_backlog(skb, get_cpu_light(), &qtail); |
|---|
| 4837 | | - put_cpu_light(); |
|---|
| 4829 | + ret = enqueue_to_backlog(skb, get_cpu(), &qtail); |
|---|
| 4830 | + put_cpu(); |
|---|
| 4838 | 4831 | } |
|---|
| 4839 | 4832 | return ret; |
|---|
| 4840 | 4833 | } |
|---|
| .. | .. |
|---|
| 4873 | 4866 | |
|---|
| 4874 | 4867 | trace_netif_rx_ni_entry(skb); |
|---|
| 4875 | 4868 | |
|---|
| 4876 | | - local_bh_disable(); |
|---|
| 4869 | + preempt_disable(); |
|---|
| 4877 | 4870 | err = netif_rx_internal(skb); |
|---|
| 4878 | | - local_bh_enable(); |
|---|
| 4871 | + if (local_softirq_pending()) |
|---|
| 4872 | + do_softirq(); |
|---|
| 4873 | + preempt_enable(); |
|---|
| 4879 | 4874 | trace_netif_rx_ni_exit(err); |
|---|
| 4880 | 4875 | |
|---|
| 4881 | 4876 | return err; |
|---|
| .. | .. |
|---|
| 6351 | 6346 | sd->rps_ipi_list = NULL; |
|---|
| 6352 | 6347 | |
|---|
| 6353 | 6348 | local_irq_enable(); |
|---|
| 6354 | | - preempt_check_resched_rt(); |
|---|
| 6355 | 6349 | |
|---|
| 6356 | 6350 | /* Send pending IPI's to kick RPS processing on remote cpus. */ |
|---|
| 6357 | 6351 | net_rps_send_ipi(remsd); |
|---|
| 6358 | 6352 | } else |
|---|
| 6359 | 6353 | #endif |
|---|
| 6360 | 6354 | local_irq_enable(); |
|---|
| 6361 | | - preempt_check_resched_rt(); |
|---|
| 6362 | 6355 | } |
|---|
| 6363 | 6356 | |
|---|
| 6364 | 6357 | static bool sd_has_rps_ipi_waiting(struct softnet_data *sd) |
|---|
| .. | .. |
|---|
| 6436 | 6429 | local_irq_save(flags); |
|---|
| 6437 | 6430 | ____napi_schedule(this_cpu_ptr(&softnet_data), n); |
|---|
| 6438 | 6431 | local_irq_restore(flags); |
|---|
| 6439 | | - preempt_check_resched_rt(); |
|---|
| 6440 | 6432 | } |
|---|
| 6441 | 6433 | EXPORT_SYMBOL(__napi_schedule); |
|---|
| 6442 | 6434 | |
|---|
| .. | .. |
|---|
| 10978 | 10970 | |
|---|
| 10979 | 10971 | raise_softirq_irqoff(NET_TX_SOFTIRQ); |
|---|
| 10980 | 10972 | local_irq_enable(); |
|---|
| 10981 | | - preempt_check_resched_rt(); |
|---|
| 10982 | 10973 | |
|---|
| 10983 | 10974 | #ifdef CONFIG_RPS |
|---|
| 10984 | 10975 | remsd = oldsd->rps_ipi_list; |
|---|
| .. | .. |
|---|
| 10992 | 10983 | netif_rx_ni(skb); |
|---|
| 10993 | 10984 | input_queue_head_incr(oldsd); |
|---|
| 10994 | 10985 | } |
|---|
| 10995 | | - while ((skb = __skb_dequeue(&oldsd->input_pkt_queue))) { |
|---|
| 10986 | + while ((skb = skb_dequeue(&oldsd->input_pkt_queue))) { |
|---|
| 10996 | 10987 | netif_rx_ni(skb); |
|---|
| 10997 | 10988 | input_queue_head_incr(oldsd); |
|---|
| 10998 | 10989 | } |
|---|
| .. | .. |
|---|
| 11308 | 11299 | |
|---|
| 11309 | 11300 | INIT_WORK(flush, flush_backlog); |
|---|
| 11310 | 11301 | |
|---|
| 11311 | | - skb_queue_head_init_raw(&sd->input_pkt_queue); |
|---|
| 11302 | + skb_queue_head_init(&sd->input_pkt_queue); |
|---|
| 11312 | 11303 | skb_queue_head_init(&sd->process_queue); |
|---|
| 11313 | 11304 | #ifdef CONFIG_XFRM_OFFLOAD |
|---|
| 11314 | 11305 | skb_queue_head_init(&sd->xfrm_backlog); |
|---|