-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 116263 b: refs/heads/master c: 45e4a24 h: refs/heads/master i: 116261: 129c049 116259: 707ffc1 116255: f7f8ea8 v: v3
- Loading branch information
Linus Torvalds
committed
Oct 20, 2008
1 parent
a42e01f
commit 8ee8fd8
Showing
1,251 changed files
with
214,730 additions
and
16,296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 7eb923b80c8ce16697129fb2dcdfaeabf83f0dbc | ||
refs/heads/master: 45e4a24f7b6b23810142112b5850fe75696a1155 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
What: /sys/bus/usb/drivers/usbtmc/devices/*/interface_capabilities | ||
What: /sys/bus/usb/drivers/usbtmc/devices/*/device_capabilities | ||
Date: August 2008 | ||
Contact: Greg Kroah-Hartman <gregkh@suse.de> | ||
Description: | ||
These files show the various USB TMC capabilities as described | ||
by the device itself. The full description of the bitfields | ||
can be found in the USB TMC documents from the USB-IF entitled | ||
"Universal Serial Bus Test and Measurement Class Specification | ||
(USBTMC) Revision 1.0" section 4.2.1.8. | ||
|
||
The files are read only. | ||
|
||
|
||
What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_interface_capabilities | ||
What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_device_capabilities | ||
Date: August 2008 | ||
Contact: Greg Kroah-Hartman <gregkh@suse.de> | ||
Description: | ||
These files show the various USB TMC capabilities as described | ||
by the device itself. The full description of the bitfields | ||
can be found in the USB TMC documents from the USB-IF entitled | ||
"Universal Serial Bus Test and Measurement Class, Subclass | ||
USB488 Specification (USBTMC-USB488) Revision 1.0" section | ||
4.2.2. | ||
|
||
The files are read only. | ||
|
||
|
||
What: /sys/bus/usb/drivers/usbtmc/devices/*/TermChar | ||
Date: August 2008 | ||
Contact: Greg Kroah-Hartman <gregkh@suse.de> | ||
Description: | ||
This file is the TermChar value to be sent to the USB TMC | ||
device as described by the document, "Universal Serial Bus Test | ||
and Measurement Class Specification | ||
(USBTMC) Revision 1.0" as published by the USB-IF. | ||
|
||
Note that the TermCharEnabled file determines if this value is | ||
sent to the device or not. | ||
|
||
|
||
What: /sys/bus/usb/drivers/usbtmc/devices/*/TermCharEnabled | ||
Date: August 2008 | ||
Contact: Greg Kroah-Hartman <gregkh@suse.de> | ||
Description: | ||
This file determines if the TermChar is to be sent to the | ||
device on every transaction or not. For more details about | ||
this, please see the document, "Universal Serial Bus Test and | ||
Measurement Class Specification (USBTMC) Revision 1.0" as | ||
published by the USB-IF. | ||
|
||
|
||
What: /sys/bus/usb/drivers/usbtmc/devices/*/auto_abort | ||
Date: August 2008 | ||
Contact: Greg Kroah-Hartman <gregkh@suse.de> | ||
Description: | ||
This file determines if the the transaction of the USB TMC | ||
device is to be automatically aborted if there is any error. | ||
For more details about this, please see the document, | ||
"Universal Serial Bus Test and Measurement Class Specification | ||
(USBTMC) Revision 1.0" as published by the USB-IF. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
trunk/Documentation/ABI/testing/sysfs-bus-usb-devices-usbsevseg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Where: /sys/bus/usb/.../powered | ||
Date: August 2008 | ||
Kernel Version: 2.6.26 | ||
Contact: Harrison Metzger <harrisonmetz@gmail.com> | ||
Description: Controls whether the device's display will powered. | ||
A value of 0 is off and a non-zero value is on. | ||
|
||
Where: /sys/bus/usb/.../mode_msb | ||
Where: /sys/bus/usb/.../mode_lsb | ||
Date: August 2008 | ||
Kernel Version: 2.6.26 | ||
Contact: Harrison Metzger <harrisonmetz@gmail.com> | ||
Description: Controls the devices display mode. | ||
For a 6 character display the values are | ||
MSB 0x06; LSB 0x3F, and | ||
for an 8 character display the values are | ||
MSB 0x08; LSB 0xFF. | ||
|
||
Where: /sys/bus/usb/.../textmode | ||
Date: August 2008 | ||
Kernel Version: 2.6.26 | ||
Contact: Harrison Metzger <harrisonmetz@gmail.com> | ||
Description: Controls the way the device interprets its text buffer. | ||
raw: each character controls its segment manually | ||
hex: each character is between 0-15 | ||
ascii: each character is between '0'-'9' and 'A'-'F'. | ||
|
||
Where: /sys/bus/usb/.../text | ||
Date: August 2008 | ||
Kernel Version: 2.6.26 | ||
Contact: Harrison Metzger <harrisonmetz@gmail.com> | ||
Description: The text (or data) for the device to display | ||
|
||
Where: /sys/bus/usb/.../decimals | ||
Date: August 2008 | ||
Kernel Version: 2.6.26 | ||
Contact: Harrison Metzger <harrisonmetz@gmail.com> | ||
Description: Controls the decimal places on the device. | ||
To set the nth decimal place, give this field | ||
the value of 10 ** n. Assume this field has | ||
the value k and has 1 or more decimal places set, | ||
to set the mth place (where m is not already set), | ||
change this fields value to k + 10 ** m. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
The cgroup freezer is useful to batch job management system which start | ||
and stop sets of tasks in order to schedule the resources of a machine | ||
according to the desires of a system administrator. This sort of program | ||
is often used on HPC clusters to schedule access to the cluster as a | ||
whole. The cgroup freezer uses cgroups to describe the set of tasks to | ||
be started/stopped by the batch job management system. It also provides | ||
a means to start and stop the tasks composing the job. | ||
|
||
The cgroup freezer will also be useful for checkpointing running groups | ||
of tasks. The freezer allows the checkpoint code to obtain a consistent | ||
image of the tasks by attempting to force the tasks in a cgroup into a | ||
quiescent state. Once the tasks are quiescent another task can | ||
walk /proc or invoke a kernel interface to gather information about the | ||
quiesced tasks. Checkpointed tasks can be restarted later should a | ||
recoverable error occur. This also allows the checkpointed tasks to be | ||
migrated between nodes in a cluster by copying the gathered information | ||
to another node and restarting the tasks there. | ||
|
||
Sequences of SIGSTOP and SIGCONT are not always sufficient for stopping | ||
and resuming tasks in userspace. Both of these signals are observable | ||
from within the tasks we wish to freeze. While SIGSTOP cannot be caught, | ||
blocked, or ignored it can be seen by waiting or ptracing parent tasks. | ||
SIGCONT is especially unsuitable since it can be caught by the task. Any | ||
programs designed to watch for SIGSTOP and SIGCONT could be broken by | ||
attempting to use SIGSTOP and SIGCONT to stop and resume tasks. We can | ||
demonstrate this problem using nested bash shells: | ||
|
||
$ echo $$ | ||
16644 | ||
$ bash | ||
$ echo $$ | ||
16690 | ||
|
||
From a second, unrelated bash shell: | ||
$ kill -SIGSTOP 16690 | ||
$ kill -SIGCONT 16990 | ||
|
||
<at this point 16990 exits and causes 16644 to exit too> | ||
|
||
This happens because bash can observe both signals and choose how it | ||
responds to them. | ||
|
||
Another example of a program which catches and responds to these | ||
signals is gdb. In fact any program designed to use ptrace is likely to | ||
have a problem with this method of stopping and resuming tasks. | ||
|
||
In contrast, the cgroup freezer uses the kernel freezer code to | ||
prevent the freeze/unfreeze cycle from becoming visible to the tasks | ||
being frozen. This allows the bash example above and gdb to run as | ||
expected. | ||
|
||
The freezer subsystem in the container filesystem defines a file named | ||
freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the | ||
cgroup. Subsequently writing "THAWED" will unfreeze the tasks in the cgroup. | ||
Reading will return the current state. | ||
|
||
* Examples of usage : | ||
|
||
# mkdir /containers/freezer | ||
# mount -t cgroup -ofreezer freezer /containers | ||
# mkdir /containers/0 | ||
# echo $some_pid > /containers/0/tasks | ||
|
||
to get status of the freezer subsystem : | ||
|
||
# cat /containers/0/freezer.state | ||
THAWED | ||
|
||
to freeze all tasks in the container : | ||
|
||
# echo FROZEN > /containers/0/freezer.state | ||
# cat /containers/0/freezer.state | ||
FREEZING | ||
# cat /containers/0/freezer.state | ||
FROZEN | ||
|
||
to unfreeze all tasks in the container : | ||
|
||
# echo THAWED > /containers/0/freezer.state | ||
# cat /containers/0/freezer.state | ||
THAWED | ||
|
||
This is the basic mechanism which should do the right thing for user space task | ||
in a simple scenario. | ||
|
||
It's important to note that freezing can be incomplete. In that case we return | ||
EBUSY. This means that some tasks in the cgroup are busy doing something that | ||
prevents us from completely freezing the cgroup at this time. After EBUSY, | ||
the cgroup will remain partially frozen -- reflected by freezer.state reporting | ||
"FREEZING" when read. The state will remain "FREEZING" until one of these | ||
things happens: | ||
|
||
1) Userspace cancels the freezing operation by writing "THAWED" to | ||
the freezer.state file | ||
2) Userspace retries the freezing operation by writing "FROZEN" to | ||
the freezer.state file (writing "FREEZING" is not legal | ||
and returns EIO) | ||
3) The tasks that blocked the cgroup from entering the "FROZEN" | ||
state disappear from the cgroup's set of tasks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.