Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75466
b: refs/heads/master
c: 4fd3670
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jan 14, 2008
1 parent 2b53fe3 commit 88d0e2c
Show file tree
Hide file tree
Showing 2,378 changed files with 43,215 additions and 34,770 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: 4ff891eb3d3dd6854f11d616c6397a0e403f4e88
refs/heads/master: 4fd3670eb1d3c33e8952cf1e79edbb2d517dcfb5
2 changes: 2 additions & 0 deletions trunk/Documentation/00-INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ mtrr.txt
- how to use PPro Memory Type Range Registers to increase performance.
mutex-design.txt
- info on the generic mutex subsystem.
namespaces/
- directory with various information about namespaces
nbd.txt
- info on a TCP implementation of a network block device.
netlabel/
Expand Down
14 changes: 14 additions & 0 deletions trunk/Documentation/ABI/testing/sysfs-kernel-uids
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
What: /sys/kernel/uids/<uid>/cpu_shares
Date: December 2007
Contact: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Description:
The /sys/kernel/uids/<uid>/cpu_shares tunable is used
to set the cpu bandwidth a user is allowed. This is a
propotional value. What that means is that if there
are two users logged in, each with an equal number of
shares, then they will get equal CPU bandwidth. Another
example would be, if User A has shares = 1024 and user
B has shares = 2048, User B will get twice the CPU
bandwidth user A will. For more details refer
Documentation/sched-design-CFS.txt
2 changes: 1 addition & 1 deletion trunk/Documentation/DocBook/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
procfs-guide.xml writing_usb_driver.xml \
kernel-api.xml filesystems.xml lsm.xml usb.xml \
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
genericirq.xml s390-drivers.xml
genericirq.xml s390-drivers.xml uio-howto.xml

###
# The build process is as follows (targets):
Expand Down
90 changes: 32 additions & 58 deletions trunk/Documentation/DocBook/uio-howto.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
</abstract>

<revhistory>
<revision>
<revnumber>0.4</revnumber>
<date>2007-11-26</date>
<authorinitials>hjk</authorinitials>
<revremark>Removed section about uio_dummy.</revremark>
</revision>
<revision>
<revnumber>0.3</revnumber>
<date>2007-04-29</date>
Expand Down Expand Up @@ -94,6 +100,26 @@ interested in translating it, please email me
user space. This simplifies development and reduces the risk of
serious bugs within a kernel module.
</para>
<para>
Please note that UIO is not an universal driver interface. Devices
that are already handled well by other kernel subsystems (like
networking or serial or USB) are no candidates for an UIO driver.
Hardware that is ideally suited for an UIO driver fulfills all of
the following:
</para>
<itemizedlist>
<listitem>
<para>The device has memory that can be mapped. The device can be
controlled completely by writing to this memory.</para>
</listitem>
<listitem>
<para>The device usually generates interrupts.</para>
</listitem>
<listitem>
<para>The device does not fit into one of the standard kernel
subsystems.</para>
</listitem>
</itemizedlist>
</sect1>

<sect1 id="thanks">
Expand Down Expand Up @@ -174,8 +200,9 @@ interested in translating it, please email me
For cards that don't generate interrupts but need to be
polled, there is the possibility to set up a timer that
triggers the interrupt handler at configurable time intervals.
See <filename>drivers/uio/uio_dummy.c</filename> for an
example of this technique.
This interrupt simulation is done by calling
<function>uio_event_notify()</function>
from the timer's event handler.
</para>

<para>
Expand Down Expand Up @@ -263,63 +290,11 @@ offset = N * getpagesize();
</sect1>
</chapter>

<chapter id="using-uio_dummy" xreflabel="Using uio_dummy">
<?dbhtml filename="using-uio_dummy.html"?>
<title>Using uio_dummy</title>
<para>
Well, there is no real use for uio_dummy. Its only purpose is
to test most parts of the UIO system (everything except
hardware interrupts), and to serve as an example for the
kernel module that you will have to write yourself.
</para>

<sect1 id="what_uio_dummy_does">
<title>What uio_dummy does</title>
<para>
The kernel module <filename>uio_dummy.ko</filename> creates a
device that uses a timer to generate periodic interrupts. The
interrupt handler does nothing but increment a counter. The
driver adds two custom attributes, <varname>count</varname>
and <varname>freq</varname>, that appear under
<filename>/sys/devices/platform/uio_dummy/</filename>.
</para>

<para>
The attribute <varname>count</varname> can be read and
written. The associated file
<filename>/sys/devices/platform/uio_dummy/count</filename>
appears as a normal text file and contains the total number of
timer interrupts. If you look at it (e.g. using
<function>cat</function>), you'll notice it is slowly counting
up.
</para>

<para>
The attribute <varname>freq</varname> can be read and written.
The content of
<filename>/sys/devices/platform/uio_dummy/freq</filename>
represents the number of system timer ticks between two timer
interrupts. The default value of <varname>freq</varname> is
the value of the kernel variable <varname>HZ</varname>, which
gives you an interval of one second. Lower values will
increase the frequency. Try the following:
</para>
<programlisting format="linespecific">
cd /sys/devices/platform/uio_dummy/
echo 100 > freq
</programlisting>
<para>
Use <function>cat count</function> to see how the interrupt
frequency changes.
</para>
</sect1>
</chapter>

<chapter id="custom_kernel_module" xreflabel="Writing your own kernel module">
<?dbhtml filename="custom_kernel_module.html"?>
<title>Writing your own kernel module</title>
<para>
Please have a look at <filename>uio_dummy.c</filename> as an
Please have a look at <filename>uio_cif.c</filename> as an
example. The following paragraphs explain the different
sections of this file.
</para>
Expand Down Expand Up @@ -354,9 +329,8 @@ See the description below for details.
interrupt, it's your modules task to determine the irq number during
initialization. If you don't have a hardware generated interrupt but
want to trigger the interrupt handler in some other way, set
<varname>irq</varname> to <varname>UIO_IRQ_CUSTOM</varname>. The
uio_dummy module does this as it triggers the event mechanism in a timer
routine. If you had no interrupt at all, you could set
<varname>irq</varname> to <varname>UIO_IRQ_CUSTOM</varname>.
If you had no interrupt at all, you could set
<varname>irq</varname> to <varname>UIO_IRQ_NONE</varname>, though this
rarely makes sense.
</para></listitem>
Expand Down
4 changes: 2 additions & 2 deletions trunk/Documentation/SubmittingPatches
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ section Linus Computer Science 101.
Nuff said. If your code deviates too much from this, it is likely
to be rejected without further review, and without comment.

Once significant exception is when moving code from one file to
another in this case you should not modify the moved code at all in
One significant exception is when moving code from one file to
another -- in this case you should not modify the moved code at all in
the same patch which moves it. This clearly delineates the act of
moving the code and your changes. This greatly aids review of the
actual differences and allows tools to better track the history of
Expand Down
43 changes: 42 additions & 1 deletion trunk/Documentation/accounting/getdelays.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <linux/genetlink.h>
#include <linux/taskstats.h>
#include <linux/cgroupstats.h>

/*
* Generic macros for dealing with netlink sockets. Might be duplicated
Expand Down Expand Up @@ -78,6 +79,7 @@ static void usage(void)
fprintf(stderr, " -i: print IO accounting (works only with -p)\n");
fprintf(stderr, " -l: listen forever\n");
fprintf(stderr, " -v: debug on\n");
fprintf(stderr, " -C: container path\n");
}

/*
Expand Down Expand Up @@ -212,6 +214,14 @@ void task_context_switch_counts(struct taskstats *t)
t->nvcsw, t->nivcsw);
}

void print_cgroupstats(struct cgroupstats *c)
{
printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, "
"uninterruptible %llu\n", c->nr_sleeping, c->nr_io_wait,
c->nr_running, c->nr_stopped, c->nr_uninterruptible);
}


void print_ioacct(struct taskstats *t)
{
printf("%s: read=%llu, write=%llu, cancelled_write=%llu\n",
Expand Down Expand Up @@ -239,11 +249,14 @@ int main(int argc, char *argv[])
int maskset = 0;
char *logfile = NULL;
int loop = 0;
int containerset = 0;
char containerpath[1024];
int cfd = 0;

struct msgtemplate msg;

while (1) {
c = getopt(argc, argv, "qdiw:r:m:t:p:vl");
c = getopt(argc, argv, "qdiw:r:m:t:p:vlC:");
if (c < 0)
break;

Expand All @@ -260,6 +273,10 @@ int main(int argc, char *argv[])
printf("printing task/process context switch rates\n");
print_task_context_switch_counts = 1;
break;
case 'C':
containerset = 1;
strncpy(containerpath, optarg, strlen(optarg) + 1);
break;
case 'w':
logfile = strdup(optarg);
printf("write to file %s\n", logfile);
Expand Down Expand Up @@ -334,6 +351,11 @@ int main(int argc, char *argv[])
}
}

if (tid && containerset) {
fprintf(stderr, "Select either -t or -C, not both\n");
goto err;
}

if (tid) {
rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET,
cmd_type, &tid, sizeof(__u32));
Expand All @@ -344,6 +366,20 @@ int main(int argc, char *argv[])
}
}

if (containerset) {
cfd = open(containerpath, O_RDONLY);
if (cfd < 0) {
perror("error opening container file");
goto err;
}
rc = send_cmd(nl_sd, id, mypid, CGROUPSTATS_CMD_GET,
CGROUPSTATS_CMD_ATTR_FD, &cfd, sizeof(__u32));
if (rc < 0) {
perror("error sending cgroupstats command");
goto err;
}
}

do {
int i;

Expand Down Expand Up @@ -422,6 +458,9 @@ int main(int argc, char *argv[])
}
break;

case CGROUPSTATS_TYPE_CGROUP_STATS:
print_cgroupstats(NLA_DATA(na));
break;
default:
fprintf(stderr, "Unknown nla_type %d\n",
na->nla_type);
Expand All @@ -443,5 +482,7 @@ int main(int argc, char *argv[])
close(nl_sd);
if (fd)
close(fd);
if (cfd)
close(cfd);
return 0;
}
9 changes: 0 additions & 9 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,6 @@ Who: Nick Piggin <npiggin@suse.de>

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

What: Interrupt only SA_* flags
When: September 2007
Why: The interrupt related SA_* flags are replaced by IRQF_* to move them
out of the signal namespace.

Who: Thomas Gleixner <tglx@linutronix.de>

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

What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment
When: October 2008
Why: The stacking of class devices makes these values misleading and
Expand Down
31 changes: 31 additions & 0 deletions trunk/Documentation/hwmon/sysfs-interface
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,37 @@ curr[1-*]_input Current input value
Unit: milliampere
RO

*********
* Power *
*********

power[1-*]_average Average power use
Unit: microWatt
RO

power[1-*]_average_highest Historical average maximum power use
Unit: microWatt
RO

power[1-*]_average_lowest Historical average minimum power use
Unit: microWatt
RO

power[1-*]_input Instantaneous power use
Unit: microWatt
RO

power[1-*]_input_highest Historical maximum power use
Unit: microWatt
RO

power[1-*]_input_lowest Historical minimum power use
Unit: microWatt
RO

power[1-*]_reset_history Reset input_highest, input_lowest,
average_highest and average_lowest.
WO

**********
* Alarms *
Expand Down
Loading

0 comments on commit 88d0e2c

Please sign in to comment.