Commit 2efdaf7
epoll: simplify signal handling
Check signals before locking ep->lock, and immediately return -EINTR if
there is any signal pending.
This saves a few loads, stores, and branches from the hot path and
simplifies the loop structure for follow up patches.
Link: https://lkml.kernel.org/r/20201106231635.3528496-3-soheil.kdev@gmail.com
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Khazhismel Kumykov <khazhy@google.com>
Cc: Guantao Liu <guantaol@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent 289caf5 commit 2efdaf7
1 file changed
+10
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1733 | 1733 | | |
1734 | 1734 | | |
1735 | 1735 | | |
1736 | | - | |
| 1736 | + | |
1737 | 1737 | | |
1738 | 1738 | | |
1739 | 1739 | | |
| |||
1780 | 1780 | | |
1781 | 1781 | | |
1782 | 1782 | | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
1783 | 1786 | | |
1784 | 1787 | | |
1785 | 1788 | | |
| |||
1809 | 1812 | | |
1810 | 1813 | | |
1811 | 1814 | | |
1812 | | - | |
1813 | | - | |
1814 | | - | |
1815 | | - | |
1816 | | - | |
1817 | | - | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
1818 | 1818 | | |
1819 | 1819 | | |
1820 | | - | |
| 1820 | + | |
1821 | 1821 | | |
1822 | 1822 | | |
1823 | 1823 | | |
| |||
1853 | 1853 | | |
1854 | 1854 | | |
1855 | 1855 | | |
1856 | | - | |
| 1856 | + | |
1857 | 1857 | | |
1858 | 1858 | | |
1859 | 1859 | | |
1860 | 1860 | | |
1861 | 1861 | | |
1862 | 1862 | | |
1863 | | - | |
| 1863 | + | |
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
| |||
0 commit comments