Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260157
b: refs/heads/master
c: 284d952
h: refs/heads/master
i:
  260155: ea28cb1
v: v3
  • Loading branch information
Keith Packard committed Jun 9, 2011
1 parent a381528 commit 0960837
Show file tree
Hide file tree
Showing 1,234 changed files with 7,795 additions and 41,547 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: cf056edbbe70393faa6edd2b7859a14467910946
refs/heads/master: 284d952968d60cca156ef0c5efa62592b72264cb
2 changes: 1 addition & 1 deletion trunk/CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ N: Zach Brown
E: zab@zabbo.net
D: maestro pci sound

N: David Brownell
M: David Brownell
D: Kernel engineer, mentor, and friend. Maintained USB EHCI and
D: gadget layers, SPI subsystem, GPIO subsystem, and more than a few
D: device drivers. His encouragement also helped many engineers get
Expand Down

This file was deleted.

43 changes: 25 additions & 18 deletions trunk/Documentation/Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ Intro
=====

This document is designed to provide a list of the minimum levels of
software necessary to run the 3.0 kernels.
software necessary to run the 2.6 kernels, as well as provide brief
instructions regarding any other "Gotchas" users may encounter when
trying life on the Bleeding Edge. If upgrading from a pre-2.4.x
kernel, please consult the Changes file included with 2.4.x kernels for
additional information; most of that information will not be repeated
here. Basically, this document assumes that your system is already
functional and running at least 2.4.x kernels.

This document is originally based on my "Changes" file for 2.0.x kernels
and therefore owes credit to the same people as that file (Jared Mauch,
Expand All @@ -16,10 +22,11 @@ Upgrade to at *least* these software revisions before thinking you've
encountered a bug! If you're unsure what version you're currently
running, the suggested command should tell you.

Again, keep in mind that this list assumes you are already functionally
running a Linux kernel. Also, not all tools are necessary on all
systems; obviously, if you don't have any ISDN hardware, for example,
you probably needn't concern yourself with isdn4k-utils.
Again, keep in mind that this list assumes you are already
functionally running a Linux 2.4 kernel. Also, not all tools are
necessary on all systems; obviously, if you don't have any ISDN
hardware, for example, you probably needn't concern yourself with
isdn4k-utils.

o Gnu C 3.2 # gcc --version
o Gnu make 3.80 # make --version
Expand Down Expand Up @@ -107,12 +114,12 @@ Ksymoops

If the unthinkable happens and your kernel oopses, you may need the
ksymoops tool to decode it, but in most cases you don't.
It is generally preferred to build the kernel with CONFIG_KALLSYMS so
that it produces readable dumps that can be used as-is (this also
produces better output than ksymoops). If for some reason your kernel
is not build with CONFIG_KALLSYMS and you have no way to rebuild and
reproduce the Oops with that option, then you can still decode that Oops
with ksymoops.
In the 2.6 kernel it is generally preferred to build the kernel with
CONFIG_KALLSYMS so that it produces readable dumps that can be used as-is
(this also produces better output than ksymoops).
If for some reason your kernel is not build with CONFIG_KALLSYMS and
you have no way to rebuild and reproduce the Oops with that option, then
you can still decode that Oops with ksymoops.

Module-Init-Tools
-----------------
Expand Down Expand Up @@ -254,8 +261,8 @@ needs to be recompiled or (preferably) upgraded.
NFS-utils
---------

In ancient (2.4 and earlier) kernels, the nfs server needed to know
about any client that expected to be able to access files via NFS. This
In 2.4 and earlier kernels, the nfs server needed to know about any
client that expected to be able to access files via NFS. This
information would be given to the kernel by "mountd" when the client
mounted the filesystem, or by "exportfs" at system startup. exportfs
would take information about active clients from /var/lib/nfs/rmtab.
Expand All @@ -265,11 +272,11 @@ which is not always easy, particularly when trying to implement
fail-over. Even when the system is working well, rmtab suffers from
getting lots of old entries that never get removed.

With modern kernels we have the option of having the kernel tell mountd
when it gets a request from an unknown host, and mountd can give
appropriate export information to the kernel. This removes the
dependency on rmtab and means that the kernel only needs to know about
currently active clients.
With 2.6 we have the option of having the kernel tell mountd when it
gets a request from an unknown host, and mountd can give appropriate
export information to the kernel. This removes the dependency on
rmtab and means that the kernel only needs to know about currently
active clients.

To enable this new functionality, you need to:

Expand Down
4 changes: 2 additions & 2 deletions trunk/Documentation/CodingStyle
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,8 @@ ones already enabled by DEBUG.
Chapter 14: Allocating memory

The kernel provides the following general purpose memory allocators:
kmalloc(), kzalloc(), kcalloc(), vmalloc(), and vzalloc(). Please refer to
the API documentation for further information about them.
kmalloc(), kzalloc(), kcalloc(), and vmalloc(). Please refer to the API
documentation for further information about them.

The preferred form for passing a size of a struct is the following:

Expand Down
4 changes: 2 additions & 2 deletions trunk/Documentation/accounting/cgroupstats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ information will not be available.
To extract cgroup statistics a utility very similar to getdelays.c
has been developed, the sample output of the utility is shown below

~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup/a"
~/balbir/cgroupstats # ./getdelays -C "/cgroup/a"
sleeping 1, blocked 0, running 1, stopped 0, uninterruptible 0
~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup"
~/balbir/cgroupstats # ./getdelays -C "/cgroup"
sleeping 155, blocked 0, running 1, stopped 0, uninterruptible 2
41 changes: 19 additions & 22 deletions trunk/Documentation/cgroups/blkio-controller.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,16 @@ cgroups. Here is what you can do.
- Enable group scheduling in CFQ
CONFIG_CFQ_GROUP_IOSCHED=y

- Compile and boot into kernel and mount IO controller (blkio); see
cgroups.txt, Why are cgroups needed?.
- Compile and boot into kernel and mount IO controller (blkio).

mount -t tmpfs cgroup_root /sys/fs/cgroup
mkdir /sys/fs/cgroup/blkio
mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
mount -t cgroup -o blkio none /cgroup

- Create two cgroups
mkdir -p /sys/fs/cgroup/blkio/test1/ /sys/fs/cgroup/blkio/test2
mkdir -p /cgroup/test1/ /cgroup/test2

- Set weights of group test1 and test2
echo 1000 > /sys/fs/cgroup/blkio/test1/blkio.weight
echo 500 > /sys/fs/cgroup/blkio/test2/blkio.weight
echo 1000 > /cgroup/test1/blkio.weight
echo 500 > /cgroup/test2/blkio.weight

- Create two same size files (say 512MB each) on same disk (file1, file2) and
launch two dd threads in different cgroup to read those files.
Expand All @@ -49,12 +46,12 @@ cgroups. Here is what you can do.
echo 3 > /proc/sys/vm/drop_caches

dd if=/mnt/sdb/zerofile1 of=/dev/null &
echo $! > /sys/fs/cgroup/blkio/test1/tasks
cat /sys/fs/cgroup/blkio/test1/tasks
echo $! > /cgroup/test1/tasks
cat /cgroup/test1/tasks

dd if=/mnt/sdb/zerofile2 of=/dev/null &
echo $! > /sys/fs/cgroup/blkio/test2/tasks
cat /sys/fs/cgroup/blkio/test2/tasks
echo $! > /cgroup/test2/tasks
cat /cgroup/test2/tasks

- At macro level, first dd should finish first. To get more precise data, keep
on looking at (with the help of script), at blkio.disk_time and
Expand All @@ -71,13 +68,13 @@ Throttling/Upper Limit policy
- Enable throttling in block layer
CONFIG_BLK_DEV_THROTTLING=y

- Mount blkio controller (see cgroups.txt, Why are cgroups needed?)
mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
- Mount blkio controller
mount -t cgroup -o blkio none /cgroup/blkio

- Specify a bandwidth rate on particular device for root group. The format
for policy is "<major>:<minor> <byes_per_second>".

echo "8:16 1048576" > /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device
echo "8:16 1048576" > /cgroup/blkio/blkio.read_bps_device

Above will put a limit of 1MB/second on reads happening for root group
on device having major/minor number 8:16.
Expand All @@ -90,7 +87,7 @@ Throttling/Upper Limit policy
1024+0 records out
4194304 bytes (4.2 MB) copied, 4.0001 s, 1.0 MB/s

Limits for writes can be put using blkio.throttle.write_bps_device file.
Limits for writes can be put using blkio.write_bps_device file.

Hierarchical Cgroups
====================
Expand All @@ -111,7 +108,7 @@ Hierarchical Cgroups
CFQ and throttling will practically treat all groups at same level.

pivot
/ / \ \
/ | \ \
root test1 test2 test3

Down the line we can implement hierarchical accounting/control support
Expand Down Expand Up @@ -152,7 +149,7 @@ Proportional weight policy files

Following is the format.

# echo dev_maj:dev_minor weight > blkio.weight_device
#echo dev_maj:dev_minor weight > /path/to/cgroup/blkio.weight_device
Configure weight=300 on /dev/sdb (8:16) in this cgroup
# echo 8:16 300 > blkio.weight_device
# cat blkio.weight_device
Expand Down Expand Up @@ -286,28 +283,28 @@ Throttling/Upper limit policy files
specified in bytes per second. Rules are per deivce. Following is
the format.

echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.throttle.read_bps_device
echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.read_bps_device

- blkio.throttle.write_bps_device
- Specifies upper limit on WRITE rate to the device. IO rate is
specified in bytes per second. Rules are per deivce. Following is
the format.

echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.throttle.write_bps_device
echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.write_bps_device

- blkio.throttle.read_iops_device
- Specifies upper limit on READ rate from the device. IO rate is
specified in IO per second. Rules are per deivce. Following is
the format.

echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.throttle.read_iops_device
echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.read_iops_device

- blkio.throttle.write_iops_device
- Specifies upper limit on WRITE rate to the device. IO rate is
specified in io per second. Rules are per deivce. Following is
the format.

echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.throttle.write_iops_device
echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.write_iops_device

Note: If both BW and IOPS rules are specified for a device, then IO is
subjectd to both the constraints.
Expand Down
Loading

0 comments on commit 0960837

Please sign in to comment.