+ epoll-add-a-reschedule-point-in-ep_free.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + epoll-add-a-reschedule-point-in-ep_free.patch added to -mm tree
To: edumazet@xxxxxxxxxx,tytso@xxxxxxx,viro@xxxxxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Tue, 20 Aug 2013 12:58:30 -0700


The patch titled
     Subject: epoll: add a reschedule point in ep_free()
has been added to the -mm tree.  Its filename is
     epoll-add-a-reschedule-point-in-ep_free.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/epoll-add-a-reschedule-point-in-ep_free.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/epoll-add-a-reschedule-point-in-ep_free.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Eric Dumazet <edumazet@xxxxxxxxxx>
Subject: epoll: add a reschedule point in ep_free()

ep_free() might iterate on a huge set of epitems and hold cpu too long. 
Add two cond_resched() in order to yield cpu to other tasks.  This is safe
as we only hold mutexes in this function.

Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Theodore Ts'o <tytso@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/eventpoll.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN fs/eventpoll.c~epoll-add-a-reschedule-point-in-ep_free fs/eventpoll.c
--- a/fs/eventpoll.c~epoll-add-a-reschedule-point-in-ep_free
+++ a/fs/eventpoll.c
@@ -740,6 +740,7 @@ static void ep_free(struct eventpoll *ep
 		epi = rb_entry(rbp, struct epitem, rbn);
 
 		ep_unregister_pollwait(ep, epi);
+		cond_resched();
 	}
 
 	/*
@@ -754,6 +755,7 @@ static void ep_free(struct eventpoll *ep
 	while ((rbp = rb_first(&ep->rbr)) != NULL) {
 		epi = rb_entry(rbp, struct epitem, rbn);
 		ep_remove(ep, epi);
+		cond_resched();
 	}
 	mutex_unlock(&ep->mtx);
 
_

Patches currently in -mm which might be from edumazet@xxxxxxxxxx are

epoll-add-a-reschedule-point-in-ep_free.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux