Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87311
b: refs/heads/master
c: d0ce46f
h: refs/heads/master
i:
  87309: bc5cd08
  87307: a39bc1b
  87303: e318dd9
  87295: 47bd6e8
v: v3
  • Loading branch information
Zhang Rui authored and Len Brown committed Feb 23, 2008
1 parent 52e6c72 commit 6acd607
Show file tree
Hide file tree
Showing 1,195 changed files with 14,423 additions and 22,960 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: f2005e1777614b65d1970924ca1b61e4caccb0d3
refs/heads/master: d0ce46f550ebbd765881e8c48f43b66285d798b0
2 changes: 0 additions & 2 deletions trunk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,3 @@ cscope.*

*.orig
*.rej
*~
\#*#
2 changes: 2 additions & 0 deletions trunk/Documentation/00-INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ i386/
- directory with info about Linux on Intel 32 bit architecture.
ia64/
- directory with info about Linux on Intel 64 bit architecture.
ide.txt
- important info for users of ATA devices (IDE/EIDE disks and CD-ROMS).
infiniband/
- directory with documents concerning Linux InfiniBand support.
initrd.txt
Expand Down
2 changes: 0 additions & 2 deletions trunk/Documentation/DocBook/kernel-api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,12 @@ X!Edrivers/pnp/system.c
<chapter id="blkdev">
<title>Block Devices</title>
!Eblock/blk-core.c
!Iblock/blk-core.c
!Eblock/blk-map.c
!Iblock/blk-sysfs.c
!Eblock/blk-settings.c
!Eblock/blk-exec.c
!Eblock/blk-barrier.c
!Eblock/blk-tag.c
!Iblock/blk-tag.c
</chapter>

<chapter id="chrdev">
Expand Down
3 changes: 1 addition & 2 deletions trunk/Documentation/atomic_ops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ 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
unless it fails (returns 0).
atomic_add_unless requires explicit memory barriers around the operation.

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

Expand Down
18 changes: 9 additions & 9 deletions trunk/Documentation/cdrom/ide-cd
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This driver provides the following features:
---------------

0. The ide-cd relies on the ide disk driver. See
Documentation/ide/ide.txt for up-to-date information on the ide
Documentation/ide.txt for up-to-date information on the ide
driver.

1. Make sure that the ide and ide-cd drivers are compiled into the
Expand All @@ -64,7 +64,7 @@ This driver provides the following features:

Depending on what type of IDE interface you have, you may need to
specify additional configuration options. See
Documentation/ide/ide.txt.
Documentation/ide.txt.

2. You should also ensure that the iso9660 filesystem is either
compiled into the kernel or available as a loadable module. You
Expand All @@ -84,7 +84,7 @@ This driver provides the following features:
on the primary IDE interface are called `hda' and `hdb',
respectively. The drives on the secondary interface are called
`hdc' and `hdd'. (Interfaces at other locations get other letters
in the third position; see Documentation/ide/ide.txt.)
in the third position; see Documentation/ide.txt.)

If you want your CDROM drive to be found automatically by the
driver, you should make sure your IDE interface uses either the
Expand All @@ -93,7 +93,7 @@ This driver provides the following features:
be jumpered as `master'. (If for some reason you cannot configure
your system in this manner, you can probably still use the driver.
You may have to pass extra configuration information to the kernel
when you boot, however. See Documentation/ide/ide.txt for more
when you boot, however. See Documentation/ide.txt for more
information.)

4. Boot the system. If the drive is recognized, you should see a
Expand Down Expand Up @@ -201,7 +201,7 @@ TEST
This section discusses some common problems encountered when trying to
use the driver, and some possible solutions. Note that if you are
experiencing problems, you should probably also review
Documentation/ide/ide.txt for current information about the underlying
Documentation/ide.txt for current information about the underlying
IDE support code. Some of these items apply only to earlier versions
of the driver, but are mentioned here for completeness.

Expand All @@ -211,15 +211,15 @@ from the driver.
a. Drive is not detected during booting.

- Review the configuration instructions above and in
Documentation/ide/ide.txt, and check how your hardware is
Documentation/ide.txt, and check how your hardware is
configured.

- If your drive is the only device on an IDE interface, it should
be jumpered as master, if at all possible.

- If your IDE interface is not at the standard addresses of 0x170
or 0x1f0, you'll need to explicitly inform the driver using a
lilo option. See Documentation/ide/ide.txt. (This feature was
lilo option. See Documentation/ide.txt. (This feature was
added around kernel version 1.3.30.)

- If the autoprobing is not finding your drive, you can tell the
Expand All @@ -245,7 +245,7 @@ a. Drive is not detected during booting.
Support for some interfaces needing extra initialization is
provided in later 1.3.x kernels. You may need to turn on
additional kernel configuration options to get them to work;
see Documentation/ide/ide.txt.
see Documentation/ide.txt.

Even if support is not available for your interface, you may be
able to get it to work with the following procedure. First boot
Expand Down Expand Up @@ -299,7 +299,7 @@ c. System hangups.
be worked around by specifying the `serialize' option when
booting. Recent kernels should be able to detect the need for
this automatically in most cases, but the detection is not
foolproof. See Documentation/ide/ide.txt for more information
foolproof. See Documentation/ide.txt for more information
about the `serialize' option and the CMD640B.

- Note that many MS-DOS CDROM drivers will work with such buggy
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, it's just a
With ability to write pids directly to resource classes, its just a
matter of :

# echo pid > /mnt/network/<new_class>/tasks
Expand Down Expand Up @@ -227,13 +227,10 @@ 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
- 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)
- notify_on_release flag: run /sbin/cgroup_release_agent on exit?

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 @@ -260,7 +257,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 cgrp_link_list field, and a list of
a single cgroup on its cont_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 @@ -274,6 +271,9 @@ 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 releasable tasks
(plus whatever files added by the attached subsystems)
notify_on_release release_agent tasks
(plus whatever files are added by the attached subsystems)

Now attach your shell to this cgroup:
# /bin/echo $$ > tasks
Expand Down Expand Up @@ -404,13 +404,19 @@ 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.
entry in cgroup->subsys[] this subsystem should be
managing. Initialized by cgroup_register_subsys(); prior to this
it should be initialized to -1

- name: should be initialized to a unique subsystem name. Should be
no longer than MAX_CGROUP_TYPE_NAMELEN.
- 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.

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

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 @@ -428,6 +434,8 @@ 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 @@ -436,7 +444,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 @@ -447,8 +455,7 @@ 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_subsys *ss,
struct cgroup *cgrp)
struct cgroup_subsys_state *create(struct cgroup *cont)
(cgroup_mutex held by caller)

Called to create a subsystem state object for a cgroup. The
Expand All @@ -463,7 +470,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_subsys *ss, struct cgroup *cgrp)
void destroy(struct cgroup *cont)
(cgroup_mutex held by caller)

The cgroup system is about to destroy the passed cgroup; the subsystem
Expand All @@ -474,14 +481,7 @@ 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).

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,
int can_attach(struct cgroup_subsys *ss, struct cgroup *cont,
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 *cgrp,
struct cgroup *old_cgrp, struct task_struct *task)
void attach(struct cgroup_subsys *ss, struct cgroup *cont,
struct cgroup *old_cont, 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 *cgrp)
int populate(struct cgroup_subsys *ss, struct cgroup *cont)

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 *cgrp)
void post_clone(struct cgroup_subsys *ss, struct cgroup *cont)

Called at the end of cgroup_clone() to do any paramater
initialization which might be required before a task could attach. For
Expand Down
Loading

0 comments on commit 6acd607

Please sign in to comment.