Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91639
b: refs/heads/master
c: 607424d
h: refs/heads/master
i:
  91637: 1f20ba8
  91635: 1ae52a2
  91631: 05735be
v: v3
  • Loading branch information
Alexey Dobriyan authored and Herbert Xu committed Apr 21, 2008
1 parent 9afef6d commit afd327d
Show file tree
Hide file tree
Showing 1,378 changed files with 22,897 additions and 63,563 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: 98a1e95f9b5919b55c71a01546415074282d30d5
refs/heads/master: 607424d8583365418a337aa51e83403c8bd213ed
23 changes: 0 additions & 23 deletions trunk/Documentation/ABI/testing/sysfs-ibft

This file was deleted.

5 changes: 5 additions & 0 deletions trunk/Documentation/DocBook/kernel-api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ X!Earch/x86/kernel/mca_32.c
!Ikernel/acct.c
</chapter>

<chapter id="pmfuncs">
<title>Power Management</title>
!Ekernel/power/pm.c
</chapter>

<chapter id="devdrivers">
<title>Device drivers infrastructure</title>
<sect1><title>Device Drivers Base</title>
Expand Down
6 changes: 3 additions & 3 deletions trunk/Documentation/DocBook/kernel-locking.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
</para>
<para>
The third type is a semaphore
(<filename class="headerfile">include/linux/semaphore.h</filename>): it
(<filename class="headerfile">include/asm/semaphore.h</filename>): it
can have more than one holder at any time (the number decided at
initialization time), although it is most commonly used as a
single-holder lock (a mutex). If you can't get a semaphore, your
Expand Down Expand Up @@ -290,7 +290,7 @@
<para>
If you have a data structure which is only ever accessed from
user context, then you can use a simple semaphore
(<filename>linux/linux/semaphore.h</filename>) to protect it. This
(<filename>linux/asm/semaphore.h</filename>) to protect it. This
is the most trivial case: you initialize the semaphore to the number
of resources available (usually 1), and call
<function>down_interruptible()</function> to grab the semaphore, and
Expand Down Expand Up @@ -1656,7 +1656,7 @@ the amount of locking which needs to be done.
#include &lt;linux/slab.h&gt;
#include &lt;linux/string.h&gt;
+#include &lt;linux/rcupdate.h&gt;
#include &lt;linux/semaphore.h&gt;
#include &lt;asm/semaphore.h&gt;
#include &lt;asm/errno.h&gt;

struct object
Expand Down
72 changes: 2 additions & 70 deletions trunk/Documentation/cpusets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Portions Copyright (c) 2004-2006 Silicon Graphics, Inc.
Modified by Paul Jackson <pj@sgi.com>
Modified by Christoph Lameter <clameter@sgi.com>
Modified by Paul Menage <menage@google.com>
Modified by Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>

CONTENTS:
=========
Expand All @@ -21,8 +20,7 @@ CONTENTS:
1.5 What is memory_pressure ?
1.6 What is memory spread ?
1.7 What is sched_load_balance ?
1.8 What is sched_relax_domain_level ?
1.9 How do I use cpusets ?
1.8 How do I use cpusets ?
2. Usage Examples and Syntax
2.1 Basic Usage
2.2 Adding/removing cpus
Expand Down Expand Up @@ -499,73 +497,7 @@ the cpuset code to update these sched domains, it compares the new
partition requested with the current, and updates its sched domains,
removing the old and adding the new, for each change.


1.8 What is sched_relax_domain_level ?
--------------------------------------

In sched domain, the scheduler migrates tasks in 2 ways; periodic load
balance on tick, and at time of some schedule events.

When a task is woken up, scheduler try to move the task on idle CPU.
For example, if a task A running on CPU X activates another task B
on the same CPU X, and if CPU Y is X's sibling and performing idle,
then scheduler migrate task B to CPU Y so that task B can start on
CPU Y without waiting task A on CPU X.

And if a CPU run out of tasks in its runqueue, the CPU try to pull
extra tasks from other busy CPUs to help them before it is going to
be idle.

Of course it takes some searching cost to find movable tasks and/or
idle CPUs, the scheduler might not search all CPUs in the domain
everytime. In fact, in some architectures, the searching ranges on
events are limited in the same socket or node where the CPU locates,
while the load balance on tick searchs all.

For example, assume CPU Z is relatively far from CPU X. Even if CPU Z
is idle while CPU X and the siblings are busy, scheduler can't migrate
woken task B from X to Z since it is out of its searching range.
As the result, task B on CPU X need to wait task A or wait load balance
on the next tick. For some applications in special situation, waiting
1 tick may be too long.

The 'sched_relax_domain_level' file allows you to request changing
this searching range as you like. This file takes int value which
indicates size of searching range in levels ideally as follows,
otherwise initial value -1 that indicates the cpuset has no request.

-1 : no request. use system default or follow request of others.
0 : no search.
1 : search siblings (hyperthreads in a core).
2 : search cores in a package.
3 : search cpus in a node [= system wide on non-NUMA system]
( 4 : search nodes in a chunk of node [on NUMA system] )
( 5~ : search system wide [on NUMA system])

This file is per-cpuset and affect the sched domain where the cpuset
belongs to. Therefore if the flag 'sched_load_balance' of a cpuset
is disabled, then 'sched_relax_domain_level' have no effect since
there is no sched domain belonging the cpuset.

If multiple cpusets are overlapping and hence they form a single sched
domain, the largest value among those is used. Be careful, if one
requests 0 and others are -1 then 0 is used.

Note that modifying this file will have both good and bad effects,
and whether it is acceptable or not will be depend on your situation.
Don't modify this file if you are not sure.

If your situation is:
- The migration costs between each cpu can be assumed considerably
small(for you) due to your special application's behavior or
special hardware support for CPU cache etc.
- The searching cost doesn't have impact(for you) or you can make
the searching cost enough small by managing cpuset to compact etc.
- The latency is required even it sacrifices cache hit rate etc.
then increasing 'sched_relax_domain_level' would benefit you.


1.9 How do I use cpusets ?
1.8 How do I use cpusets ?
--------------------------

In order to minimize the impact of cpusets on critical kernel
Expand Down
15 changes: 0 additions & 15 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,6 @@ Why: Not used in-tree. The current out-of-tree users used it to
out-of-tree driver.
Who: Thomas Gleixner <tglx@linutronix.de>

----------------------------

What: usedac i386 kernel parameter
When: 2.6.27
Why: replaced by allowdac and no dac combination
Who: Glauber Costa <gcosta@redhat.com>

---------------------------

What: /sys/o2cb symlink
Expand All @@ -298,11 +291,3 @@ Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb
ocfs2-tools. 2 years should be sufficient time to phase in new versions
which know to look in /sys/fs/o2cb.
Who: ocfs2-devel@oss.oracle.com

---------------------------

What: asm/semaphore.h
When: 2.6.26
Why: Implementation became generic; users should now include
linux/semaphore.h instead.
Who: Matthew Wilcox <willy@linux.intel.com>
9 changes: 2 additions & 7 deletions trunk/Documentation/filesystems/sysfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,8 @@ implementations:
Recall that an attribute should only be exporting one value, or an
array of similar values, so this shouldn't be that expensive.

This allows userspace to do partial reads and forward seeks
arbitrarily over the entire file at will. If userspace seeks back to
zero or does a pread(2) with an offset of '0' the show() method will
be called again, rearmed, to fill the buffer.
This allows userspace to do partial reads and seeks arbitrarily over
the entire file at will.

- On write(2), sysfs expects the entire buffer to be passed during the
first write. Sysfs then passes the entire buffer to the store()
Expand All @@ -194,9 +192,6 @@ implementations:

Other notes:

- Writing causes the show() method to be rearmed regardless of current
file position.

- The buffer will always be PAGE_SIZE bytes in length. On i386, this
is 4096.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#include <linux/init.h>
#include <linux/device.h>
#include <linux/string.h>
#include <linux/firmware.h>

#include "linux/firmware.h"

static struct device ghost_device = {
.bus_id = "ghost0",
Expand All @@ -30,52 +31,46 @@ static void sample_firmware_load(char *firmware, int size)
static void sample_probe_default(void)
{
/* uses the default method to get the firmware */
const struct firmware *fw_entry;
int retval;

printk(KERN_INFO "firmware_sample_driver: "
"a ghost device got inserted :)\n");
const struct firmware *fw_entry;
printk(KERN_INFO "firmware_sample_driver: a ghost device got inserted :)\n");

retval = request_firmware(&fw_entry, "sample_driver_fw", &ghost_device);
if (retval) {
if(request_firmware(&fw_entry, "sample_driver_fw", &ghost_device)!=0)
{
printk(KERN_ERR
"firmware_sample_driver: Firmware not available\n");
return;
}

sample_firmware_load(fw_entry->data, fw_entry->size);

release_firmware(fw_entry);

/* finish setting up the device */
}

static void sample_probe_specific(void)
{
int retval;
/* Uses some specific hotplug support to get the firmware from
* userspace directly into the hardware, or via some sysfs file */

/* NOTE: This currently doesn't work */

printk(KERN_INFO "firmware_sample_driver: "
"a ghost device got inserted :)\n");
printk(KERN_INFO "firmware_sample_driver: a ghost device got inserted :)\n");

retval = request_firmware(NULL, "sample_driver_fw", &ghost_device);
if (retval) {
if(request_firmware(NULL, "sample_driver_fw", &ghost_device)!=0)
{
printk(KERN_ERR
"firmware_sample_driver: Firmware load failed\n");
return;
}

/* request_firmware blocks until userspace finished, so at
* this point the firmware should be already in the device */

/* finish setting up the device */
}
static void sample_probe_async_cont(const struct firmware *fw, void *context)
{
if (!fw) {
if(!fw){
printk(KERN_ERR
"firmware_sample_driver: firmware load failed\n");
return;
Expand All @@ -85,18 +80,19 @@ static void sample_probe_async_cont(const struct firmware *fw, void *context)
(char *)context);
sample_firmware_load(fw->data, fw->size);
}

static void sample_probe_async(void)
{
/* Let's say that I can't sleep */
int error;
error = request_firmware_nowait(THIS_MODULE, FW_ACTION_NOHOTPLUG,
"sample_driver_fw", &ghost_device,
"my device pointer",
sample_probe_async_cont);
if (error)
printk(KERN_ERR "firmware_sample_driver:"
error = request_firmware_nowait (THIS_MODULE, FW_ACTION_NOHOTPLUG,
"sample_driver_fw", &ghost_device,
"my device pointer",
sample_probe_async_cont);
if(error){
printk(KERN_ERR
"firmware_sample_driver:"
" request_firmware_nowait failed\n");
}
}

static int sample_init(void)
Expand All @@ -109,12 +105,11 @@ static int sample_init(void)
sample_probe_async();
return 0;
}

static void __exit sample_exit(void)
{
}

module_init(sample_init);
module_exit(sample_exit);
module_init (sample_init);
module_exit (sample_exit);

MODULE_LICENSE("GPL");
Loading

0 comments on commit afd327d

Please sign in to comment.