| Age | Commit message (Collapse) | Author |
|
Eliminate a handful of cache references by keeping current in a register
instead of reloading (helps x86) and avoiding the overhead of a function
call. Inlining eventpoll_init_file() saves 24 bytes. Also reorder file
initialization to make writes occur more sequentially.
Signed-off-by: Benjamin LaHaise <bcrl@linux.intel.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
From: "Randy.Dunlap" <rddunlap@osdl.org>
Add syscalls.h, which contains prototypes for the kernel's system calls.
Replace open-coded declarations all over the place. This patch found a
couple of prior bugs. It appears to be more important with -mregparm=3 as we
discover more asmlinkage mismatches.
Some syscalls have arch-dependent arguments, so their prototypes are in the
arch-specific unistd.h. Maybe it should have been asm/syscalls.h, but there
were already arch-specific syscall prototypes in asm/unistd.h...
Tested on x86, ia64, x86_64, ppc64, s390 and sparc64. May cause
trivial-to-fix build breakage on other architectures.
|
|
From: Davide Libenzi <davidel@xmailserver.org>
The attached patch implements the one-shot support for epoll. Because of
the way epoll works (hooking f_op->poll()) the ET behavior is not really ET
because it might happen that, while data is still available to read (for
the EPOLLIN case), another chunk will become available triggering another
event.
While those conditions can be easily be handled in userspace, the absolute
triviality of the patch and the avoidance of user/kernel space switches and
f_op->poll() calls, make IMHO worth doing this inside epoll itself.
|
|
|
|
From: Davide Libenzi <davidel@xmailserver.org>
- Inline eventpoll_release() so that __fput() does not need to call in
epoll code if the file itself is not registered inside an epoll fd
- Add <linux/types.h> inclusion due __u32 and __u64 usage
- Fix debug printf that would otherwise panic if enabled with the new
epoll code
|
|
As discussed earlier. The 64bit epoll ABI on AMD64 is changed to
match 32bit. This way we avoid emulation overhead.
To catch old binaries I allocate new syscall slots.
|
|
From: Christopher Hoover <ch@murgatroid.com>
Here's a patch to drop some more text/data/bss out of 2.5. This time
the ``victim'' is eventpollfs (epoll).
|
|
This patch adds selectable EdgeTriggered/LevelTriggered behaviour to
epoll.
It has been widely discussed on lkml about two weeks ago and everyone
very welcome the change. It has been even more widely discussed through
private emails with application developers, that do not feel confortable
posting on lkml. The great value of the patch is that selecting the LT
behaviour, applications using poll/select can be ported very easily to
epoll, making existing apps to benefit from epoll scalability with very
short ETA's.
The API remains the same with the addition of a EPOLLET event flag that
sets the LT/ET behaviour for that fd.
|
|
Patch from Davide Libenzi <davidel@xmailserver.org>
Changes :
- Timeout overflow check
- Ceil()ing of ms->jif conversion
- Syscalls return type int->long
|
|
- Finalized the interface by :
* Having an epoll_event structure instead of using the pollfd
* Adding a 64 bit opaque data member to the epoll_event structure
* Removing the "fd" member from the epoll_event structure
* Removing the "revents" member to leave space for a unique 32 bit
"events" member
- Fixes the problem where, due the new callback'd wake_up() mechanism
loops might be generated by bringing deadlock or stack blow ups.
In fact a user could create a cycle by adding epoll fds inside
other epoll fds. The patch solves the problem by either :
* Moving the wake_up() call done on the poll wait queue head,
outside the locked region
* Implementing a new safe wake up function for the poll wait queue
head
- Some variable renaming
- Changed __NR_sys_epoll_* to __NR_epoll_* ( Hanna Linder )
- Blocked the add operation of an epoll file descriptor inside itself
- Comments added/fixed
|
|
This does:
- naming cleanup: ep_* -> eventpoll_* for non-static functions ( 2 )
- No more limit of 2 poll wait queue for each file*
Before epoll used to have, inside its item struct, space for two wait
queues. This was driven by the fact that during a f_op->poll() each file
won't register more than one read and one write wait queue. Now, I'm not
sure if this is 100% true or not, but with the current implementation a
linked list of wait queues is kept to remove each limit.
|
|
- Improved file cleanup code
|
|
- Some constant adjusted
- Comments added
- Better hash initialization
- Correct timeout setup
- Added __KERNEL__ bypass to avoid userspace inclusion problems
- Cleaned up locking
- Function poll_init_wait() now calls poll_init_wait_ex()
- Event return fix ( Jay Vosburgh )
- Use <linux/hash.h> for the hash
|
|
- EP_CTL_MOD drops an event if conditions events are met
- The source file eventpoll.c moved from drivers/char to fs
- Fixed a weirdness with tty's
Missing: system calls for arch != i386 ...
|
|
Latest version of the epoll interfaces.
|