Re: Many COMM Serial Ports Open & Idle causes high System Process time



"rmsterling" <rmsterling@xxxxxxxxx> wrote:
>
>Subject : Many COMM Serial Ports Open & Idle causes high System Process time
>...
>Serial COMM Ports (on a special USB multi-serial adapter which connects to
>PC via one USB cable)
>
>I open many communication serial ports at the beginning of my program.
>I do not reads or writes from the port. The COMM port exists but nothing is
>plugged in to it to ensure nothing is received from the COMM port.
>
>Whilst in this state the application obviously consumes 0-1% average CPU
>time with little or no related Kernel activity.
>
>However on the "System" process an average of 10% CPU time with the majority
>being kernel related activity.

USB is not an interrupt-driven bus. It is master/slave, and the host is
always the master. In order for the system to find out if the device has
anything to read, it has to send read requests continuously to each
endpoint. Until one of them responds, the IRP/URB won't bubble back up to
user mode, but there certainly is kernel overhead in the act of monitoring.

>Can anyone answer why there is so much system (kernel) activity when...
> The Port is open
> No activity on the port is generated activity by the application
> Nothing is plugged in to the port

The fact that nothing is plugged in to the COM port is irrelevant. The USB
driver cannot tell that, so it has to keep those I/O packets flowing.

See, a DDK MVP *can* be of use in a VC++ newsgroup.
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc
.



Relevant Pages

  • usb_insert_transfer panic with if_zyd
    ... When I use my ZyXEL G-220 Wireless USB Stick with the if_zyd driver, ... <ACPI PCI bus> on pcib0 ... device problem, disabling port 1 ... <Ethernet over FireWire> on firewire0 ...
    (freebsd-current)
  • 2.6.10-rc1 & ahci & IHC6R & 925X & raid1
    ... usb modules for console, usb keyboard, network and starting a shell. ... ACPI: PM-Timer IO Port: 0x808 ... PCI: PCI BIOS revision 2.10 entry at 0xfb768, ... usbcore: registered new driver hub ...
    (Linux-Kernel)
  • usb does not work on vias smp mainboard
    ... I installed kernel 2.4.21 on an via's mainboard, it seems that the usb ... number of MP IRQ sources: ... PCI Interrupt Link ... Port indicators are not supported ...
    (Linux-Kernel)
  • [PATCH 09/12] i386/x86_64: EHCI usb debug port early printk support.
    ... With legacy free systems serial ports have stopped being an option ... to get early boot traces and other debug information out of a machine. ... EHCI USB controllers provide a relatively simple debug interface ... When the special feature of the EHCI is not enabled the port ...
    (Linux-Kernel)
  • Boot time Bluetooth BUG: warning: (value > m) at hid-core.c:793
    ... When the USB reciever is already plugged-in at boot-time and the ... hub 2-2:1.0: USB hub found ... Interface Descriptor: ... Hub Port Status: ...
    (Linux-Kernel)

Loading