Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350543
b: refs/heads/master
c: 142c090
h: refs/heads/master
i:
  350541: c31cc4e
  350539: b26f132
  350535: 5ce2234
  350527: 233c067
v: v3
  • Loading branch information
Vivien Didelot authored and Guenter Roeck committed Jan 26, 2013
1 parent 372f51d commit 7d31446
Show file tree
Hide file tree
Showing 1,028 changed files with 12,802 additions and 33,264 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: 8a3a11f91def34424b1995cb54ccd658efde8568
refs/heads/master: 142c090184ac7f9763c5d22509405da3486f9801

This file was deleted.

47 changes: 0 additions & 47 deletions trunk/Documentation/ABI/testing/sysfs-platform-ts5500

This file was deleted.

37 changes: 5 additions & 32 deletions trunk/Documentation/PCI/MSI-HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,42 +127,15 @@ on the number of vectors that can be allocated; pci_enable_msi_block()
returns as soon as it finds any constraint that doesn't allow the
call to succeed.

4.2.3 pci_enable_msi_block_auto

int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *count)

This variation on pci_enable_msi() call allows a device driver to request
the maximum possible number of MSIs. The MSI specification only allows
interrupts to be allocated in powers of two, up to a maximum of 2^5 (32).

If this function returns a positive number, it indicates that it has
succeeded and the returned value is the number of allocated interrupts. In
this case, the function enables MSI on this device and updates dev->irq to
be the lowest of the new interrupts assigned to it. The other interrupts
assigned to the device are in the range dev->irq to dev->irq + returned
value - 1.

If this function returns a negative number, it indicates an error and
the driver should not attempt to request any more MSI interrupts for
this device.

If the device driver needs to know the number of interrupts the device
supports it can pass the pointer count where that number is stored. The
device driver must decide what action to take if pci_enable_msi_block_auto()
succeeds, but returns a value less than the number of interrupts supported.
If the device driver does not need to know the number of interrupts
supported, it can set the pointer count to NULL.

4.2.4 pci_disable_msi
4.2.3 pci_disable_msi

void pci_disable_msi(struct pci_dev *dev)

This function should be used to undo the effect of pci_enable_msi() or
pci_enable_msi_block() or pci_enable_msi_block_auto(). Calling it restores
dev->irq to the pin-based interrupt number and frees the previously
allocated message signaled interrupt(s). The interrupt may subsequently be
assigned to another device, so drivers should not cache the value of
dev->irq.
pci_enable_msi_block(). Calling it restores dev->irq to the pin-based
interrupt number and frees the previously allocated message signaled
interrupt(s). The interrupt may subsequently be assigned to another
device, so drivers should not cache the value of dev->irq.

Before calling this function, a device driver must always call free_irq()
on any interrupt for which it previously called request_irq().
Expand Down
2 changes: 0 additions & 2 deletions trunk/Documentation/atomic_ops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ This performs an atomic exchange operation on the atomic variable v, setting
the given new value. It returns the old value that the atomic variable v had
just before the operation.

atomic_xchg requires explicit memory barriers around the operation.

int atomic_cmpxchg(atomic_t *v, int old, int new);

This performs an atomic compare exchange operation on the atomic value v,
Expand Down
2 changes: 2 additions & 0 deletions trunk/Documentation/cgroups/00-INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ blkio-controller.txt
- Description for Block IO Controller, implementation and usage details.
cgroups.txt
- Control Groups definition, implementation details, examples and API.
cgroup_event_listener.c
- A user program for cgroup listener.
cpuacct.txt
- CPU Accounting Controller; account CPU usage for groups of tasks.
cpusets.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

#include <assert.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <libgen.h>
Expand All @@ -16,7 +15,7 @@

#include <sys/eventfd.h>

#define USAGE_STR "Usage: cgroup_event_listener <path-to-control-file> <args>"
#define USAGE_STR "Usage: cgroup_event_listener <path-to-control-file> <args>\n"

int main(int argc, char **argv)
{
Expand All @@ -27,33 +26,49 @@ int main(int argc, char **argv)
char line[LINE_MAX];
int ret;

if (argc != 3)
errx(1, "%s", USAGE_STR);
if (argc != 3) {
fputs(USAGE_STR, stderr);
return 1;
}

cfd = open(argv[1], O_RDONLY);
if (cfd == -1)
err(1, "Cannot open %s", argv[1]);
if (cfd == -1) {
fprintf(stderr, "Cannot open %s: %s\n", argv[1],
strerror(errno));
goto out;
}

ret = snprintf(event_control_path, PATH_MAX, "%s/cgroup.event_control",
dirname(argv[1]));
if (ret >= PATH_MAX)
errx(1, "Path to cgroup.event_control is too long");
if (ret >= PATH_MAX) {
fputs("Path to cgroup.event_control is too long\n", stderr);
goto out;
}

event_control = open(event_control_path, O_WRONLY);
if (event_control == -1)
err(1, "Cannot open %s", event_control_path);
if (event_control == -1) {
fprintf(stderr, "Cannot open %s: %s\n", event_control_path,
strerror(errno));
goto out;
}

efd = eventfd(0, 0);
if (efd == -1)
err(1, "eventfd() failed");
if (efd == -1) {
perror("eventfd() failed");
goto out;
}

ret = snprintf(line, LINE_MAX, "%d %d %s", efd, cfd, argv[2]);
if (ret >= LINE_MAX)
errx(1, "Arguments string is too long");
if (ret >= LINE_MAX) {
fputs("Arguments string is too long\n", stderr);
goto out;
}

ret = write(event_control, line, strlen(line) + 1);
if (ret == -1)
err(1, "Cannot write to cgroup.event_control");
if (ret == -1) {
perror("Cannot write to cgroup.event_control");
goto out;
}

while (1) {
uint64_t result;
Expand All @@ -62,21 +77,34 @@ int main(int argc, char **argv)
if (ret == -1) {
if (errno == EINTR)
continue;
err(1, "Cannot read from eventfd");
perror("Cannot read from eventfd");
break;
}
assert(ret == sizeof(result));

ret = access(event_control_path, W_OK);
if ((ret == -1) && (errno == ENOENT)) {
puts("The cgroup seems to have removed.");
break;
puts("The cgroup seems to have removed.");
ret = 0;
break;
}

if (ret == -1)
err(1, "cgroup.event_control is not accessible any more");
if (ret == -1) {
perror("cgroup.event_control "
"is not accessible any more");
break;
}

printf("%s %s: crossed\n", argv[1], argv[2]);
}

return 0;
out:
if (efd >= 0)
close(efd);
if (event_control >= 0)
close(event_control);
if (cfd >= 0)
close(cfd);

return (ret != 0);
}
3 changes: 2 additions & 1 deletion trunk/Documentation/cgroups/memcg_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.

9.10 Memory thresholds
Memory controller implements memory thresholds using cgroups notification
API. You can use tools/cgroup/cgroup_event_listener.c to test it.
API. You can use Documentation/cgroups/cgroup_event_listener.c to test
it.

(Shell-A) Create cgroup and run event listener
# mkdir /cgroup/A
Expand Down
1 change: 0 additions & 1 deletion trunk/Documentation/device-mapper/dm-raid.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,3 @@ Version History
1.2.0 Handle creation of arrays that contain failed devices.
1.3.0 Added support for RAID 10
1.3.1 Allow device replacement/rebuild for RAID 10
1.3.2 Fix/improve redundancy checking for RAID10
Loading

0 comments on commit 7d31446

Please sign in to comment.