Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86397
b: refs/heads/master
c: 91e229b
h: refs/heads/master
i:
  86395: 1518b5a
v: v3
  • Loading branch information
Lachlan McIlroy committed Feb 26, 2008
1 parent d3dfeac commit 5f0ff8d
Show file tree
Hide file tree
Showing 691 changed files with 18,262 additions and 7,402 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6e5e93424dc66542c548dfaa3bfebe30d46d50dd
refs/heads/master: 91e229bbad6524aabaac8717b2f559283670c37a
3 changes: 2 additions & 1 deletion trunk/Documentation/atomic_ops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ If the atomic value v is not equal to u, this function adds a to v, and
returns non zero. If v is equal to u then it returns zero. This is done as
an atomic operation.

atomic_add_unless requires explicit memory barriers around the operation.
atomic_add_unless requires explicit memory barriers around the operation
unless it fails (returns 0).

atomic_inc_not_zero, equivalent to atomic_add_unless(v, 1, 0)

Expand Down
66 changes: 33 additions & 33 deletions trunk/Documentation/cgroups.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CONTENTS:
4. Questions

1. Control Groups
==========
=================

1.1 What are cgroups ?
----------------------
Expand Down Expand Up @@ -143,10 +143,10 @@ proliferation of such cgroups.

Also lets say that the administrator would like to give enhanced network
access temporarily to a student's browser (since it is night and the user
wants to do online gaming :) OR give one of the students simulation
wants to do online gaming :)) OR give one of the students simulation
apps enhanced CPU power,

With ability to write pids directly to resource classes, its just a
With ability to write pids directly to resource classes, it's just a
matter of :

# echo pid > /mnt/network/<new_class>/tasks
Expand Down Expand Up @@ -227,10 +227,13 @@ Each cgroup is represented by a directory in the cgroup file system
containing the following files describing that cgroup:

- tasks: list of tasks (by pid) attached to that cgroup
- notify_on_release flag: run /sbin/cgroup_release_agent on exit?
- releasable flag: cgroup currently removeable?
- notify_on_release flag: run the release agent on exit?
- release_agent: the path to use for release notifications (this file
exists in the top cgroup only)

Other subsystems such as cpusets may add additional files in each
cgroup dir
cgroup dir.

New cgroups are created using the mkdir system call or shell
command. The properties of a cgroup, such as its flags, are
Expand All @@ -257,7 +260,7 @@ performance.
To allow access from a cgroup to the css_sets (and hence tasks)
that comprise it, a set of cg_cgroup_link objects form a lattice;
each cg_cgroup_link is linked into a list of cg_cgroup_links for
a single cgroup on its cont_link_list field, and a list of
a single cgroup on its cgrp_link_list field, and a list of
cg_cgroup_links for a single css_set on its cg_link_list.

Thus the set of tasks in a cgroup can be listed by iterating over
Expand All @@ -271,9 +274,6 @@ for cgroups, with a minimum of additional kernel code.
1.4 What does notify_on_release do ?
------------------------------------

*** notify_on_release is disabled in the current patch set. It will be
*** reactivated in a future patch in a less-intrusive manner

If the notify_on_release flag is enabled (1) in a cgroup, then
whenever the last task in the cgroup leaves (exits or attaches to
some other cgroup) and the last child cgroup of that cgroup
Expand Down Expand Up @@ -360,8 +360,8 @@ Now you want to do something with this cgroup.

In this directory you can find several files:
# ls
notify_on_release release_agent tasks
(plus whatever files are added by the attached subsystems)
notify_on_release releasable tasks
(plus whatever files added by the attached subsystems)

Now attach your shell to this cgroup:
# /bin/echo $$ > tasks
Expand Down Expand Up @@ -404,19 +404,13 @@ with a subsystem id which will be assigned by the cgroup system.
Other fields in the cgroup_subsys object include:

- subsys_id: a unique array index for the subsystem, indicating which
entry in cgroup->subsys[] this subsystem should be
managing. Initialized by cgroup_register_subsys(); prior to this
it should be initialized to -1
entry in cgroup->subsys[] this subsystem should be managing.

- hierarchy: an index indicating which hierarchy, if any, this
subsystem is currently attached to. If this is -1, then the
subsystem is not attached to any hierarchy, and all tasks should be
considered to be members of the subsystem's top_cgroup. It should
be initialized to -1.
- name: should be initialized to a unique subsystem name. Should be
no longer than MAX_CGROUP_TYPE_NAMELEN.

- name: should be initialized to a unique subsystem name prior to
calling cgroup_register_subsystem. Should be no longer than
MAX_CGROUP_TYPE_NAMELEN
- early_init: indicate if the subsystem needs early initialization
at system boot.

Each cgroup object created by the system has an array of pointers,
indexed by subsystem id; this pointer is entirely managed by the
Expand All @@ -434,8 +428,6 @@ situation.
See kernel/cgroup.c for more details.

Subsystems can take/release the cgroup_mutex via the functions
cgroup_lock()/cgroup_unlock(), and can
take/release the callback_mutex via the functions
cgroup_lock()/cgroup_unlock().

Accessing a task's cgroup pointer may be done in the following ways:
Expand All @@ -444,7 +436,7 @@ Accessing a task's cgroup pointer may be done in the following ways:
- inside an rcu_read_lock() section via rcu_dereference()

3.3 Subsystem API
--------------------------
-----------------

Each subsystem should:

Expand All @@ -455,7 +447,8 @@ Each subsystem may export the following methods. The only mandatory
methods are create/destroy. Any others that are null are presumed to
be successful no-ops.

struct cgroup_subsys_state *create(struct cgroup *cont)
struct cgroup_subsys_state *create(struct cgroup_subsys *ss,
struct cgroup *cgrp)
(cgroup_mutex held by caller)

Called to create a subsystem state object for a cgroup. The
Expand All @@ -470,7 +463,7 @@ identified by the passed cgroup object having a NULL parent (since
it's the root of the hierarchy) and may be an appropriate place for
initialization code.

void destroy(struct cgroup *cont)
void destroy(struct cgroup_subsys *ss, struct cgroup *cgrp)
(cgroup_mutex held by caller)

The cgroup system is about to destroy the passed cgroup; the subsystem
Expand All @@ -481,7 +474,14 @@ cgroup->parent is still valid. (Note - can also be called for a
newly-created cgroup if an error occurs after this subsystem's
create() method has been called for the new cgroup).

int can_attach(struct cgroup_subsys *ss, struct cgroup *cont,
void pre_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
(cgroup_mutex held by caller)

Called before checking the reference count on each subsystem. This may
be useful for subsystems which have some extra references even if
there are not tasks in the cgroup.

int can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
struct task_struct *task)
(cgroup_mutex held by caller)

Expand All @@ -492,8 +492,8 @@ unspecified task can be moved into the cgroup. Note that this isn't
called on a fork. If this method returns 0 (success) then this should
remain valid while the caller holds cgroup_mutex.

void attach(struct cgroup_subsys *ss, struct cgroup *cont,
struct cgroup *old_cont, struct task_struct *task)
void attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
struct cgroup *old_cgrp, struct task_struct *task)

Called after the task has been attached to the cgroup, to allow any
post-attachment activity that requires memory allocations or blocking.
Expand All @@ -505,9 +505,9 @@ registration for all existing tasks.

void exit(struct cgroup_subsys *ss, struct task_struct *task)

Called during task exit
Called during task exit.

int populate(struct cgroup_subsys *ss, struct cgroup *cont)
int populate(struct cgroup_subsys *ss, struct cgroup *cgrp)

Called after creation of a cgroup to allow a subsystem to populate
the cgroup directory with file entries. The subsystem should make
Expand All @@ -516,7 +516,7 @@ include/linux/cgroup.h for details). Note that although this
method can return an error code, the error code is currently not
always handled well.

void post_clone(struct cgroup_subsys *ss, struct cgroup *cont)
void post_clone(struct cgroup_subsys *ss, struct cgroup *cgrp)

Called at the end of cgroup_clone() to do any paramater
initialization which might be required before a task could attach. For
Expand Down
24 changes: 9 additions & 15 deletions trunk/Documentation/controllers/memory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo,
mega or gigabytes.

# cat /cgroups/0/memory.limit_in_bytes
4194304 Bytes
4194304

NOTE: The interface has now changed to display the usage in bytes
instead of pages

We can check the usage:
# cat /cgroups/0/memory.usage_in_bytes
1216512 Bytes
1216512

A successful write to this file does not guarantee a successful set of
this limit to the value written into the file. This can be due to a
Expand All @@ -187,7 +187,7 @@ this file after a write to guarantee the value committed by the kernel.

# echo -n 1 > memory.limit_in_bytes
# cat memory.limit_in_bytes
4096 Bytes
4096

The memory.failcnt field gives the number of times that the cgroup limit was
exceeded.
Expand Down Expand Up @@ -233,13 +233,6 @@ cgroup might have some charge associated with it, even though all
tasks have migrated away from it. Such charges are automatically dropped at
rmdir() if there are no tasks.

4.4 Choosing what to account -- Page Cache (unmapped) vs RSS (mapped)?

The type of memory accounted by the cgroup can be limited to just
mapped pages by writing "1" to memory.control_type field

echo -n 1 > memory.control_type

5. TODO

1. Add support for accounting huge pages (as a separate controller)
Expand All @@ -262,18 +255,19 @@ References
3. Emelianov, Pavel. Resource controllers based on process cgroups
http://lkml.org/lkml/2007/3/6/198
4. Emelianov, Pavel. RSS controller based on process cgroups (v2)
http://lkml.org/lkml/2007/4/9/74
http://lkml.org/lkml/2007/4/9/78
5. Emelianov, Pavel. RSS controller based on process cgroups (v3)
http://lkml.org/lkml/2007/5/30/244
6. Menage, Paul. Control Groups v10, http://lwn.net/Articles/236032/
7. Vaidyanathan, Srinivasan, Control Groups: Pagecache accounting and control
subsystem (v3), http://lwn.net/Articles/235534/
8. Singh, Balbir. RSS controller V2 test results (lmbench),
8. Singh, Balbir. RSS controller v2 test results (lmbench),
http://lkml.org/lkml/2007/5/17/232
9. Singh, Balbir. RSS controller V2 AIM9 results
9. Singh, Balbir. RSS controller v2 AIM9 results
http://lkml.org/lkml/2007/5/18/1
10. Singh, Balbir. Memory controller v6 results,
10. Singh, Balbir. Memory controller v6 test results,
http://lkml.org/lkml/2007/8/19/36
11. Singh, Balbir. Memory controller v6, http://lkml.org/lkml/2007/8/17/69
11. Singh, Balbir. Memory controller introduction (v6),
http://lkml.org/lkml/2007/8/17/69
12. Corbet, Jonathan, Controlling memory use in cgroups,
http://lwn.net/Articles/243795/
2 changes: 1 addition & 1 deletion trunk/Documentation/cpusets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ and name space for cpusets, with a minimum of additional kernel code.
The cpus and mems files in the root (top_cpuset) cpuset are
read-only. The cpus file automatically tracks the value of
cpu_online_map using a CPU hotplug notifier, and the mems file
automatically tracks the value of node_states[N_MEMORY]--i.e.,
automatically tracks the value of node_states[N_HIGH_MEMORY]--i.e.,
nodes with memory--using the cpuset_track_online_nodes() hook.


Expand Down
79 changes: 79 additions & 0 deletions trunk/Documentation/hwmon/adt7473
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Kernel driver adt7473
======================

Supported chips:
* Analog Devices ADT7473
Prefix: 'adt7473'
Addresses scanned: I2C 0x2C, 0x2D, 0x2E
Datasheet: Publicly available at the Analog Devices website

Author: Darrick J. Wong

Description
-----------

This driver implements support for the Analog Devices ADT7473 chip family.

The LM85 uses the 2-wire interface compatible with the SMBUS 2.0
specification. Using an analog to digital converter it measures three (3)
temperatures and two (2) voltages. It has three (3) 16-bit counters for
measuring fan speed. There are three (3) PWM outputs that can be used
to control fan speed.

A sophisticated control system for the PWM outputs is designed into the
LM85 that allows fan speed to be adjusted automatically based on any of the
three temperature sensors. Each PWM output is individually adjustable and
programmable. Once configured, the ADT7473 will adjust the PWM outputs in
response to the measured temperatures without further host intervention.
This feature can also be disabled for manual control of the PWM's.

Each of the measured inputs (voltage, temperature, fan speed) has
corresponding high/low limit values. The ADT7473 will signal an ALARM if
any measured value exceeds either limit.

The ADT7473 samples all inputs continuously. The driver will not read
the registers more often than once every other second. Further,
configuration data is only read once per minute.

Special Features
----------------

The ADT7473 have a 10-bit ADC and can therefore measure temperatures
with 0.25 degC resolution. Temperature readings can be configured either
for twos complement format or "Offset 64" format, wherein 63 is subtracted
from the raw value to get the temperature value.

The Analog Devices datasheet is very detailed and describes a procedure for
determining an optimal configuration for the automatic PWM control.

Hardware Configurations
-----------------------

The ADT7473 chips have an optional SMBALERT output that can be used to
signal the chipset in case a limit is exceeded or the temperature sensors
fail. Individual sensor interrupts can be masked so they won't trigger
SMBALERT. The SMBALERT output if configured replaces the PWM2 function.

Configuration Notes
-------------------

Besides standard interfaces driver adds the following:

* PWM Control

* pwm#_auto_point1_pwm and pwm#_auto_point1_temp and
* pwm#_auto_point2_pwm and pwm#_auto_point2_temp -

point1: Set the pwm speed at a lower temperature bound.
point2: Set the pwm speed at a higher temperature bound.

The ADT7473 will scale the pwm between the lower and higher pwm speed when
the temperature is between the two temperature boundaries. PWM values range
from 0 (off) to 255 (full speed).

Notes
-----

The NVIDIA binary driver presents an ADT7473 chip via an on-card i2c bus.
Unfortunately, they fail to set the i2c adapter class, so this driver may
fail to find the chip until the nvidia driver is patched.
6 changes: 4 additions & 2 deletions trunk/Documentation/hwmon/coretemp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ Kernel driver coretemp
Supported chips:
* All Intel Core family
Prefix: 'coretemp'
CPUID: family 0x6, models 0xe, 0xf, 0x16
CPUID: family 0x6, models 0xe, 0xf, 0x16, 0x17
Datasheet: Intel 64 and IA-32 Architectures Software Developer's Manual
Volume 3A: System Programming Guide
http://softwarecommunity.intel.com/Wiki/Mobility/720.htm

Author: Rudolf Marek

Expand All @@ -25,7 +26,8 @@ may be raised, if the temperature grows enough (more than TjMax) to trigger
the Out-Of-Spec bit. Following table summarizes the exported sysfs files:

temp1_input - Core temperature (in millidegrees Celsius).
temp1_crit - Maximum junction temperature (in millidegrees Celsius).
temp1_max - All cooling devices should be turned on (on Core2).
temp1_crit - Maximum junction temperature (in millidegrees Celsius).
temp1_crit_alarm - Set when Out-of-spec bit is set, never clears.
Correct CPU operation is no longer guaranteed.
temp1_label - Contains string "Core X", where X is processor
Expand Down
3 changes: 2 additions & 1 deletion trunk/Documentation/i2c/busses/i2c-i801
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Supported adapters:
* Intel 82801G (ICH7)
* Intel 631xESB/632xESB (ESB2)
* Intel 82801H (ICH8)
* Intel ICH9
* Intel 82801I (ICH9)
* Intel Tolapai
* Intel ICH10
Datasheets: Publicly available at the Intel website

Authors:
Expand Down
Loading

0 comments on commit 5f0ff8d

Please sign in to comment.