gRPC core: why polling_island has a field "merged_to"

48 views
Skip to first unread message

Wankai Zhang

unread,
Oct 18, 2016, 11:38:25 AM10/18/16
to grpc.io

Hello, all:
I am using c/c++.
I am confused of polling_island data structure. Why it contains a field "merged_to" ? 
Could anyone help me?

Sree Kuchibhotla

unread,
Oct 18, 2016, 5:50:01 PM10/18/16
to Wankai Zhang, grpc.io
Hi Wankai,

The following design document explains the rationale behind the new epoll implementation. Polling island was added as a part of this change.
(see section 4).

Here is some high level summary:
- Polling island represents the underlying epoll set containing the file descriptors (which is why it contains the epoll-fd)
- The main idea in having them is to prevent a file descriptor from being in multiple epoll sets. This means that whenever we add a file descriptor (that already belongs to an epoll set) to another epoll set,  we merge the underlying polling islands and old polling island's merged_to field points to the new polling island..

the document's section 4 explains it all

thanks,
Sree

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/24a57321-0d44-407c-95c4-f4debd94055c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wankai Zhang

unread,
Oct 18, 2016, 9:07:02 PM10/18/16
to grpc.io, wankai...@gmail.com
Thanks, @Sree, it's very helpful.

在 2016年10月19日星期三 UTC+8上午5:50:01,Sree Kuchibhotla写道:
Hi Wankai,

The following design document explains the rationale behind the new epoll implementation. Polling island was added as a part of this change.
(see section 4).

Here is some high level summary:
- Polling island represents the underlying epoll set containing the file descriptors (which is why it contains the epoll-fd)
- The main idea in having them is to prevent a file descriptor from being in multiple epoll sets. This means that whenever we add a file descriptor (that already belongs to an epoll set) to another epoll set,  we merge the underlying polling islands and old polling island's merged_to field points to the new polling island..

the document's section 4 explains it all

thanks,
Sree

On Tue, Oct 18, 2016 at 8:38 AM, Wankai Zhang <wankai...@gmail.com> wrote:

Hello, all:
I am using c/c++.
I am confused of polling_island data structure. Why it contains a field "merged_to" ? 
Could anyone help me?

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages