This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Suggested improvement to my AT91 serial driver patch


Here are some thoughts on how my serial driver patch could be improved. 

I have yet to take the other patches for a spin, so perhaps they have
already addressed these problems, or can be similarly improved. 

The reason I'm posting these thoughts, is that I think it would be
constructive to figure out which of the serial driver patches that can
be improved with time to be The One, while in the meantime providing
something better than what we have today.




A large DPC read buffer improves the system throughput, but causes
delays before the application is alerted to new data. However, this
appears to be a weakness in the driver and not a fundemental limitation.
New scheme:

- At any one time the application is either waiting for the serial
driver or it is not.
- If it is not waiting for data on the serial port, there is no harm in
having implementing a large buffer w/the DPC.
- If the application is waiting for data on the serial port, it should
be awoken as soon as there is a single byte available.
- If the application is going from "not waiting for data on the serial
port", to  "waiting", it should first check if there is data available,
before it goes to sleep. 

If the application is concerned about system throughput, it must arrange
not to wait on the serial port for input if it can avoid it.

Ãyvind



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]