Revert poll exclusive
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 11 Jun 2011 17:48:40 +0000 (13:48 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 11 Jun 2011 17:48:40 +0000 (13:48 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Makefile
lib/Makefile
lib/ringbuffer/ring_buffer_vfs.c
ltt-debugfs-abi.c
wrapper/poll.c [deleted file]
wrapper/poll.h

index d6f1a886c220f03c256bbd35a419b783902cdd8e..dc44fd40b6cfb2834ef0b1e89861aa5e85ecafc4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,8 +13,7 @@ obj-m += ltt-relay.o
 ltt-relay-objs :=  ltt-events.o ltt-debugfs-abi.o \
                        ltt-probes.o ltt-core.o ltt-context.o \
                        lttng-context-pid.o lttng-context-comm.o \
-                       lttng-context-prio.o lttng-context-nice.o \
-                       wrapper/poll.o
+                       lttng-context-prio.o lttng-context-nice.o
 
 ifneq ($(CONFIG_PERF_EVENTS),)
 ltt-relay-objs += lttng-context-perf-counters.o
index 3fc82edc8b8a1ee1443a31cc6778719a19dd5f24..e5735ecaa6fc53a883805c2a1e77d96c60042786 100644 (file)
@@ -8,5 +8,4 @@ lib-ring-buffer-objs := \
        ringbuffer/ring_buffer_splice.o \
        ringbuffer/ring_buffer_mmap.o \
        prio_heap/lttng_prio_heap.o \
-       ../wrapper/poll.o \
        ../wrapper/splice.o
index fecef217c8bfdd9a51587f930a5dc7c2dcecac64..9786d353cba185b696cddf61f7238bfea22443f7 100644 (file)
@@ -89,7 +89,7 @@ unsigned int lib_ring_buffer_poll(struct file *filp, poll_table *wait)
        int finalized, disabled;
 
        if (filp->f_mode & FMODE_READ) {
-               init_poll_funcptr(wait, wrapper_pollwait_exclusive);
+               poll_wait_set_exclusive(wait);
                poll_wait(filp, &buf->read_wait, wait);
 
                finalized = lib_ring_buffer_is_finalized(config, buf);
index f8bee492c3daae003dc7702aaf638ad3af99d0d3..e3f5b55df1219bb2f9ae76313d6532d0bb712f9e 100644 (file)
@@ -564,7 +564,7 @@ unsigned int lttng_channel_poll(struct file *file, poll_table *wait)
        unsigned int mask = 0;
 
        if (file->f_mode & FMODE_READ) {
-               init_poll_funcptr(wait, wrapper_pollwait_exclusive);
+               poll_wait_set_exclusive(wait);
                poll_wait(file, channel->ops->get_hp_wait_queue(channel->chan),
                          wait);
 
diff --git a/wrapper/poll.c b/wrapper/poll.c
deleted file mode 100644 (file)
index f3f76fe..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
- *
- * wrapper around poll __pollwait and poll_get_entry. Using KALLSYMS to get its
- * address when available, else we need to have a kernel that exports this
- * function to GPL modules.
- *
- * Dual LGPL v2.1/GPL v2 license.
- */
-
-#ifdef CONFIG_KALLSYMS
-
-#include <linux/kallsyms.h>
-#include <linux/poll.h>
-
-struct poll_table_entry;
-struct splice_pipe_desc;
-
-static
-void (*__pollwait_sym)(struct file *filp, wait_queue_head_t *wait_address,
-               poll_table *p);
-static
-struct poll_table_entry *(*poll_get_entry_sym)(struct poll_wqueues *p);
-
-void wrapper_pollwait_exclusive(struct file *filp,
-                        wait_queue_head_t *wait_address,
-                        poll_table *p)
-
-{
-       struct poll_wqueues *pwq = container_of(p, struct poll_wqueues, pt);
-       struct poll_table_entry *entry;
-
-       if (!poll_get_entry_sym)
-               poll_get_entry_sym = (void *) kallsyms_lookup_name("poll_get_entry");
-       if (!poll_get_entry_sym) {
-               printk(KERN_WARNING "LTTng: poll_get_entry_sym symbol lookup failed.\n");
-               return;
-       }
-       entry = poll_get_entry_sym(pwq);
-
-       if (!__pollwait_sym)
-               __pollwait_sym = (void *) kallsyms_lookup_name("__pollwait");
-       if (!__pollwait_sym) {
-               printk(KERN_WARNING "LTTng: __pollwait symbol lookup failed.\n");
-               return;
-       }
-       return __pollwait_sym(filp, wait_address, p);
-}
-
-#else
-
-#include <linux/poll.h>
-
-ssize_t wrapper_pollwait_exclusive(struct file *filp,
-                       wait_queue_head_t *wait_address,
-                       poll_table *p)
-{
-       return pollwait_exclusive(filp, wait_address, p);
-}
-
-#endif
index ae524730cda3e184c34293e69d8bd7beec4fa5d3..080717bde9d0da3757fd304c76f82360e963cdc1 100644 (file)
@@ -4,17 +4,13 @@
 /*
  * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
  *
- * wrapper around poll __pollwait and poll_get_entry. Using KALLSYMS to get its
- * address when available, else we need to have a kernel that exports this
- * function to GPL modules.
- *
  * Dual LGPL v2.1/GPL v2 license.
  */
 
 #include <linux/poll.h>
 
-void wrapper_pollwait_exclusive(struct file *filp,
-                        wait_queue_head_t *wait_address,
-                        poll_table *p);
+#warning "poll_wait_set_exclusive() is defined as no-op. Thundering herd effect can be noticed with large number of consumer threads."
+
+#define poll_wait_set_exclusive(poll_table)
 
 #endif /* _LTTNG_WRAPPER_POLL_H */
This page took 0.02885 seconds and 4 git commands to generate.