RE: Asynchronous sock_sendmbuf
RE: Asynchronous sock_sendmbuf
- Subject: RE: Asynchronous sock_sendmbuf
- From: "Eddy Quicksall" <email@hidden>
- Date: Fri, 23 May 2008 08:32:33 -0400
Can the upcall preempt a kernel thread? Say I'm in a kernel thread and issue
a send, can the upcall interrupt out of the thread or does the thread have
to return to the kernel before the upcall can happen?
There is talk about 1,000,000 connections (but I think that was an
impractical case ... so I reduced it to 1,000 for discussion).
Eddy
-----Original Message-----
From: darwin-kernel-bounces+quicksall_temp=email@hidden
[mailto:darwin-kernel-bounces+quicksall_temp=email@hidden]
On Behalf Of Igor Mikushkin
Sent: Friday, May 23, 2008 2:19 AM
To: email@hidden
Subject: Re: Asynchronous sock_sendmbuf
2008/5/22 Eddy Quicksall <email@hidden>:
> I'm using non-blocking / upcall because (1) it is more efficient than
> switching threads and (2) I only need one thread for all connections (and
3,
> it is an embedded application and not much memory is available for lots of
> threads).
>
(2) Upcall function is called concurrently so your application is
already multithreaded.
2008/5/23 Eddy Quicksall <email@hidden>:
> Maybe the efficiency would still be fairly good but one thing is four
sure.
> It would take lots more memory to have 1000 or so threads just to handle
> what can be handled with a single thread.
I think you only need one additional send thread per connection if
using blocking variant.
Do you have 1000 connections?
Kernel has a limitation to a number of threads.
Igor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
uth.net
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden