summaryrefslogtreecommitdiff
path: root/kernel/compat.c
AgeCommit message (Collapse)Author
2003-12-29[PATCH] more correct get_compat_timespec interfaceAndrew Morton
From: Joe Korty <joe.korty@ccur.com> The API for get_compat_timespec / put_compat_timespec is incorrect, it forces a caller with const args to (incorrectly) cast. The posix message queue patch is one such caller.
2003-12-29[PATCH] Minor bug fixes to the compat layerAndrew Morton
From: Arun Sharma <arun.sharma@intel.com> - Several instances where we were using pid_t instead of uid_t - If the caller passed a NULL `oldact' pointer into sys_sigprocmask then don't try to write the old sigmask there.
2003-08-27[COMPAT]: Add missing set_fs() calls to {clock,timer}_*() handlers.Jakub JelĂ­nek
2003-08-13[PATCH] add posix timer compat functionsAndi Kleen
Add 32bit->64bit conversion functions for POSIX timers. I kept timer_create architecture specific, because it does signal specific stuff which is not portable enough for generic compat.
2003-08-06[PATCH] Add do_setitimer prototype to linux/time.hAndrew Morton
From: Peter Chubb <peterc@gelato.unsw.edu.au> Currently, do_setitimer() is used in several files, but doesn't appear in any header. Thus its declaration is repeated in some files, and its use causes a warning in others (because there is no declaration present). This patch: -- adds a couple of declarations to linux/times.h -- removes the (now duplicate) declarations from other files.
2003-07-17[PATCH] fix return of compat_sys_sched_getaffinityAndrew Morton
From: Anton Blanchard <anton@samba.org> On success getaffinity should return the size of mask. It looks like Randy's patch (which fixed a bogus return) missed this bit. In reality I'm not sure if we care, and with cpu bitmasks this stuff is going to break.
2003-07-10[PATCH] fix return of compat_sys_sched_getaffinityAndrew Morton
From: rwhron@earthlink.net It returns sizeof(compat_ulong_t) even if put_user() faulted.
2003-06-17[PATCH] Fix compat_sys_getrusage. AgainAnton Blanchard
I must not ignore compiler warnings. I must not ignore compiler warnings. I must not ignore compiler warnings.
2003-06-14[PATCH] fix compat_sys_getrusageAnton Blanchard
compat_sys_getrusage was returning the result of a logical or. Make it return the result of sys_getrusage if it fails or -EFAULT if we cant write it out to userspace.
2003-05-28[PATCH] compat_wait4 fixAnton Blanchard
sys_wait4 can return a pid and in this case we want to copy the struct rusage out to userspace.
2003-05-25[FUTEX]: Fix kernel/compat.c after requeueing futex changes.David S. Miller
2003-05-25[PATCH] CONFIG_FUTEXAndrew Morton
From: Christopher Hoover <ch@murgatroid.com> Not everyone needs futex support, so it should be optional. This is needed for small platforms.
2003-05-24[PATCH] support "requeueing" futexesIngo Molnar
This addresses a futex related SMP scalability problem of glibc. A number of regressions have been reported to the NTPL mailing list when going to many CPUs, for applications that use condition variables and the pthread_cond_broadcast() API call. Using this functionality, testcode shows a slowdown from 0.12 seconds runtime to over 237 seconds (!) runtime, on 4-CPU systems. pthread condition variables use two futex-backed mutex-alike locks: an internal one for the glibc CV state itself, and a user-supplied mutex which the API guarantees to take in certain codepaths. (Unfortunately the user-supplied mutex cannot be used to protect the CV state, so we've got to deal with two locks.) The cause of the slowdown is a 'swarm effect': if lots of threads are blocked on a condition variable, and pthread_cond_broadcast() is done, then glibc first does a FUTEX_WAKE on the cv-internal mutex, then down a mutex_down() on the user-supplied mutex. Ie. a swarm of threads is created which all race to serialize on the user-supplied mutex. The more threads are used, the more likely it becomes that the scheduler will balance them over to other CPUs - where they just schedule, try to lock the mutex, and go to sleep. This 'swarm effect' is purely technical, a side-effect of glibc's use of futexes, and the imperfect coupling of the two locks. the solution to this problem is to not wake up the swarm of threads, but 'requeue' them from the CV-internal mutex to the user-supplied mutex. The attached patch adds the FUTEX_REQUEUE feature FUTEX_REQUEUE requeues N threads from futex address A to futex address B. This way glibc can wake up a single thread (which will take the user-mutex), and can requeue the rest, with a single system-call. Ulrich Drepper has implemented FUTEX_REQUEUE support in glibc, and a number of people have tested it over the past couple of weeks. Here are the measurements done by Saurabh Desai: System: 4xPIII 700MHz ./cond-perf -r 100 -n 200: 1p 2p 4p Default NPTL: 0.120s 0.211s 237.407s requeue NPTL: 0.124s 0.156s 0.040s ./cond-perf -r 1000 -n 100: Default NPTL: 0.276s 0.412s 0.530s requeue NPTL: 0.349s 0.503s 0.550s ./pp -v -n 128 -i 1000 -S 32768: Default NPTL: 128 games in 1.111s 1.270s 16.894s requeue NPTL: 128 games in 1.111s 1.959s 2.426s ./pp -v -n 1024 -i 10 -S 32768: Default NPTL: 1024 games in 0.181s 0.394s incompleted 2m+ requeue NPTL: 1024 games in 0.166s 0.254s 0.341s the speedup with increasing number of threads is quite significant, in the 128 threads, case it's more than 8 times. In the cond-perf test, on 4 CPUs it's almost infinitely faster than the 'swarm of threads' catastrophy triggered by the old code.
2003-04-16[PATCH] getrlimit,setrlimit,getrusage,wait4 unificationRandolph Chung
2003-04-14[PATCH] {get,set}affinity unificationRandolph Chung
This one gets rid of sys32_{get,set}affinity in favor of a unified compat implementation.
2003-02-16[PATCH] compat futex fixAnton Blanchard
Fix compile errors after futex merge.
2003-02-14[PATCH] compat_sys_futex 1/3 generic, parisc, ppc64, s390x and x86_64Stephen Rothwell
This is the generic part of the patch and the architecture specific parts I have been asked to forward directly to you.
2003-01-15[PATCH] compat_sys_sigpending and compat_sys_sigprocmaskStephen Rothwell
This creates compat_sys_sigpending and compat_sys_sigprocmask and patches sent to maintainers remove all the arch specific versions.
2003-01-07[PATCH] {get,put}_compat_timspec: genericStephen Rothwell
Andi Kleen asked for these two, so here they are. This is the generic part of creating compat functions for timespec get/put.
2002-12-14[PATCH] consolidate sys32_new[lf]stat - architecture independentStephen Rothwell
This renames more types and moves them into asm/compat.h and also consolidates sys32_new{stat,fstat,lstat}.
2002-12-14[PATCH] consolidate sys32_times - architecture independentStephen Rothwell
This patch creates compat_sys_times and a few more compability types.
2002-12-14[PATCH] nanosleep compatibility layer fixStephen Rothwell
Fix for the compatibility layer for NULL 'remaining time' pointer.
2002-12-07[COMPAT]: Convert to new nanosleep implementation.David S. Miller
2002-12-03[PATCH] compatibility syscall layerStephen Rothwell
This is the generic part of the start of the compatibility syscall layer. I think I have made it generic enough that each architecture can define what compatibility means. To use this, an architecture must create asm/compat.h and provide typedefs for (currently) 'compat_time_t', 'struct compat_timeval' and 'struct compat_timespec'.