Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. --- a/kernel/softirq.c
  2. +++ b/kernel/softirq.c
  3. @@ -186,16 +186,26 @@
  4. * we want to handle softirqs as soon as possible, but they
  5. * should not be able to lock up the box.
  6. */
  7. -#define MAX_SOFTIRQ_RESTART 10
  8. +#define MAX_SOFTIRQ_RESTART 1
  9.  
  10. asmlinkage void __do_softirq(void)
  11. {
  12. struct softirq_action *h;
  13. __u32 pending;
  14. - int max_restart = MAX_SOFTIRQ_RESTART;
  15. int cpu;
  16.  
  17. +#ifdef CONFIG_BOARD_LIVEBOX
  18. + __u32 mask;
  19. +#else
  20. + int max_restart = MAX_SOFTIRQ_RESTART;
  21. +#endif
  22. +
  23. pending = local_softirq_pending();
  24. +
  25. +#ifdef CONFIG_BOARD_LIVEBOX
  26. + mask = ~pending;
  27. +#endif
  28. +
  29. account_system_vtime(current);
  30.  
  31. __local_bh_disable((unsigned long)__builtin_return_address(0));
  32. @@ -236,8 +246,15 @@
  33. local_irq_disable();
  34.  
  35. pending = local_softirq_pending();
  36. +#ifdef CONFIG_BOARD_LIVEBOX
  37. + if (pending & mask) {
  38. + mask &= ~pending;
  39. + goto restart;
  40. + }
  41. +#else
  42. if (pending && --max_restart)
  43. goto restart;
  44. +#endif
  45.  
  46. if (pending)
  47. wakeup_softirqd();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement