Vadim Lebedev wrote:

> Now, when we agree that it IS possible  to use single pipe for multiple
> bridges
> let's look on benefits:

I did not agree that it was possible, I told you it seemed possible but
would likely provide little or no benefit.

> As for now Asterisk when packet arrives on a briged socket
>     1. Thread switch to the reader thread
>     2. read from socket + transfer of data from kernel to user
>     3. thread swicth to writer thread
>     4. write to socket +  transfer of data from user to kernel

Where are these two threads you are referring to? Asterisk call bridges
happen in one thread per bridge.

> Now if my proposal is implemented in the worst case we will economise 2
> thread switches, 2 user/kernel data transfers
> plus we'll have much less threads in the system.
> 
> I think we can expect pretty dramatic improvements

This would only be true if your assumption about two threads per bridge
were true, but it is not. The only possible benefit of your proposal
would be the reduced kernel/user copying, but you've replaced it with
complex pipe setup and constant creation and destruction of splice()
structures in the kernel.

So far you haven't demonstrated any possible significant benefit from
this idea, so unless you can show us a working example where your idea
produces a performance improvement in any noticeable way, I don't think
you will accomplish much pursuing this theory.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to