03-21-2012
futex objects are used to coordinate access to something. When a futex is negative it's cooperating process(es) are in a wait state, in the case of a file system it is probably code waiting for io requests to be queued. Note the -1 in the output. This means the process checking the futex is sleeping, then waking up checking the futex and going back to sleep. Polling is the term you want. The select() system call does this for example, if you want to understand polling - read the select man page. This appears to be mostly harmless.
ioctl is the primary inquiry and control interface between processes and filesystem drivers. EAGAIN is a valid return code meaning the resource is offline, not available, busy, waiting, etc. but anyway is not able to answer. This may be very like kids in a car asking the same question every 2 minutes: 'are we there yet?'
Find out what process those pids are, then read up on what those processes do.
IMO something is possibly wasting some cpu cycles and the resources required to move a process sleep/wake (like realtime timer), and depending on your configuration this may be of little importance. You may need some kind of upgrade/patch or configuration change. It is not really "normal" AFAIK.
admin_xor implied the workround: do not automount.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have this question in my study guide could anyone please help me with the answer and (explicit) explanation.
hostname: HOSTONE
automounter file: /etc/auto.home
entry: scps HOSTTWO:/export/home/scps
commands executed on HOSTONE, mark all commands where the automounter will be invoked.
... (3 Replies)
Discussion started by: almendrita
3 Replies
2. Programming
UNIX, gnu cc compiler, SUN Ultra 60
Hello, this is my first post, so please bear with me. I'm currently developing a test environment for a network subsystem that, when live, accesses databases and other network elements.
However, my test environment will be run offline, so I need to fake... (4 Replies)
Discussion started by: j_t_kim
4 Replies
3. UNIX for Dummies Questions & Answers
Hi ALL,
Does anyone know how automounting can be disabled in solaris?
(I need to mount the home directory on to a sun machine from another machine.
So I run something like
mount another_machine:/home /home (on my sun)
however i get an error saying device busy)
I was told automouting... (1 Reply)
Discussion started by: rkap
1 Replies
4. AIX
Have an AIX 5.2 box. I had automounter already setup to control /home using /etc/auto_home as an indirect automount map.
Then we added NIS. We have it working, but for some reason, the NIS table auto.home seems to override /etc/auto_home entries. Of course, there are some duplicates... (2 Replies)
Discussion started by: Garry_Garrett
2 Replies
5. Solaris
When I try to format a slice in Solaris 10 I get the follow error :
-bash-3.00# mkfs /dev/dsk/c1d0s5 18877824
Can not determine partition size: Inappropriate ioctl for device
Some format command output:....
AVAILABLE DISK SELECTIONS:
0. c1d0 <DEFAULT cyl 38735 alt 2 hd 64 sec 63>... (2 Replies)
Discussion started by: spoonman
2 Replies
6. UNIX for Advanced & Expert Users
Hi All,
int ioctl(int d, int request, ...);
Can somebody tell me how does ioctl decides the input parameter: "request".
Sometimes, its SNDCTL_TMR_TIMEBASE or TCGETS
or FIONREAD...etc.
What is the pattern??
I am asking this coz my strace returns this: ... (1 Reply)
Discussion started by: angad.makkar
1 Replies
7. Solaris
For some reason when I try to take a snapshot of the root slice on a particular machine I get an ioctl 22 error. I can't seem to find much on the problem by searching the internet other than some realtime processes such as ntp that use mlock can cause this to happen. I tried running it with truss... (2 Replies)
Discussion started by: ilikecows
2 Replies
8. IP Networking
Hi gurus, I am trying to understand the enviroment which we are using. The fact that I am asking is that this is production enviroment and I cannot change anything to experiment. Following servers are somehow related to each other, please help me figure out if my conclusions are correct.
-... (0 Replies)
Discussion started by: wakatana
0 Replies
9. Red Hat
I have an nfs at 192.168.1.10:/home/vm1/Desktop/nfs and will like to mount locally to /home/vm1/Desktop/nfs-mount using automounter...need help doing do
What i did
$cat /etc/auto.master
/home/vm1/Desktop /etc/auto.nfs
$cat /etc/auto.nfs
nfs-bind -fstype=nfs ... (3 Replies)
Discussion started by: nokia3310
3 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 involved only 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 touched only 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 be 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.53 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)