This is the mail archive of the ecos-discuss@sourceware.org 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]

Re: cyg_selwakeup and performance impact?


>> serial_rcv_char() that wake up the thread in serial.c:
>>    //if( cbuf->nb == 0 )
>>        cyg_selwakeup( &cbuf->selinfo );

> Surely the best thing is to find out why that thread isn't getting woken up
when there's data?

For whatever
 problem you are trying to address, this kind of "fix" will cause more troubles than it helps.
Select only tells you that something available (readable) in your case.  Once you passed the
select, the best thing is to read the buffer empty.  And that is one of the reason you are selecting anyway.
One thing you can check is why the read did not read all the data it needs before put back to select again.
Is the read interrupted by signals or something else?

Actually if this is the cause, changing the eCos as you've shown will not actually help.  Even when it works, it is merely
a luck in a noisy system (many wake-ups) as you mentioned.  But these many wake-ups may still be not enough.  Or you could
see some odd issue in "unrelated" area.

I also think the best way is to address the application issue.  And I believe, changing eCos in this way will make
your application very hard to port to future releases or similar UNIX like
 OSes.

Just my 2 cents.

-Tom


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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