OLS: Kernel documentation, and submitting kernel patches
07-25-2008 08:00 AM
The second of four days at the 10th annual Ottawa Linux Symposium got off to an unusual start as a small bird "assisted" Rob Landley in giving the first talk I attended, called "Where Linux kernel documentation hides." The tweeting bird was polite, only flying over the audience a couple of times and mostly paying attention.
Three RH7 servers patched through a satellite and rebooted Sunday. Two of the three experienced issues with kernel 123.20.1 and were reporting logind and systemd errors, org.freedesktop subscription failure. Users ssh'ing into the two servers had to wait 30 seconds to get the password prompt.... (2 Replies)
Hi everyone,
I am trying to prevent the ehci_hcd kernel module to load at boot time.
Here's what I've tried so far:
1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here):
2) Blacklisted the module by adding the following string to
3) Tried to blacklist the module... (0 Replies)
Hi gurus
Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value
Is it /dev/kmem file or something... (1 Reply)
supermicro(dual core) server getting rebooted after "decompressing the kernel;booting the kernel" message comes.
I tried giving acpi=off to the kernel command line but same problem.It shows everything ok and no problem with memory and processors and power supplies.Wt could be the reason?
It has... (1 Reply)
Hi All,
Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff.
Cheers,
Brendan (4 Replies)
hi all!
i have developed a mechanism in system.c to count how many times each kernel call is called. The results are held in an array in system.c . What i want to do is to create a new kernel call which will print this array. I need help in passing the array from system.c to the new kernel call. ... (5 Replies)
ok so I just installed fedora core 6 on my dell inspiron 700m and I go to boot into linux and I get this error. Has anyone seen this before?
I also had XP Pro and Vista installed on this pc prior to putting fedora core 6 on the machine. I'm trying to setup a triple boot system.
Please Help... (2 Replies)
FUTEX(7) Linux Programmer's Manual FUTEX(7)NAME
futex - fast user-space locking
SYNOPSIS
#include <linux/futex.h>
DESCRIPTION
The Linux kernel provides futexes ("Fast user-space mutexes") as a building block for fast user-space locking and semaphores. Futexes are
very basic and lend themselves well for building higher level locking abstractions such as POSIX mutexes.
This page does not set out to document all design decisions but restricts itself to issues relevant for application and library develop-
ment. Most programmers will in fact not be using futexes directly but instead rely on system libraries built on them, such as the NPTL
pthreads implementation.
A futex is identified by a piece of memory which can be shared between different processes. In these different processes, it need not have
identical addresses. In its bare form, a futex has semaphore semantics; it is a counter that can be incremented and decremented atomi-
cally; processes can wait for the value to become positive.
Futex operation is entirely user space for the noncontended case. The kernel is only involved to arbitrate the contended case. As any
sane design will strive for noncontention, futexes are also optimized for this situation.
In its bare form, a futex is an aligned integer which is only touched by atomic assembler instructions. Processes can share this integer
using mmap(2), via shared memory segments or because they share memory space, in which case the application is commonly called multi-
threaded.
Semantics
Any futex operation starts in user space, but it may necessary to communicate with the kernel using the futex(2) system call.
To "up" a futex, execute the proper assembler instructions that will cause the host CPU to atomically increment the integer. Afterward,
check if it has in fact changed from 0 to 1, in which case there were no waiters and the operation is done. This is the noncontended case
which is fast and should be common.
In the contended case, the atomic increment changed the counter from -1 (or some other negative number). If this is detected, there are
waiters. User space should now set the counter to 1 and instruct the kernel to wake up any waiters using the FUTEX_WAKE operation.
Waiting on a futex, to "down" it, is the reverse operation. Atomically decrement the counter and check if it changed to 0, in which case
the operation is done and the futex was uncontended. In all other circumstances, the process should set the counter to -1 and request that
the kernel wait for another process to up the futex. This is done using the FUTEX_WAIT operation.
The futex(2) system call can optionally be passed a timeout specifying how long the kernel should wait for the futex to be upped. In this
case, semantics are more complex and the programmer is referred to futex(2) for more details. The same holds for asynchronous futex wait-
ing.
VERSIONS
Initial futex support was merged in Linux 2.5.7 but with different semantics from those described above. Current semantics are available
from Linux 2.5.40 onward.
NOTES
To reiterate, bare futexes are not intended as an easy to use abstraction for end-users. Implementors are expected to be assembly literate
and to have read the sources of the futex user-space library referenced below.
This man page illustrates the most common use of the futex(2) primitives: it is by no means the only one.
SEE ALSO futex(2)
Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux (proceedings of the Ottawa Linux Symposium 2002), futex example library,
futex-*.tar.bz2 <ftp://ftp.kernel.org/pub/linux/kernel/people/rusty/>.
COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2012-08-05 FUTEX(7)