Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752890AbaJAQBM (ORCPT ); Wed, 1 Oct 2014 12:01:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28231 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751535AbaJAQBI (ORCPT ); Wed, 1 Oct 2014 12:01:08 -0400 From: Jiri Olsa To: linux-kernel@vger.kernel.org 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 Subject: [PATCH 1/5] perf tools: Do not set O_NONBLOCK flag for perf event fd Date: Wed, 1 Oct 2014 18:00:25 +0200 Message-Id: <1412179229-19466-1-git-send-email-jolsa@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Arnaldo Carvalho de Melo Cc: Corey Ashford Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Milian Wolff Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Signed-off-by: Jiri Olsa --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/