Commit eb929a9
tipc: improve poll() for group member socket
The current criteria for returning POLLOUT from a group member socket is
too simplistic. It basically returns POLLOUT as soon as the group has
external destinations, something obviously leading to a lot of spinning
during destination congestion situations. At the same time, the internal
congestion handling is unnecessarily complex.
We now change this as follows.
- We introduce an 'open' flag in struct tipc_group. This flag is used
only to help poll() get the setting of POLLOUT right, and *not* for
congeston handling as such. This means that a user can choose to
ignore an EAGAIN for a destination and go on sending messages to
other destinations in the group if he wants to.
- The flag is set to false every time we return EAGAIN on a send call.
- The flag is set to true every time any member, i.e., not necessarily
the member that caused EAGAIN, is removed from the small_win list.
- We remove the group member 'usr_pending' flag. The size of the send
window and presence in the 'small_win' list is sufficient criteria
for recognizing congestion.
This solution seems to be a reasonable compromise between 'anycast',
which is normally not waiting for POLLOUT for a specific destination,
and the other three send modes, which are.
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 232d07b commit eb929a9
3 files changed
+41
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
104 | 119 | | |
105 | 120 | | |
106 | 121 | | |
| |||
406 | 421 | | |
407 | 422 | | |
408 | 423 | | |
409 | | - | |
410 | | - | |
| 424 | + | |
| 425 | + | |
411 | 426 | | |
412 | | - | |
413 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
414 | 430 | | |
415 | 431 | | |
416 | | - | |
| 432 | + | |
| 433 | + | |
417 | 434 | | |
418 | 435 | | |
419 | 436 | | |
420 | 437 | | |
421 | | - | |
422 | | - | |
423 | 438 | | |
424 | 439 | | |
425 | 440 | | |
| |||
437 | 452 | | |
438 | 453 | | |
439 | 454 | | |
440 | | - | |
| 455 | + | |
| 456 | + | |
441 | 457 | | |
442 | | - | |
| 458 | + | |
443 | 459 | | |
444 | 460 | | |
445 | 461 | | |
| |||
754 | 770 | | |
755 | 771 | | |
756 | 772 | | |
757 | | - | |
758 | | - | |
759 | | - | |
| 773 | + | |
760 | 774 | | |
761 | 775 | | |
762 | 776 | | |
| |||
767 | 781 | | |
768 | 782 | | |
769 | 783 | | |
770 | | - | |
771 | | - | |
| 784 | + | |
772 | 785 | | |
773 | 786 | | |
774 | 787 | | |
| |||
778 | 791 | | |
779 | 792 | | |
780 | 793 | | |
781 | | - | |
782 | | - | |
783 | | - | |
| 794 | + | |
784 | 795 | | |
785 | 796 | | |
786 | 797 | | |
787 | 798 | | |
788 | 799 | | |
789 | 800 | | |
790 | | - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
791 | 804 | | |
792 | | - | |
| 805 | + | |
793 | 806 | | |
794 | 807 | | |
795 | 808 | | |
796 | 809 | | |
797 | | - | |
798 | | - | |
799 | 810 | | |
800 | 811 | | |
| 812 | + | |
801 | 813 | | |
802 | 814 | | |
803 | 815 | | |
| |||
883 | 895 | | |
884 | 896 | | |
885 | 897 | | |
886 | | - | |
887 | | - | |
888 | | - | |
| 898 | + | |
889 | 899 | | |
890 | 900 | | |
891 | 901 | | |
| |||
895 | 905 | | |
896 | 906 | | |
897 | 907 | | |
898 | | - | |
899 | | - | |
900 | 908 | | |
901 | 909 | | |
902 | 910 | | |
903 | | - | |
| 911 | + | |
904 | 912 | | |
905 | 913 | | |
906 | 914 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
75 | 75 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
718 | | - | |
| 718 | + | |
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| |||
736 | 736 | | |
737 | 737 | | |
738 | 738 | | |
739 | | - | |
740 | | - | |
741 | | - | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
| |||
0 commit comments