Claims
- 1. A method of selecting an adapter of multiple adapters of a switch node for peeking or reading of a message, said method comprising:
employing a first filter to initially test whether a previously used adapter of the multiple adapters should be used to peek or read a next message; and if the first filter fails to select the previously used adapter, then employing a second filter to determine which adapter of the multiple adapters should be used to peek or read the next message.
- 2. The method of claim 1, wherein the first filter comprises a first test set, and wherein the second filter comprises a second test set, and wherein the second test set is more time consuming than the first test set.
- 3. The method of claim 1, wherein the first filter includes determining whether a read is pending indicative that a next message in the previously used adapter has been peeked.
- 4. The method of claim 1, wherein the first filter comprises ascertaining whether a next message is available in the previously used adapter.
- 5. The method of claim 1, wherein the first filter comprises ascertaining a switch count to determine whether the previously used adapter should be employed to peek or read the next message.
- 6. The method of claim 1, wherein the first filter comprises determining that the previously used adapter is currently operational.
- 7. The method of claim 1, wherein the first filter comprises a first test set comprising at least one of:
determining whether a read is pending indicative that the next message in the previously used adapter has been peeked at; or determining that each of the following conditions is true:
a message is available in the previously used adapter; a switch count indicates that the next message should be received from the previously used adapter; and the previously used adapter is currently operational.
- 8. The method of claim 1, wherein the first filter comprises a first test set, and wherein the first test set comprises assuming that the next message will be read from the previously used adapter unless a condition occurs indicative that the second filter is to be employed.
- 9. The method of claim 8, wherein the assuming comprises employing an adapter pointer to point to the previously used adapter unless one of the multiple conditions occurs causing the adapter pointer to be set to NULL indicative that the second filter is to be employed.
- 10. The method of claim 1, wherein the second filter comprises determining whether the previously used adapter is down, and if so, selecting another adapter of the multiple adapters from a listing of the multiple adapters, wherein the another adapter has at least one message available for peeking or reading.
- 11. The method of claim 10, wherein upon selecting another adapter for peeking or reading of the next message, the method further comprises setting a switch_count variable to a number of messages that should be read before switching to a new adapter of the multiple adapters.
- 12. The method of claim 1, wherein the first filter includes decrementing a recv_test variable whenever a message is read from the previously used adapter, and wherein the second filter further comprises calculating a new value for a switch_count variable based upon how much recv_test has been decremented, and determining whether a message_count for the previously used adapter is greater than zero and the switch_count is greater than zero, and if both are so, then setting up to peek or read from the previously used adapter.
- 13. The method of claim 12, wherein if either the message_count variable is zero or the switch_count variable is zero, then the second filter comprises selecting another adapter having an available message from a list of adapters.
- 14. The method of claim 13, wherein the second filter further comprises determining whether a next adapter is found, and if not, then determining whether the message_count for the previously used adapter is zero, and again if not, then setting up to peek or read from the previously used adapter and setting the switch_count variable to a number of messages that should be read before switching to another adapter.
- 15. The method of claim 14, wherein if an adapter is selected, the method further comprises determining whether there is an adapter that has significantly more messages available than the selected adapter, and if not, then setting up to peek or read from the selected adapter and setting the switch_count variable to a defined number of messages that should be read before switching to another adapter.
- 16. The method of claim 15, wherein if there is an adapter that has significantly more messages, the method further comprises setting up to peek or read from the selected adapter, and setting the switch_count variable to a value smaller than the defined number of messages so that the second filter will be employed again after a smaller number of message reads.
- 17. The method of claim 1, further comprising employing a recv_test variable, the recv_test variable being initialized when a switch is made to a new adapter as the lesser of a count of messages in the new adapter and a switch_count variable corresponding to a defined number of messages that should be read before switching to another adapter of the multiple adapters.
- 18. The method of claim 17, further comprising setting an adapter pointer to NULL whenever the recv_test variable becomes less than or equal to zero, indicating that the second filter is to be employed.
- 19. The method of claim 18, further comprising setting the adapter pointer to NULL when the previously used adapter goes down, and checking a read pending flag to determine whether a message has been peeked at in the previously used adapter without having been read, and if so, reading the message, resetting the read pending flag and setting recv_test to zero indicative that after a next read, the adapter pointer to the previously used adapter is to be set to NULL.
- 20. A system for selecting an adapter of multiple adapters of a switch node for peeking or reading of a message, said system comprising:
means for employing a first filter to initially test whether a previously used adapter of the multiple adapters should be used to peek or read a next message; and means for employing a second filter to determine which adapter of the multiple adapters should be used to peek or read the next message when the first filter fails to select the previously used adapter.
- 21. The system of claim 20, wherein the first filter comprises a first test set, and wherein the second filter comprises a second test set, and wherein the second test set is more time consuming than the first test set.
- 22. The system of claim 20, wherein the first filter includes means for determining whether a read is pending indicative that a next message in the previously used adapter has been peeked.
- 23. The system of claim 20, wherein the first filter comprises means for ascertaining whether a next message is available in the previously used adapter.
- 24. The system of claim 20, wherein the first filter comprises means for ascertaining a switch count to determine whether the previously used adapter should be employed to peek or read the next message.
- 25. The system of claim 20, wherein the first filter comprises means for determining that the previously used adapter is currently operational.
- 26. The system of claim 20, wherein the first filter comprises a first test set comprising at least one of:
means for determining whether a read is pending indicative that the next message in the previously used adapter has been peeked at; or means for determining that each of the following conditions is true:
a message is available in the previously used adapter; a switch count indicates that the next message should be received from the previously used adapter; and the previously used adapter is currently operational.
- 27. The system of claim 20, wherein the first filter comprises a first test set, and wherein the first test set comprises means for assuming that the next message will be read from the previously used adapter unless a condition occurs indicative that the second filter is to be employed.
- 28. The system of claim 27, wherein the means for assuming comprises means for employing an adapter pointer to point to the previously used adapter unless one of the multiple conditions occurs causing the adapter pointer to be set to NULL indicative that the second filter is to be employed.
- 29. The system of claim 20, wherein the second filter comprises means for determining whether the previously used adapter is down, and if so, for selecting another adapter of the multiple adapters from a listing of the multiple adapters, wherein the another adapter has at least one message available for peeking or reading.
- 30. The system of claim 29, wherein upon selecting another adapter for peeking or reading of the next message, the system further comprises means for setting a switch_count variable to a number of messages that should be read before switching to a new adapter of the multiple adapters.
- 31. The system of claim 20, wherein the first filter includes means for decrementing a recv_test variable whenever a message is read from the previously used adapter, and wherein the second filter further comprises means for calculating a new value for a switch_count variable based upon how much recv_test has been decremented, and for determining whether a message_count for the previously used adapter is greater than zero and the switch_count is greater than zero, and if both are so, then for setting up to peek or read from the previously used adapter.
- 32. The system of claim 31, wherein if either the message_count variable is zero or the switch_count variable is zero, then the second filter comprises means for selecting another adapter having an available message from a list of adapters.
- 33. The system of claim 32, wherein the second filter further comprises means for determining whether a next adapter is found, and if not, then means for determining whether the message_count for the previously used adapter is zero, and again if not, then means for setting up to peek or read from the previously used adapter and for setting the switch_count variable to a number of messages that should be read before switching to another adapter.
- 34. The system of claim 33, wherein if an adapter is selected, the system further comprises means for determining whether there is an adapter that has significantly more messages available than the selected adapter, and if not, then means for setting up to peek or read from the selected adapter and for setting the switch_count variable to a defined number of messages that should be read before switching to another adapter.
- 35. The system of claim 34, wherein if there is an adapter that has significantly more messages, the system further comprises means for setting up to peek or read from the selected adapter, and for setting the switch_count variable to a value smaller than the defined number of messages so that the second filter will be employed again after a smaller number of message reads.
- 36. The system of claim 20, further comprising means for employing a recv_test variable, the recv_test variable being initialized when a switch is made to a new adapter as the lesser of a count of messages in the new adapter and a switch_count variable corresponding to a defined number of messages that should be read before switching to another adapter of the multiple adapters.
- 37. The system of claim 36, further comprising means for setting an adapter pointer to NULL whenever the recv_test variable becomes less than or equal to zero, indicating that the second filter is to be employed.
- 38. The system of claim 37, further comprising means for setting the adapter pointer to NULL when the previously used adapter goes down, and for checking a read pending flag to determine whether a message has been peeked at in the previously used adapter without having been read, and if so, means for reading the message, resetting the read pending flag and setting recv_test to zero indicative that after a next read, the adapter pointer to the previously used adapter is to be set to NULL.
- 39. A system for selecting an adapter for peeking or reading of a message in a distributed computing environment, said system comprising:
a switch node of the distributed computing environment having multiple adapters, wherein the switch node is adapted to:
employ a first filter to initially test whether a previously used adapter of the multiple adapters should be used to peek or read a next message; and employ a second filter to determine which adapter of the multiple adapters should be used to peek or read the next message if the first filter fails to select the previously used adapter.
- 40. At least one program storage device readable by machine, tangibly embodying at least one program of instructions executable by the machine to perform a method of selecting an adapter of multiple adapters of a switch node for peeking or reading of a message, the method comprising:
employing a first filter to initially test whether a previously used adapter of the multiple adapters should be used to peek or read a next message; and if the first filter fails to select the previously used adapter, then employing a second filter to determine which adapter of the multiple adapters should be used to peek or read the next message.
- 41. The at least one program storage device of claim 40, wherein the first filter comprises a first test set, and wherein the second filter comprises a second test set, and wherein the second test set is more time consuming than the first test set.
- 42. The at least one program storage device of claim 40, wherein the first filter includes determining whether a read is pending indicative that a next message in the previously used adapter has been peeked.
- 43. The at least one program storage device of claim 40, wherein the first filter comprises ascertaining whether a next message is available in the previously used adapter.
- 44. The at least one program storage device of claim 40, wherein the first filter comprises ascertaining a switch count to determine whether the previously used adapter should be employed to peek or read the next message.
- 45. The at least one program storage device of claim 40, wherein the first filter comprises determining that the previously used adapter is currently operational.
- 46. The at least one program storage device of claim 40, wherein the first filter comprises a first test set comprising at least one of:
determining whether a read is pending indicative that the next message in the previously used adapter has been peeked at; or determining that each of the following conditions is true:
a message is available in the previously used adapter; a switch count indicates that the next message should be received from the previously used adapter; and the previously used adapter is currently operational.
- 47. The at least one program storage device of claim 40, wherein the first filter comprises a first test set, and wherein the first test set comprises assuming that the next message will be read from the previously used adapter unless a condition occurs indicative that the second filter is to be employed.
- 48. The at least one program storage device of claim 47, wherein the assuming comprises employing an adapter pointer to point to the previously used adapter unless one of the multiple conditions occurs causing the adapter pointer to be set to NULL indicative that the second filter is to be employed.
- 49. The at least one program storage device of claim 40, wherein the second filter comprises determining whether the previously used adapter is down, and if so, selecting another adapter of the multiple adapters from a listing of the multiple adapters, wherein the another adapter has at least one message available for peeking or reading.
- 50. The at least one program storage device of claim 49, wherein upon selecting another adapter for peeking or reading of the next message, the method further comprises setting a switch_count variable to a number of messages that should be read before switching to a new adapter of the multiple adapters.
- 51. The at least one program storage device of claim 50, wherein the first filter includes decrementing a recv_test variable whenever a message is read from the previously used adapter, and wherein the second filter further comprises calculating a new value for a switch_count variable based upon how much recv_test has been decremented, and determining whether a message_count for the previously used adapter is greater than zero and the switch_count is greater than zero, and if both are so, then setting up to peek or read from the previously used adapter.
- 52. The at least one program storage device of claim 51, wherein if either the message_count variable is zero or the switch_count variable is zero, then the second filter comprises selecting another adapter having an available message from a list of adapters.
- 53. The at least one program storage device of claim 52, wherein the second filter further comprises determining whether a next adapter is found, and if not, then determining whether the message_count for the previously used adapter is zero, and again if not, then setting up to peek or read from the previously used adapter and setting the switch_count variable to a number of messages that should be read before switching to another adapter.
- 54. The at least one program storage device of claim 53, wherein if an adapter is selected, the method further comprises determining whether there is an adapter that has significantly more messages available than the selected adapter, and if not, then setting up to peek or read from the selected adapter and setting the switch_count variable to a defined number of messages that should be read before switching to another adapter.
- 55. The at least one program storage device of claim 54, wherein if there is an adapter that has significantly more messages, the method further comprises setting up to peek or read from the selected adapter, and setting the switch_count variable to a value smaller than the defined number of messages so that the second filter will be employed again after a smaller number of message reads.
- 56. The at least one program storage device of claim 40, further comprising employing a recv_test variable, the recv_test variable being initialized when a switch is made to a new adapter as the lesser of a count of messages in the new adapter and a switch_count variable corresponding to a defined number of messages that should be read before switching to another adapter of the multiple adapters.
- 57. The at least one program storage device of claim 56, further comprising setting an adapter pointer to NULL whenever the recv_test variable becomes less than or equal to zero, indicating that the second filter is to be employed.
- 58. The at least one program storage device of claim 57, further comprising setting the adapter pointer to NULL when the previously used adapter goes down, and checking a read pending flag to determine whether a message has been peeked at in the previously used adapter without having been read, and if so, reading the message, resetting the read pending flag and setting recv_test to zero indicative that after a next read, the adapter pointer to the previously used adapter is to be set to NULL.
CROSS-REFERENCE TO RELATED APPLICATION
[0001] This application contains subject matter which is related to the subject matter of the following application, which is assigned to the same assignee as this application and filed on the same day as this application. The below-listed application is hereby incorporated herein by reference in its entirety:
[0002] “TECHNIQUE FOR CONTROLLING SELECTION OF A WRITE ADAPTER FROM MULTIPLE ADAPTERS CONNECTED TO A HIGH SPEED SWITCH”, by William S. Cadden, Ser. No. ______, (Attorney Docket No. POU920020053US1).