The difference between ET and LT pattern in Epoll

Source: Internet
Author: User
Tags epoll

Epoll operates on a file descriptor in two modes: LT (Level Trigger, levels trigger) mode and ET (Edge Trigger, Edge trigger) mode. The LT mode is the default operating mode, which epoll equivalent to an efficient poll. When registering the Epollet event in the Kernel event table in Epoll, Epoll will manipulate the file descriptor in the ET mode. ET is an efficient mode of epoll.

For file descriptors that work with LT, the application can not process the event immediately after Epolll_wait detects that an event has occurred and notifies the application of the event. This way, when the application next calls Epoll_wait, Epolll_wait will also notify the application again of this event until the event is processed. For file descriptors that use the ET pattern, when Epoll_wait detects that an event has occurred and notifies the application of the event, the application must immediately handle the event because the post-epolll_wait call no longer tells the application that the event is being notified, The ET mode greatly reduced the number of times the same Epoll event was repeatedly triggered, so the efficiency was higher than the LT mode.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.