Release 4.12 include/linux/task_io_accounting_ops.h
/*
* Task I/O accounting operations
*/
#ifndef __TASK_IO_ACCOUNTING_OPS_INCLUDED
#define __TASK_IO_ACCOUNTING_OPS_INCLUDED
#include <linux/sched.h>
#ifdef CONFIG_TASK_IO_ACCOUNTING
static inline void task_io_account_read(size_t bytes)
{
current->ioac.read_bytes += bytes;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 18 | 100.00% | 1 | 100.00% |
Total | 18 | 100.00% | 1 | 100.00% |
/*
* We approximate number of blocks, because we account bytes only.
* A 'block' is 512 bytes
*/
static inline unsigned long task_io_get_inblock(const struct task_struct *p)
{
return p->ioac.read_bytes >> 9;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Eric Dumazet | 23 | 100.00% | 1 | 100.00% |
Total | 23 | 100.00% | 1 | 100.00% |
static inline void task_io_account_write(size_t bytes)
{
current->ioac.write_bytes += bytes;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 18 | 100.00% | 1 | 100.00% |
Total | 18 | 100.00% | 1 | 100.00% |
/*
* We approximate number of blocks, because we account bytes only.
* A 'block' is 512 bytes
*/
static inline unsigned long task_io_get_oublock(const struct task_struct *p)
{
return p->ioac.write_bytes >> 9;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Eric Dumazet | 23 | 100.00% | 1 | 100.00% |
Total | 23 | 100.00% | 1 | 100.00% |
static inline void task_io_account_cancelled_write(size_t bytes)
{
current->ioac.cancelled_write_bytes += bytes;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 18 | 100.00% | 1 | 100.00% |
Total | 18 | 100.00% | 1 | 100.00% |
static inline void task_io_accounting_init(struct task_io_accounting *ioac)
{
memset(ioac, 0, sizeof(*ioac));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 22 | 88.00% | 1 | 33.33% |
Andrea Righi | 3 | 12.00% | 2 | 66.67% |
Total | 25 | 100.00% | 3 | 100.00% |
static inline void task_blk_io_accounting_add(struct task_io_accounting *dst,
struct task_io_accounting *src)
{
dst->read_bytes += src->read_bytes;
dst->write_bytes += src->write_bytes;
dst->cancelled_write_bytes += src->cancelled_write_bytes;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrea Righi | 41 | 100.00% | 2 | 100.00% |
Total | 41 | 100.00% | 2 | 100.00% |
#else
static inline void task_io_account_read(size_t bytes)
{
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 9 | 100.00% | 1 | 100.00% |
Total | 9 | 100.00% | 1 | 100.00% |
static inline unsigned long task_io_get_inblock(const struct task_struct *p)
{
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Eric Dumazet | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
static inline void task_io_account_write(size_t bytes)
{
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 9 | 100.00% | 1 | 100.00% |
Total | 9 | 100.00% | 1 | 100.00% |
static inline unsigned long task_io_get_oublock(const struct task_struct *p)
{
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Eric Dumazet | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
static inline void task_io_account_cancelled_write(size_t bytes)
{
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 9 | 100.00% | 1 | 100.00% |
Total | 9 | 100.00% | 1 | 100.00% |
static inline void task_io_accounting_init(struct task_io_accounting *ioac)
{
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 6 | 54.55% | 1 | 33.33% |
Andrea Righi | 5 | 45.45% | 2 | 66.67% |
Total | 11 | 100.00% | 3 | 100.00% |
static inline void task_blk_io_accounting_add(struct task_io_accounting *dst,
struct task_io_accounting *src)
{
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrea Righi | 13 | 81.25% | 2 | 66.67% |
Andrew Morton | 3 | 18.75% | 1 | 33.33% |
Total | 16 | 100.00% | 3 | 100.00% |
#endif /* CONFIG_TASK_IO_ACCOUNTING */
#ifdef CONFIG_TASK_XACCT
static inline void task_chr_io_accounting_add(struct task_io_accounting *dst,
struct task_io_accounting *src)
{
dst->rchar += src->rchar;
dst->wchar += src->wchar;
dst->syscr += src->syscr;
dst->syscw += src->syscw;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrea Righi | 49 | 100.00% | 2 | 100.00% |
Total | 49 | 100.00% | 2 | 100.00% |
#else
static inline void task_chr_io_accounting_add(struct task_io_accounting *dst,
struct task_io_accounting *src)
{
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrea Righi | 16 | 100.00% | 2 | 100.00% |
Total | 16 | 100.00% | 2 | 100.00% |
#endif /* CONFIG_TASK_XACCT */
static inline void task_io_accounting_add(struct task_io_accounting *dst,
struct task_io_accounting *src)
{
task_chr_io_accounting_add(dst, src);
task_blk_io_accounting_add(dst, src);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrea Righi | 31 | 100.00% | 2 | 100.00% |
Total | 31 | 100.00% | 2 | 100.00% |
#endif /* __TASK_IO_ACCOUNTING_OPS_INCLUDED */
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrea Righi | 166 | 43.57% | 2 | 40.00% |
Andrew Morton | 130 | 34.12% | 1 | 20.00% |
Eric Dumazet | 82 | 21.52% | 1 | 20.00% |
Alexey Dobriyan | 3 | 0.79% | 1 | 20.00% |
Total | 381 | 100.00% | 5 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.