* [merged] epoll-pull-all-code-between-fetch_events-and-send_event-into-the-loop.patch removed from -mm tree
@ 2020-12-20 2:57 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-12-20 2:57 UTC (permalink / raw)
To: edumazet, guantaol, khazhy, mm-commits, soheil, torvalds, willemb
The patch titled
Subject: epoll: pull all code between fetch_events and send_event into the loop
has been removed from the -mm tree. Its filename was
epoll-pull-all-code-between-fetch_events-and-send_event-into-the-loop.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Soheil Hassas Yeganeh <soheil@google.com>
Subject: epoll: pull all code between fetch_events and send_event into the loop
This is a no-op change which simplifies the follow up patches.
Link: https://lkml.kernel.org/r/20201106231635.3528496-7-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>
---
fs/eventpoll.c | 41 +++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 20 deletions(-)
--- a/fs/eventpoll.c~epoll-pull-all-code-between-fetch_events-and-send_event-into-the-loop
+++ a/fs/eventpoll.c
@@ -1774,14 +1774,14 @@ static int ep_poll(struct eventpoll *ep,
}
fetch_events:
- eavail = ep_events_available(ep);
- if (!eavail)
- eavail = ep_busy_loop(ep, timed_out);
+ do {
+ eavail = ep_events_available(ep);
+ if (!eavail)
+ eavail = ep_busy_loop(ep, timed_out);
- if (eavail)
- goto send_events;
+ if (eavail)
+ goto send_events;
- do {
if (signal_pending(current))
return -EINTR;
@@ -1830,21 +1830,22 @@ fetch_events:
* carefully under lock, below.
*/
eavail = 1;
- } while (0);
- if (!list_empty_careful(&wait.entry)) {
- write_lock_irq(&ep->lock);
- /*
- * If the thread timed out and is not on the wait queue, it
- * means that the thread was woken up after its timeout expired
- * before it could reacquire the lock. Thus, when wait.entry is
- * empty, it needs to harvest events.
- */
- if (timed_out)
- eavail = list_empty(&wait.entry);
- __remove_wait_queue(&ep->wq, &wait);
- write_unlock_irq(&ep->lock);
- }
+ if (!list_empty_careful(&wait.entry)) {
+ write_lock_irq(&ep->lock);
+ /*
+ * If the thread timed out and is not on the wait queue,
+ * it means that the thread was woken up after its
+ * timeout expired before it could reacquire the lock.
+ * Thus, when wait.entry is empty, it needs to harvest
+ * events.
+ */
+ if (timed_out)
+ eavail = list_empty(&wait.entry);
+ __remove_wait_queue(&ep->wq, &wait);
+ write_unlock_irq(&ep->lock);
+ }
+ } while (0);
send_events:
/*
_
Patches currently in -mm which might be from soheil@google.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-20 2:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-20 2:57 [merged] epoll-pull-all-code-between-fetch_events-and-send_event-into-the-loop.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).