cxacru: Poll for device status more frequently.
Subsystems (3)
PATCH 2/3 cxacru: Poll for device status more frequently.
The device is only polled for status every 5 seconds yet status updates occur as often as every second - when the line is down the status changes between "down" and "attempting to activate" every 2 seconds.
--- drivers/usb/atm/cxacru.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/atm/cxacru.c +1 -1
@@ -64,7 +64,7 @@ #define BR_STACK_ADDR 0x00187f10#define SDRAM_ENA 0x1#define CMD_TIMEOUT 2000/* msecs */ -#define POLL_INTERVAL 5000/* msecs */ +#define POLL_INTERVAL 500/* msecs */ /* commands for interaction with the modem through the control channel before * firmware is loaded */
Signature · 5 lines
1.4.3.1 -- Simon Arlott (subscribed to lkml, don't CC)
Quoted 3 lines
The device is only polled for status every 5 seconds yet status updates occur as often as every second - when the line is down the status changes between "down" and "attempting to activate" every 2 seconds.
How much overhead does polling involve? [A particularly problematic case is when polling is failing - I've occasionally seen speedtouch modems where polling fails every time (not sure why) and for some reason this increases system load considerably, which is why the speedtch driver has a dynamic polling interval]. If polling overhead is basically nothing, then this change is OK with me. Otherwise the next simplest thing to do is to have a short polling interval when the line is down, and a longer one when the line is up.
Ciao,
Duncan.
Quoted 2 lines
I've had it polling every 200ms on a dual ppro200 since november, and it has never failed to poll the status.
Great, that's certainly better than the speedtouch ;) I can't help feeling that polling twice a second is overkill. How about changing it to poll every 5 seconds if the line is up, and ten times as fast (as in this patch) if the line is down? Also, what is the point of polling fast? Does it matter if you miss some down-try_to_activate transitions?
Best wishes,
Duncan.
Quoted 4 lines · Duncan Sands
Quoted 3 lines
The device is only polled for status every 5 seconds yet status updates occur as often as every second - when the line is down the status changes between "down" and "attempting to activate" every 2 seconds.
Quoted 9 lines
How much overhead does polling involve? [A particularly problematic case is when polling is failing - I've occasionally seen speedtouch modems where polling fails every time (not sure why) and for some reason this increases system load considerably, which is why the speedtch driver has a dynamic polling interval]. If polling overhead is basically nothing, then this change is OK with me. Otherwise the next simplest thing to do is to have a short polling interval when the line is down, and a longer one when the line is up.
I've had it polling every 200ms on a dual ppro200 since november, and it has never failed to poll the status.
Quoted 3 lines
Ciao,
Duncan.
Signature · 1 line
Simon Arlott
Quoted 9 lines · Duncan Sands
Quoted 2 lines
I've had it polling every 200ms on a dual ppro200 since november, and it has never failed to poll the status.
Great, that's certainly better than the speedtouch ;) I can't help feeling that polling twice a second is overkill. How about changing it to poll every 5 seconds if the line is up, and ten times as fast (as in this patch) if the line is down? Also, what is the point of polling fast? Does it matter if you miss some down-try_to_activate transitions?
It needs to be at most 2 seconds while down or it's going to miss some of the state changes, why bother to output all the types of state if you're going to ignore some of them?
As for while it's up, polling more often has a negligible effect on performance (still polling every 200ms here). If you change the timing for different states, you should know that it won't go into the down state on a retrain so ~up should enable faster polling.
Signature · 1 line
Simon Arlott