Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106491
b: refs/heads/master
c: c5b61d5
h: refs/heads/master
i:
  106489: c0b0038
  106487: 71697cc
v: v3
  • Loading branch information
Karsten Keil committed Jul 27, 2008
1 parent fc647be commit 74de1d2
Show file tree
Hide file tree
Showing 34 changed files with 224 additions and 421 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: 13ffc32eaf0b75a19bd8c3a8702faedde28853fe
refs/heads/master: c5b61d59a685b1227b8a994b52a9b0bd68dc8da8
1 change: 0 additions & 1 deletion trunk/Documentation/sound/alsa/ALSA-Configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
intel-mac-v3 Intel Mac Type 3
intel-mac-v4 Intel Mac Type 4
intel-mac-v5 Intel Mac Type 5
intel-mac-auto Intel Mac (detect type according to subsystem id)
macmini Intel Mac Mini (equivalent with type 3)
macbook Intel Mac Book (eq. type 5)
macbook-pro-v1 Intel Mac Book Pro 1st generation (eq. type 3)
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/isdn/hardware/mISDN/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ config MISDN_HFCPCI
tristate "Support for HFC PCI cards"
depends on MISDN
depends on PCI
depends on VIRT_TO_BUS
help
Enable support for cards with Cologne Chip AG's
HFC PCI chip.
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/isdn/mISDN/layer2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2030,7 +2030,7 @@ release_l2(struct layer2 *l2)
skb_queue_purge(&l2->down_queue);
ReleaseWin(l2);
if (test_bit(FLG_LAPD, &l2->flag)) {
release_tei(l2);
TEIrelease(l2);
if (l2->ch.st)
l2->ch.st->dev->D.ctrl(&l2->ch.st->dev->D,
CLOSE_CHANNEL, NULL);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/isdn/mISDN/layer2.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ extern int tei_l2(struct layer2 *, u_int, u_long arg);

/* from tei.c */
extern int l2_tei(struct layer2 *, u_int, u_long arg);
extern void release_tei(struct layer2 *);
extern void TEIrelease(struct layer2 *);
extern int TEIInit(u_int *);
extern void TEIFree(void);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/isdn/mISDN/tei.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ l2_tei(struct layer2 *l2, u_int cmd, u_long arg)
}

void
release_tei(struct layer2 *l2)
TEIrelease(struct layer2 *l2)
{
struct teimgr *tm = l2->tm;
u_long flags;
Expand Down
57 changes: 41 additions & 16 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#include <linux/time.h>
#include <linux/proc_fs.h>
#include <linux/stat.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/init.h>
#include <linux/capability.h>
#include <linux/file.h>
Expand Down Expand Up @@ -2403,17 +2402,44 @@ static int proc_base_fill_cache(struct file *filp, void *dirent,
#ifdef CONFIG_TASK_IO_ACCOUNTING
static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
{
struct proc_io_accounting acct = task->ioac;
unsigned long flags;

if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t = task;

task_io_accounting_add(&acct, &task->signal->ioac);
while_each_thread(task, t)
task_io_accounting_add(&acct, &t->ioac);

unlock_task_sighand(task, &flags);
u64 rchar, wchar, syscr, syscw;
struct task_io_accounting ioac;

rchar = task->rchar;
wchar = task->wchar;
syscr = task->syscr;
syscw = task->syscw;
memcpy(&ioac, &task->ioac, sizeof(ioac));

if (whole) {
unsigned long flags;

if (lock_task_sighand(task, &flags)) {
struct signal_struct *sig = task->signal;
struct task_struct *t = task;

rchar += sig->rchar;
wchar += sig->wchar;
syscr += sig->syscr;
syscw += sig->syscw;

ioac.read_bytes += sig->ioac.read_bytes;
ioac.write_bytes += sig->ioac.write_bytes;
ioac.cancelled_write_bytes +=
sig->ioac.cancelled_write_bytes;
while_each_thread(task, t) {
rchar += t->rchar;
wchar += t->wchar;
syscr += t->syscr;
syscw += t->syscw;

ioac.read_bytes += t->ioac.read_bytes;
ioac.write_bytes += t->ioac.write_bytes;
ioac.cancelled_write_bytes +=
t->ioac.cancelled_write_bytes;
}
unlock_task_sighand(task, &flags);
}
}
return sprintf(buffer,
"rchar: %llu\n"
Expand All @@ -2423,10 +2449,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
"read_bytes: %llu\n"
"write_bytes: %llu\n"
"cancelled_write_bytes: %llu\n",
acct.chr.rchar, acct.chr.wchar,
acct.chr.syscr, acct.chr.syscw,
acct.blk.read_bytes, acct.blk.write_bytes,
acct.blk.cancelled_write_bytes);
rchar, wchar, syscr, syscw,
ioac.read_bytes, ioac.write_bytes,
ioac.cancelled_write_bytes);
}

static int proc_tid_io_accounting(struct task_struct *task, char *buffer)
Expand Down
19 changes: 13 additions & 6 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,10 @@ struct signal_struct {
unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
unsigned long inblock, oublock, cinblock, coublock;
struct proc_io_accounting ioac;
#ifdef CONFIG_TASK_XACCT
u64 rchar, wchar, syscr, syscw;
#endif
struct task_io_accounting ioac;

/*
* Cumulative ns of scheduled CPU time for dead threads in the
Expand Down Expand Up @@ -1253,7 +1256,11 @@ struct task_struct {

unsigned long ptrace_message;
siginfo_t *last_siginfo; /* For ptrace use. */
struct proc_io_accounting ioac;
#ifdef CONFIG_TASK_XACCT
/* i/o counters(bytes read/written, #syscalls */
u64 rchar, wchar, syscr, syscw;
#endif
struct task_io_accounting ioac;
#if defined(CONFIG_TASK_XACCT)
u64 acct_rss_mem1; /* accumulated rss usage */
u64 acct_vm_mem1; /* accumulated virtual memory usage */
Expand Down Expand Up @@ -2183,22 +2190,22 @@ extern long sched_group_rt_period(struct task_group *tg);
#ifdef CONFIG_TASK_XACCT
static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
{
tsk->ioac.chr.rchar += amt;
tsk->rchar += amt;
}

static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
{
tsk->ioac.chr.wchar += amt;
tsk->wchar += amt;
}

static inline void inc_syscr(struct task_struct *tsk)
{
tsk->ioac.chr.syscr++;
tsk->syscr++;
}

static inline void inc_syscw(struct task_struct *tsk)
{
tsk->ioac.chr.syscw++;
tsk->syscw++;
}
#else
static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
Expand Down
27 changes: 3 additions & 24 deletions trunk/include/linux/task_io_accounting.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* proc_io_accounting: a structure which is used for recording a single task's
* task_io_accounting: a structure which is used for recording a single task's
* IO statistics.
*
* Don't include this header file directly - it is designed to be dragged in via
Expand All @@ -8,22 +8,6 @@
* Blame akpm@osdl.org for all this.
*/

#ifdef CONFIG_TASK_XACCT
struct task_chr_io_accounting {
/* bytes read */
u64 rchar;
/* bytes written */
u64 wchar;
/* # of read syscalls */
u64 syscr;
/* # of write syscalls */
u64 syscw;
};
#else /* CONFIG_TASK_XACCT */
struct task_chr_io_accounting {
};
#endif /* CONFIG_TASK_XACCT */

#ifdef CONFIG_TASK_IO_ACCOUNTING
struct task_io_accounting {
/*
Expand All @@ -47,12 +31,7 @@ struct task_io_accounting {
*/
u64 cancelled_write_bytes;
};
#else /* CONFIG_TASK_IO_ACCOUNTING */
#else
struct task_io_accounting {
};
#endif /* CONFIG_TASK_IO_ACCOUNTING */

struct proc_io_accounting {
struct task_chr_io_accounting chr;
struct task_io_accounting blk;
};
#endif
56 changes: 10 additions & 46 deletions trunk/include/linux/task_io_accounting_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifdef CONFIG_TASK_IO_ACCOUNTING
static inline void task_io_account_read(size_t bytes)
{
current->ioac.blk.read_bytes += bytes;
current->ioac.read_bytes += bytes;
}

/*
Expand All @@ -18,12 +18,12 @@ static inline void task_io_account_read(size_t bytes)
*/
static inline unsigned long task_io_get_inblock(const struct task_struct *p)
{
return p->ioac.blk.read_bytes >> 9;
return p->ioac.read_bytes >> 9;
}

static inline void task_io_account_write(size_t bytes)
{
current->ioac.blk.write_bytes += bytes;
current->ioac.write_bytes += bytes;
}

/*
Expand All @@ -32,25 +32,17 @@ static inline void task_io_account_write(size_t bytes)
*/
static inline unsigned long task_io_get_oublock(const struct task_struct *p)
{
return p->ioac.blk.write_bytes >> 9;
return p->ioac.write_bytes >> 9;
}

static inline void task_io_account_cancelled_write(size_t bytes)
{
current->ioac.blk.cancelled_write_bytes += bytes;
current->ioac.cancelled_write_bytes += bytes;
}

static inline void task_io_accounting_init(struct proc_io_accounting *ioac)
static inline void task_io_accounting_init(struct task_struct *tsk)
{
memset(ioac, 0, sizeof(*ioac));
}

static inline void task_blk_io_accounting_add(struct proc_io_accounting *dst,
struct proc_io_accounting *src)
{
dst->blk.read_bytes += src->blk.read_bytes;
dst->blk.write_bytes += src->blk.write_bytes;
dst->blk.cancelled_write_bytes += src->blk.cancelled_write_bytes;
memset(&tsk->ioac, 0, sizeof(tsk->ioac));
}

#else
Expand All @@ -77,37 +69,9 @@ static inline void task_io_account_cancelled_write(size_t bytes)
{
}

static inline void task_io_accounting_init(struct proc_io_accounting *ioac)
{
}

static inline void task_blk_io_accounting_add(struct proc_io_accounting *dst,
struct proc_io_accounting *src)
static inline void task_io_accounting_init(struct task_struct *tsk)
{
}

#endif /* CONFIG_TASK_IO_ACCOUNTING */

#ifdef CONFIG_TASK_XACCT
static inline void task_chr_io_accounting_add(struct proc_io_accounting *dst,
struct proc_io_accounting *src)
{
dst->chr.rchar += src->chr.rchar;
dst->chr.wchar += src->chr.wchar;
dst->chr.syscr += src->chr.syscr;
dst->chr.syscw += src->chr.syscw;
}
#else
static inline void task_chr_io_accounting_add(struct proc_io_accounting *dst,
struct proc_io_accounting *src)
{
}
#endif /* CONFIG_TASK_XACCT */

static inline void task_io_accounting_add(struct proc_io_accounting *dst,
struct proc_io_accounting *src)
{
task_chr_io_accounting_add(dst, src);
task_blk_io_accounting_add(dst, src);
}
#endif /* __TASK_IO_ACCOUNTING_OPS_INCLUDED */
#endif /* CONFIG_TASK_IO_ACCOUNTING */
#endif /* __TASK_IO_ACCOUNTING_OPS_INCLUDED */
2 changes: 0 additions & 2 deletions trunk/include/net/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,6 @@ extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net);
extern struct ctl_table *ipv6_route_sysctl_init(struct net *net);
extern int ipv6_sysctl_register(void);
extern void ipv6_sysctl_unregister(void);
extern int ipv6_static_sysctl_register(void);
extern void ipv6_static_sysctl_unregister(void);
#endif

#endif /* __KERNEL__ */
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/net/route.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,6 @@ static inline struct inet_peer *rt_get_peer(struct rtable *rt)
return rt->peer;
}

extern ctl_table ipv4_route_table[];

#endif /* _ROUTE_H */
30 changes: 27 additions & 3 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,18 @@ static void __exit_signal(struct task_struct *tsk)
sig->nivcsw += tsk->nivcsw;
sig->inblock += task_io_get_inblock(tsk);
sig->oublock += task_io_get_oublock(tsk);
task_io_accounting_add(&sig->ioac, &tsk->ioac);
#ifdef CONFIG_TASK_XACCT
sig->rchar += tsk->rchar;
sig->wchar += tsk->wchar;
sig->syscr += tsk->syscr;
sig->syscw += tsk->syscw;
#endif /* CONFIG_TASK_XACCT */
#ifdef CONFIG_TASK_IO_ACCOUNTING
sig->ioac.read_bytes += tsk->ioac.read_bytes;
sig->ioac.write_bytes += tsk->ioac.write_bytes;
sig->ioac.cancelled_write_bytes +=
tsk->ioac.cancelled_write_bytes;
#endif /* CONFIG_TASK_IO_ACCOUNTING */
sig->sum_sched_runtime += tsk->se.sum_exec_runtime;
sig = NULL; /* Marker for below. */
}
Expand Down Expand Up @@ -1352,8 +1363,21 @@ static int wait_task_zombie(struct task_struct *p, int options,
psig->coublock +=
task_io_get_oublock(p) +
sig->oublock + sig->coublock;
task_io_accounting_add(&psig->ioac, &p->ioac);
task_io_accounting_add(&psig->ioac, &sig->ioac);
#ifdef CONFIG_TASK_XACCT
psig->rchar += p->rchar + sig->rchar;
psig->wchar += p->wchar + sig->wchar;
psig->syscr += p->syscr + sig->syscr;
psig->syscw += p->syscw + sig->syscw;
#endif /* CONFIG_TASK_XACCT */
#ifdef CONFIG_TASK_IO_ACCOUNTING
psig->ioac.read_bytes +=
p->ioac.read_bytes + sig->ioac.read_bytes;
psig->ioac.write_bytes +=
p->ioac.write_bytes + sig->ioac.write_bytes;
psig->ioac.cancelled_write_bytes +=
p->ioac.cancelled_write_bytes +
sig->ioac.cancelled_write_bytes;
#endif /* CONFIG_TASK_IO_ACCOUNTING */
spin_unlock_irq(&p->parent->sighand->siglock);
}

Expand Down
Loading

0 comments on commit 74de1d2

Please sign in to comment.