summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-11 16:22:27 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-11 16:22:27 -0300
commit29f5b648fa0b31ad614c78468b9279e5fa96397a (patch)
tree385e76324c4e95e90b16889937e7c24e6f7d4f4a /include
parent1eae9639aac0f8de4d284f567ec722a822b52513 (diff)
Linux-libre 4.8.7-gnupck-4.8.7-gnu
Diffstat (limited to 'include')
-rw-r--r--include/linux/backing-dev-defs.h2
-rw-r--r--include/linux/blk_types.h16
-rw-r--r--include/linux/blkdev.h19
-rw-r--r--include/linux/fs.h3
-rw-r--r--include/linux/pwm.h5
-rw-r--r--include/linux/wbt.h141
-rw-r--r--include/linux/writeback.h10
-rw-r--r--include/trace/events/wbt.h153
-rw-r--r--include/uapi/linux/Kbuild1
9 files changed, 7 insertions, 343 deletions
diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h
index dc5f76d7f..c357f27d5 100644
--- a/include/linux/backing-dev-defs.h
+++ b/include/linux/backing-dev-defs.h
@@ -116,8 +116,6 @@ struct bdi_writeback {
struct list_head work_list;
struct delayed_work dwork; /* work item used for writeback */
- unsigned long dirty_sleep; /* last wait */
-
struct list_head bdi_node; /* anchored at bdi->wb_list */
#ifdef CONFIG_CGROUP_WRITEBACK
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 95fbfa1fe..436f43f87 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -155,7 +155,6 @@ enum rq_flag_bits {
__REQ_INTEGRITY, /* I/O includes block integrity payload */
__REQ_FUA, /* forced unit access */
__REQ_PREFLUSH, /* request for cache flush */
- __REQ_BG, /* background activity */
/* bio only flags */
__REQ_RAHEAD, /* read ahead, can fail anytime */
@@ -199,7 +198,7 @@ enum rq_flag_bits {
(REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER)
#define REQ_COMMON_MASK \
(REQ_FAILFAST_MASK | REQ_SYNC | REQ_META | REQ_PRIO | REQ_NOIDLE | \
- REQ_PREFLUSH | REQ_FUA | REQ_INTEGRITY | REQ_NOMERGE | REQ_BG)
+ REQ_PREFLUSH | REQ_FUA | REQ_INTEGRITY | REQ_NOMERGE)
#define REQ_CLONE_MASK REQ_COMMON_MASK
/* This mask is used for both bio and request merge checking */
@@ -224,7 +223,6 @@ enum rq_flag_bits {
#define REQ_COPY_USER (1ULL << __REQ_COPY_USER)
#define REQ_PREFLUSH (1ULL << __REQ_PREFLUSH)
#define REQ_FLUSH_SEQ (1ULL << __REQ_FLUSH_SEQ)
-#define REQ_BG (1ULL << __REQ_BG)
#define REQ_IO_STAT (1ULL << __REQ_IO_STAT)
#define REQ_MIXED_MERGE (1ULL << __REQ_MIXED_MERGE)
#define REQ_PM (1ULL << __REQ_PM)
@@ -266,16 +264,4 @@ static inline unsigned int blk_qc_t_to_tag(blk_qc_t cookie)
return cookie & ((1u << BLK_QC_T_SHIFT) - 1);
}
-#define BLK_RQ_STAT_BATCH 64
-
-struct blk_rq_stat {
- s64 mean;
- u64 min;
- u64 max;
- s32 nr_samples;
- s32 nr_batch;
- u64 batch;
- s64 time;
-};
-
#endif /* __LINUX_BLK_TYPES_H */
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 2624a0220..9de483535 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -24,7 +24,6 @@
#include <linux/rcupdate.h>
#include <linux/percpu-refcount.h>
#include <linux/scatterlist.h>
-#include <linux/wbt.h>
struct module;
struct scsi_ioctl_command;
@@ -38,7 +37,6 @@ struct bsg_job;
struct blkcg_gq;
struct blk_flush_queue;
struct pr_ops;
-struct rq_wb;
#define BLKDEV_MIN_RQ 4
#ifdef CONFIG_PCK_INTERACTIVE
@@ -157,7 +155,6 @@ struct request {
struct gendisk *rq_disk;
struct hd_struct *part;
unsigned long start_time;
- struct wb_issue_stat wb_stat;
#ifdef CONFIG_BLK_CGROUP
struct request_list *rl; /* rl this rq is alloced from */
unsigned long long start_time_ns;
@@ -309,8 +306,6 @@ struct request_queue {
int nr_rqs[2]; /* # allocated [a]sync rqs */
int nr_rqs_elvpriv; /* # allocated rqs w/ elvpriv */
- struct rq_wb *rq_wb;
-
/*
* If blkcg is not used, @q->root_rl serves all requests. If blkcg
* is used, root blkg allocates from @q->root_rl and all other
@@ -336,8 +331,6 @@ struct request_queue {
struct blk_mq_ctx __percpu *queue_ctx;
unsigned int nr_queues;
- unsigned int queue_depth;
-
/* hw dispatch queues */
struct blk_mq_hw_ctx **queue_hw_ctx;
unsigned int nr_hw_queues;
@@ -423,9 +416,6 @@ struct request_queue {
unsigned int nr_sorted;
unsigned int in_flight[2];
-
- struct blk_rq_stat rq_stats[2];
-
/*
* Number of active block driver functions for which blk_drain_queue()
* must wait. Must be incremented around functions that unlock the
@@ -697,14 +687,6 @@ static inline bool blk_write_same_mergeable(struct bio *a, struct bio *b)
return false;
}
-static inline unsigned int blk_queue_depth(struct request_queue *q)
-{
- if (q->queue_depth)
- return q->queue_depth;
-
- return q->nr_requests;
-}
-
/*
* q->prep_rq_fn return values
*/
@@ -1021,7 +1003,6 @@ extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min);
extern void blk_queue_io_min(struct request_queue *q, unsigned int min);
extern void blk_limits_io_opt(struct queue_limits *limits, unsigned int opt);
extern void blk_queue_io_opt(struct request_queue *q, unsigned int opt);
-extern void blk_set_queue_depth(struct request_queue *q, unsigned int depth);
extern void blk_set_default_limits(struct queue_limits *lim);
extern void blk_set_stacking_limits(struct queue_limits *lim);
extern int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6f180afdd..1b5999474 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -189,8 +189,6 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
* WRITE_FLUSH_FUA Combination of WRITE_FLUSH and FUA. The IO is preceded
* by a cache flush and data is guaranteed to be on
* non-volatile media on completion.
- * WRITE_BG Background write. This is for background activity like
- * the periodic flush and background threshold writeback
*
*/
#define RW_MASK REQ_OP_WRITE
@@ -204,7 +202,6 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
#define WRITE_FLUSH (REQ_SYNC | REQ_NOIDLE | REQ_PREFLUSH)
#define WRITE_FUA (REQ_SYNC | REQ_NOIDLE | REQ_FUA)
#define WRITE_FLUSH_FUA (REQ_SYNC | REQ_NOIDLE | REQ_PREFLUSH | REQ_FUA)
-#define WRITE_BG (REQ_NOIDLE | REQ_BG)
/*
* Attribute flags. These should be or-ed together to figure out what
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index f1bbae014..2c6c5114c 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -641,6 +641,7 @@ static inline void pwm_remove_table(struct pwm_lookup *table, size_t num)
#ifdef CONFIG_PWM_SYSFS
void pwmchip_sysfs_export(struct pwm_chip *chip);
void pwmchip_sysfs_unexport(struct pwm_chip *chip);
+void pwmchip_sysfs_unexport_children(struct pwm_chip *chip);
#else
static inline void pwmchip_sysfs_export(struct pwm_chip *chip)
{
@@ -649,6 +650,10 @@ static inline void pwmchip_sysfs_export(struct pwm_chip *chip)
static inline void pwmchip_sysfs_unexport(struct pwm_chip *chip)
{
}
+
+static inline void pwmchip_sysfs_unexport_children(struct pwm_chip *chip)
+{
+}
#endif /* CONFIG_PWM_SYSFS */
#endif /* __LINUX_PWM_H */
diff --git a/include/linux/wbt.h b/include/linux/wbt.h
deleted file mode 100644
index 68ba75e3a..000000000
--- a/include/linux/wbt.h
+++ /dev/null
@@ -1,141 +0,0 @@
-#ifndef WB_THROTTLE_H
-#define WB_THROTTLE_H
-
-#include <linux/atomic.h>
-#include <linux/wait.h>
-#include <linux/timer.h>
-#include <linux/ktime.h>
-
-enum wbt_flags {
- WBT_TRACKED = 1, /* write, tracked for throttling */
- WBT_READ = 2, /* read */
- WBT_KSWAPD = 4, /* write, from kswapd */
-
- WBT_NR_BITS = 3, /* number of bits */
-};
-
-enum {
- /*
- * Set aside 3 bits for state, rest is a time stamp
- */
- ISSUE_STAT_SHIFT = 64 - WBT_NR_BITS,
- ISSUE_STAT_MASK = ~((1ULL << ISSUE_STAT_SHIFT) - 1),
- ISSUE_STAT_TIME_MASK = ~ISSUE_STAT_MASK,
-
- WBT_NUM_RWQ = 2,
-};
-
-struct wb_issue_stat {
- u64 time;
-};
-
-static inline void wbt_issue_stat_set_time(struct wb_issue_stat *stat)
-{
- stat->time = (stat->time & ISSUE_STAT_MASK) |
- (ktime_to_ns(ktime_get()) & ISSUE_STAT_TIME_MASK);
-}
-
-static inline u64 wbt_issue_stat_get_time(struct wb_issue_stat *stat)
-{
- return stat->time & ISSUE_STAT_TIME_MASK;
-}
-
-static inline void wbt_clear_state(struct wb_issue_stat *stat)
-{
- stat->time &= ISSUE_STAT_TIME_MASK;
-}
-
-static inline enum wbt_flags wbt_stat_to_mask(struct wb_issue_stat *stat)
-{
- return (stat->time & ISSUE_STAT_MASK) >> ISSUE_STAT_SHIFT;
-}
-
-static inline void wbt_track(struct wb_issue_stat *stat, enum wbt_flags wb_acct)
-{
- stat->time |= ((u64) wb_acct) << ISSUE_STAT_SHIFT;
-}
-
-static inline bool wbt_is_tracked(struct wb_issue_stat *stat)
-{
- return (stat->time >> ISSUE_STAT_SHIFT) & WBT_TRACKED;
-}
-
-static inline bool wbt_is_read(struct wb_issue_stat *stat)
-{
- return (stat->time >> ISSUE_STAT_SHIFT) & WBT_READ;
-}
-
-struct wb_stat_ops {
- void (*get)(void *, struct blk_rq_stat *);
- bool (*is_current)(struct blk_rq_stat *);
- void (*clear)(void *);
-};
-
-struct rq_wait {
- wait_queue_head_t wait;
- atomic_t inflight;
-};
-
-struct rq_wb {
- /*
- * Settings that govern how we throttle
- */
- unsigned int wb_background; /* background writeback */
- unsigned int wb_normal; /* normal writeback */
- unsigned int wb_max; /* max throughput writeback */
- int scale_step;
- bool scaled_max;
-
- /*
- * Number of consecutive periods where we don't have enough
- * information to make a firm scale up/down decision.
- */
- unsigned int unknown_cnt;
-
- u64 win_nsec; /* default window size */
- u64 cur_win_nsec; /* current window size */
-
- struct timer_list window_timer;
-
- s64 sync_issue;
- void *sync_cookie;
-
- unsigned int wc;
- unsigned int queue_depth;
-
- unsigned long last_issue; /* last non-throttled issue */
- unsigned long last_comp; /* last non-throttled comp */
- unsigned long min_lat_nsec;
- struct backing_dev_info *bdi;
- struct rq_wait rq_wait[WBT_NUM_RWQ];
-
- struct wb_stat_ops *stat_ops;
- void *ops_data;
-};
-
-static inline unsigned int wbt_inflight(struct rq_wb *rwb)
-{
- unsigned int i, ret = 0;
-
- for (i = 0; i < WBT_NUM_RWQ; i++)
- ret += atomic_read(&rwb->rq_wait[i].inflight);
-
- return ret;
-}
-
-struct backing_dev_info;
-
-void __wbt_done(struct rq_wb *, enum wbt_flags);
-void wbt_done(struct rq_wb *, struct wb_issue_stat *);
-enum wbt_flags wbt_wait(struct rq_wb *, unsigned int, spinlock_t *);
-struct rq_wb *wbt_init(struct backing_dev_info *, struct wb_stat_ops *, void *);
-void wbt_exit(struct rq_wb *);
-void wbt_update_limits(struct rq_wb *);
-void wbt_requeue(struct rq_wb *, struct wb_issue_stat *);
-void wbt_issue(struct rq_wb *, struct wb_issue_stat *);
-void wbt_disable(struct rq_wb *);
-
-void wbt_set_queue_depth(struct rq_wb *, unsigned int);
-void wbt_set_write_cache(struct rq_wb *, bool);
-
-#endif
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index e53abf2bf..fc1e16c25 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -100,16 +100,6 @@ struct writeback_control {
#endif
};
-static inline int wbc_to_write_flags(struct writeback_control *wbc)
-{
- if (wbc->sync_mode == WB_SYNC_ALL)
- return WRITE_SYNC;
- else if (wbc->for_kupdate || wbc->for_background)
- return WRITE_BG;
-
- return 0;
-}
-
/*
* A wb_domain represents a domain that wb's (bdi_writeback's) belong to
* and are measured against each other in. There always is one global
diff --git a/include/trace/events/wbt.h b/include/trace/events/wbt.h
deleted file mode 100644
index 926c7ee0e..000000000
--- a/include/trace/events/wbt.h
+++ /dev/null
@@ -1,153 +0,0 @@
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM wbt
-
-#if !defined(_TRACE_WBT_H) || defined(TRACE_HEADER_MULTI_READ)
-#define _TRACE_WBT_H
-
-#include <linux/tracepoint.h>
-#include <linux/wbt.h>
-
-/**
- * wbt_stat - trace stats for blk_wb
- * @stat: array of read/write stats
- */
-TRACE_EVENT(wbt_stat,
-
- TP_PROTO(struct backing_dev_info *bdi, struct blk_rq_stat *stat),
-
- TP_ARGS(bdi, stat),
-
- TP_STRUCT__entry(
- __array(char, name, 32)
- __field(s64, rmean)
- __field(u64, rmin)
- __field(u64, rmax)
- __field(s64, rnr_samples)
- __field(s64, rtime)
- __field(s64, wmean)
- __field(u64, wmin)
- __field(u64, wmax)
- __field(s64, wnr_samples)
- __field(s64, wtime)
- ),
-
- TP_fast_assign(
- strncpy(__entry->name, dev_name(bdi->dev), 32);
- __entry->rmean = stat[0].mean;
- __entry->rmin = stat[0].min;
- __entry->rmax = stat[0].max;
- __entry->rnr_samples = stat[0].nr_samples;
- __entry->wmean = stat[1].mean;
- __entry->wmin = stat[1].min;
- __entry->wmax = stat[1].max;
- __entry->wnr_samples = stat[1].nr_samples;
- ),
-
- TP_printk("%s: rmean=%llu, rmin=%llu, rmax=%llu, rsamples=%llu, "
- "wmean=%llu, wmin=%llu, wmax=%llu, wsamples=%llu\n",
- __entry->name, __entry->rmean, __entry->rmin, __entry->rmax,
- __entry->rnr_samples, __entry->wmean, __entry->wmin,
- __entry->wmax, __entry->wnr_samples)
-);
-
-/**
- * wbt_lat - trace latency event
- * @lat: latency trigger
- */
-TRACE_EVENT(wbt_lat,
-
- TP_PROTO(struct backing_dev_info *bdi, unsigned long lat),
-
- TP_ARGS(bdi, lat),
-
- TP_STRUCT__entry(
- __array(char, name, 32)
- __field(unsigned long, lat)
- ),
-
- TP_fast_assign(
- strncpy(__entry->name, dev_name(bdi->dev), 32);
- __entry->lat = div_u64(lat, 1000);
- ),
-
- TP_printk("%s: latency %lluus\n", __entry->name,
- (unsigned long long) __entry->lat)
-);
-
-/**
- * wbt_step - trace wb event step
- * @msg: context message
- * @step: the current scale step count
- * @window: the current monitoring window
- * @bg: the current background queue limit
- * @normal: the current normal writeback limit
- * @max: the current max throughput writeback limit
- */
-TRACE_EVENT(wbt_step,
-
- TP_PROTO(struct backing_dev_info *bdi, const char *msg,
- int step, unsigned long window, unsigned int bg,
- unsigned int normal, unsigned int max),
-
- TP_ARGS(bdi, msg, step, window, bg, normal, max),
-
- TP_STRUCT__entry(
- __array(char, name, 32)
- __field(const char *, msg)
- __field(int, step)
- __field(unsigned long, window)
- __field(unsigned int, bg)
- __field(unsigned int, normal)
- __field(unsigned int, max)
- ),
-
- TP_fast_assign(
- strncpy(__entry->name, dev_name(bdi->dev), 32);
- __entry->msg = msg;
- __entry->step = step;
- __entry->window = div_u64(window, 1000);
- __entry->bg = bg;
- __entry->normal = normal;
- __entry->max = max;
- ),
-
- TP_printk("%s: %s: step=%d, window=%luus, background=%u, normal=%u, max=%u\n",
- __entry->name, __entry->msg, __entry->step, __entry->window,
- __entry->bg, __entry->normal, __entry->max)
-);
-
-/**
- * wbt_timer - trace wb timer event
- * @status: timer state status
- * @step: the current scale step count
- * @inflight: tracked writes inflight
- */
-TRACE_EVENT(wbt_timer,
-
- TP_PROTO(struct backing_dev_info *bdi, unsigned int status,
- int step, unsigned int inflight),
-
- TP_ARGS(bdi, status, step, inflight),
-
- TP_STRUCT__entry(
- __array(char, name, 32)
- __field(unsigned int, status)
- __field(int, step)
- __field(unsigned int, inflight)
- ),
-
- TP_fast_assign(
- strncpy(__entry->name, dev_name(bdi->dev), 32);
- __entry->status = status;
- __entry->step = step;
- __entry->inflight = inflight;
- ),
-
- TP_printk("%s: status=%u, step=%d, inflight=%u\n", __entry->name,
- __entry->status, __entry->step, __entry->inflight)
-);
-
-#endif /* _TRACE_WBT_H */
-
-/* This part must be outside protection */
-#include <trace/define_trace.h>
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 5deb0d188..899e5474e 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -397,6 +397,7 @@ header-y += string.h
header-y += suspend_ioctls.h
header-y += swab.h
header-y += synclink.h
+header-y += sync_file.h
header-y += sysctl.h
header-y += sysinfo.h
header-y += target_core_user.h