mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/5] perf tools: Do not set O_NONBLOCK flag for perf event fd
@ 2014-10-01 16:00 Jiri Olsa
  2014-10-01 16:00 ` [PATCH 2/5] perf tools: Move callchain_param to util object in to fix python test Jiri Olsa
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Jiri Olsa @ 2014-10-01 16:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jiri Olsa, Adrian Hunter, Arnaldo Carvalho de Melo,
	Corey Ashford, David Ahern, Frederic Weisbecker, Ingo Molnar,
	Milian Wolff, Namhyung Kim, Paul Mackerras, Peter Zijlstra

We don't need O_NONBLOCK flag on perf event file descriptors.

Aside the fact that file descriptors in evlist::pollfd are
never used in read syscall (write syscall is not supported),
the kernel perf read syscall path could never block anyway.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Milian Wolff <mail@milianw.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/evlist.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 3cebc9a8d52e..0fbc5f082308 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -434,12 +434,9 @@ static int __perf_evlist__add_pollfd(struct perf_evlist *evlist, int fd, int idx
 	 * Save the idx so that when we filter out fds POLLHUP'ed we can
 	 * close the associated evlist->mmap[] entry.
 	 */
-	if (pos >= 0) {
+	if (pos >= 0)
 		evlist->pollfd.priv[pos].idx = idx;
 
-		fcntl(fd, F_SETFL, O_NONBLOCK);
-	}
-
 	return pos;
 }
 
-- 
1.9.3


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-10-15 10:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-01 16:00 [PATCH 1/5] perf tools: Do not set O_NONBLOCK flag for perf event fd Jiri Olsa
2014-10-01 16:00 ` [PATCH 2/5] perf tools: Move callchain_param to util object in to fix python test Jiri Olsa
     [not found]   ` <20141002145949.GK2799@kernel.org>
2014-10-02 15:08     ` Jiri Olsa
2014-10-02 15:13       ` Arnaldo Carvalho de Melo
2014-10-15 10:02   ` [tip:perf/urgent] perf callchain: " tip-bot for Jiri Olsa
2014-10-01 16:00 ` [PATCH 3/5] perf kvm stat live: Fix perf_evlist__add_pollfd error handling Jiri Olsa
2014-10-15 10:01   ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2014-10-01 16:00 ` [PATCH 4/5] perf kvm stat live: Use perf_evlist__add_pollfd return fd position Jiri Olsa
2014-10-15 10:01   ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2014-10-01 16:00 ` [PATCH 5/5] perf kvm stat live: Use fdarray object instead pollfd Jiri Olsa
2014-10-15 10:01   ` [tip:perf/urgent] perf kvm stat live: Use fdarray object instead of pollfd tip-bot for Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome