<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
I would do this very differently.<BR>
<BR>
They key to performance is to reduce memcpy and malloc to a minimum. <BR>
<BR>
1. You feed a page from PCI card and swap this over on interrupt/timer - and at this point you copy data to channel buffer or directly to next B channel.<BR>
<BR>
The channel buffers can be shared OS memory, meaning that you write from the PCI card in one end and read (directly from buffer) from app in the other end. Also create the channel buffer as a sircular list of packets and you have no malloc involved.<BR>
<BR>
You can also use this for messaging between threads and even apps - it is a well known and extremely fast technique. also let the IPC fall back to IP and you could start spreading FreeSWITCH modules across a network.<BR>
<BR>
I have some code somewher that does this so I can set up a demo once I return in a weeks time. <BR>
<BR>
Jan<BR>
<BR><BR> <BR>
<HR id=stopSpelling>
<BR>
Date: Fri, 30 Jan 2009 17:16:19 -0600<BR>From: anthony.minessale@gmail.com<BR>To: freeswitch-dev@lists.freeswitch.org<BR>Subject: Re: [Freeswitch-dev] FreeSwitch + ISDN + analog phone adapters - status<BR><BR>I think the goal would be to reduce the number of trips to and from userspace by doing the multiplexing in userspace to avoid the context switches of reading every logical channel as a device.<BR><BR><BR><BR>
<DIV class=EC_gmail_quote>On Fri, Jan 30, 2009 at 4:45 PM, Jan Berger <SPAN dir=ltr><<A href="mailto:janvb@live.com">janvb@live.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=EC_gmail_quote style="PADDING-LEFT: 1ex">
<DIV>What do you want to achieve by moving the entire span up in user space unprocessed?
<DIV class=EC_Ih2E3d><BR> <BR>Jan<BR><BR>> From: <A href="mailto:hselasky@c2i.net">hselasky@c2i.net</A><BR></DIV>
<DIV class=EC_Ih2E3d>> To: <A href="mailto:freeswitch-dev@lists.freeswitch.org">freeswitch-dev@lists.freeswitch.org</A><BR></DIV>> Date: Fri, 30 Jan 2009 18:11:09 +0100
<DIV class=EC_Ih2E3d><BR>> Subject: Re: [Freeswitch-dev] FreeSwitch + ISDN + analog phone adapters - status<BR>> <BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=EC_Wj3C7c>> On Friday 30 January 2009, Michael Jerris wrote:<BR>> > Another useful advantage without the latency tradeoff is to read a<BR>> > full span or card every 1ms (or whatever sane interval) and chop up<BR>> > the bytes in userland. The latency argument dies if you are bridging<BR>> > to voip, so if you can handle bridging the tdm to tdm channels in<BR>> > kernel space, you could easily get away with 10ms reads to user space<BR>> > as well.<BR>> ><BR>> > Mike<BR>> <BR>> Hi,<BR>> <BR>> Got your point.<BR>> <BR>> In between:<BR>> <BR>> I see more in Jan's argument. 48x30 bytes = 1440 bytes, which is an <BR>> interesting size for full span E1.<BR>> <BR>> --HPS<BR>> <BR>> _______________________________________________<BR>> Freeswitch-dev mailing list<BR>> <A href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</A><BR>> <A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</A><BR>> UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-dev">http://lists.freeswitch.org/mailman/options/freeswitch-dev</A><BR>> <A href="http://www.freeswitch.org/">http://www.freeswitch.org</A><BR><BR><BR></DIV></DIV>
<HR>
What can you do with the new Windows Live? <A href="http://www.microsoft.com/windows/windowslive/default.aspx">Find out</A></DIV><BR>_______________________________________________<BR>Freeswitch-dev mailing list<BR><A href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</A><BR><A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</A><BR>UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-dev">http://lists.freeswitch.org/mailman/options/freeswitch-dev</A><BR><A href="http://www.freeswitch.org/">http://www.freeswitch.org</A><BR><BR></BLOCKQUOTE></DIV><BR><BR clear=all><BR>-- <BR>Anthony Minessale II<BR><BR>FreeSWITCH <A href="http://www.freeswitch.org/">http://www.freeswitch.org/</A><BR>ClueCon <A href="http://www.cluecon.com/">http://www.cluecon.com/</A><BR><BR>AIM: anthm<BR><A href="mailto:MSN:anthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</A><BR>GTALK/JABBER/<A href="mailto:PAYPAL:anthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</A><BR>IRC: <A href="http://irc.freenode.net/">irc.freenode.net</A> #freeswitch<BR><BR>FreeSWITCH Developer Conference<BR><A href="mailto:sip:888@conference.freeswitch.org">sip:888@conference.freeswitch.org</A><BR><A href="http://conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</A><BR><A href="mailto:googletalk:conf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</A><BR>pstn:213-799-1400<BR><br /><hr />check out the rest of the Windows Live™.
More than mail–Windows Live™ goes way beyond your inbox.
<a href='http://www.microsoft.com/windows/windowslive/' target='_new'>More than messages</a></body>
</html>