public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Re: cyg_selwakeup and performance impact?
@ 2008-10-19 15:05 Tom Anderson
  2009-02-08 14:17 ` Zhichao Hong
  0 siblings, 1 reply; 13+ messages in thread
From: Tom Anderson @ 2008-10-19 15:05 UTC (permalink / raw)
  To: zhichao.hong; +Cc: ecos-discuss

>> 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-02-11 10:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-19 15:05 [ECOS] Re: cyg_selwakeup and performance impact? Tom Anderson
2009-02-08 14:17 ` Zhichao Hong
2009-02-09 16:05   ` [ECOS] Debug eCos kernel Deroo Stijn
2009-02-09 16:40     ` Gary Thomas
2009-02-09 18:02       ` Andrew Lunn
2009-02-10  7:19         ` Deroo Stijn
2009-02-10  7:37           ` Andrew Lunn
2009-02-10 15:43             ` Deroo Stijn
2009-02-10 16:15               ` Andrew Lunn
2009-02-11  9:55                 ` Deroo Stijn
2009-02-11 10:09                   ` Andrew Lunn
2009-02-11 10:38                     ` [ECOS] " Daniel Néri
2009-02-11 10:44                       ` Daniel Néri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).