diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/backing-dev.h | 2 | ||||
| -rw-r--r-- | include/linux/coda_psdev.h | 3 | ||||
| -rw-r--r-- | include/linux/cpuset.h | 16 | ||||
| -rw-r--r-- | include/linux/firewire-cdev.h | 2 | ||||
| -rw-r--r-- | include/linux/firewire-constants.h | 2 | ||||
| -rw-r--r-- | include/linux/fs.h | 5 | ||||
| -rw-r--r-- | include/linux/kvm_host.h | 7 | ||||
| -rw-r--r-- | include/linux/ncp_fs_sb.h | 2 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 1 | ||||
| -rw-r--r-- | include/linux/poison.h | 9 | ||||
| -rw-r--r-- | include/linux/rcutiny.h | 2 | ||||
| -rw-r--r-- | include/linux/rcutree.h | 1 | ||||
| -rw-r--r-- | include/linux/regulator/consumer.h | 8 | ||||
| -rw-r--r-- | include/linux/sched.h | 70 | ||||
| -rw-r--r-- | include/linux/smb_fs_sb.h | 3 | ||||
| -rw-r--r-- | include/linux/stop_machine.h | 122 | ||||
| -rw-r--r-- | include/linux/tick.h | 5 | ||||
| -rw-r--r-- | include/linux/wait.h | 35 |
18 files changed, 193 insertions, 102 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index fcbc26af00e4..bd0e3c6f323f 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
| @@ -101,6 +101,7 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent, | |||
| 101 | const char *fmt, ...); | 101 | const char *fmt, ...); |
| 102 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); | 102 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); |
| 103 | void bdi_unregister(struct backing_dev_info *bdi); | 103 | void bdi_unregister(struct backing_dev_info *bdi); |
| 104 | int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); | ||
| 104 | void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, | 105 | void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, |
| 105 | long nr_pages); | 106 | long nr_pages); |
| 106 | int bdi_writeback_task(struct bdi_writeback *wb); | 107 | int bdi_writeback_task(struct bdi_writeback *wb); |
| @@ -246,6 +247,7 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio); | |||
| 246 | #endif | 247 | #endif |
| 247 | 248 | ||
| 248 | extern struct backing_dev_info default_backing_dev_info; | 249 | extern struct backing_dev_info default_backing_dev_info; |
| 250 | extern struct backing_dev_info noop_backing_dev_info; | ||
| 249 | void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page); | 251 | void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page); |
| 250 | 252 | ||
| 251 | int writeback_in_progress(struct backing_dev_info *bdi); | 253 | int writeback_in_progress(struct backing_dev_info *bdi); |
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h index 5b5d4731f956..8859e2ede9fe 100644 --- a/include/linux/coda_psdev.h +++ b/include/linux/coda_psdev.h | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | #define MAX_CODADEVS 5 /* how many do we allow */ | 7 | #define MAX_CODADEVS 5 /* how many do we allow */ |
| 8 | 8 | ||
| 9 | #ifdef __KERNEL__ | 9 | #ifdef __KERNEL__ |
| 10 | #include <linux/backing-dev.h> | ||
| 11 | |||
| 10 | struct kstatfs; | 12 | struct kstatfs; |
| 11 | 13 | ||
| 12 | /* communication pending/processing queues */ | 14 | /* communication pending/processing queues */ |
| @@ -17,6 +19,7 @@ struct venus_comm { | |||
| 17 | struct list_head vc_processing; | 19 | struct list_head vc_processing; |
| 18 | int vc_inuse; | 20 | int vc_inuse; |
| 19 | struct super_block *vc_sb; | 21 | struct super_block *vc_sb; |
| 22 | struct backing_dev_info bdi; | ||
| 20 | }; | 23 | }; |
| 21 | 24 | ||
| 22 | 25 | ||
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index a5740fc4d04b..a73454aec333 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
| @@ -21,8 +21,7 @@ extern int number_of_cpusets; /* How many cpusets are defined in system? */ | |||
| 21 | extern int cpuset_init(void); | 21 | extern int cpuset_init(void); |
| 22 | extern void cpuset_init_smp(void); | 22 | extern void cpuset_init_smp(void); |
| 23 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); | 23 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); |
| 24 | extern void cpuset_cpus_allowed_locked(struct task_struct *p, | 24 | extern int cpuset_cpus_allowed_fallback(struct task_struct *p); |
| 25 | struct cpumask *mask); | ||
| 26 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); | 25 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); |
| 27 | #define cpuset_current_mems_allowed (current->mems_allowed) | 26 | #define cpuset_current_mems_allowed (current->mems_allowed) |
| 28 | void cpuset_init_current_mems_allowed(void); | 27 | void cpuset_init_current_mems_allowed(void); |
| @@ -69,9 +68,6 @@ struct seq_file; | |||
| 69 | extern void cpuset_task_status_allowed(struct seq_file *m, | 68 | extern void cpuset_task_status_allowed(struct seq_file *m, |
| 70 | struct task_struct *task); | 69 | struct task_struct *task); |
| 71 | 70 | ||
| 72 | extern void cpuset_lock(void); | ||
| 73 | extern void cpuset_unlock(void); | ||
| 74 | |||
| 75 | extern int cpuset_mem_spread_node(void); | 71 | extern int cpuset_mem_spread_node(void); |
| 76 | 72 | ||
| 77 | static inline int cpuset_do_page_mem_spread(void) | 73 | static inline int cpuset_do_page_mem_spread(void) |
| @@ -105,10 +101,11 @@ static inline void cpuset_cpus_allowed(struct task_struct *p, | |||
| 105 | { | 101 | { |
| 106 | cpumask_copy(mask, cpu_possible_mask); | 102 | cpumask_copy(mask, cpu_possible_mask); |
| 107 | } | 103 | } |
| 108 | static inline void cpuset_cpus_allowed_locked(struct task_struct *p, | 104 | |
| 109 | struct cpumask *mask) | 105 | static inline int cpuset_cpus_allowed_fallback(struct task_struct *p) |
| 110 | { | 106 | { |
| 111 | cpumask_copy(mask, cpu_possible_mask); | 107 | cpumask_copy(&p->cpus_allowed, cpu_possible_mask); |
| 108 | return cpumask_any(cpu_active_mask); | ||
| 112 | } | 109 | } |
| 113 | 110 | ||
| 114 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) | 111 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) |
| @@ -157,9 +154,6 @@ static inline void cpuset_task_status_allowed(struct seq_file *m, | |||
| 157 | { | 154 | { |
| 158 | } | 155 | } |
| 159 | 156 | ||
| 160 | static inline void cpuset_lock(void) {} | ||
| 161 | static inline void cpuset_unlock(void) {} | ||
| 162 | |||
| 163 | static inline int cpuset_mem_spread_node(void) | 157 | static inline int cpuset_mem_spread_node(void) |
| 164 | { | 158 | { |
| 165 | return 0; | 159 | return 0; |
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 81f3b14d5d76..68f883b30a53 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 20 | * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | 20 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 23 | * DEALINGS IN THE SOFTWARE. | 23 | * DEALINGS IN THE SOFTWARE. |
diff --git a/include/linux/firewire-constants.h b/include/linux/firewire-constants.h index 9c63f06e67f2..9b4bb5fbba4b 100644 --- a/include/linux/firewire-constants.h +++ b/include/linux/firewire-constants.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 20 | * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | 20 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 23 | * DEALINGS IN THE SOFTWARE. | 23 | * DEALINGS IN THE SOFTWARE. |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 39d57bc6cc71..44f35aea2f1f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -2315,8 +2315,9 @@ extern int vfs_fstatat(int , char __user *, struct kstat *, int); | |||
| 2315 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, | 2315 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, |
| 2316 | unsigned long arg); | 2316 | unsigned long arg); |
| 2317 | extern int __generic_block_fiemap(struct inode *inode, | 2317 | extern int __generic_block_fiemap(struct inode *inode, |
| 2318 | struct fiemap_extent_info *fieinfo, u64 start, | 2318 | struct fiemap_extent_info *fieinfo, |
| 2319 | u64 len, get_block_t *get_block); | 2319 | loff_t start, loff_t len, |
| 2320 | get_block_t *get_block); | ||
| 2320 | extern int generic_block_fiemap(struct inode *inode, | 2321 | extern int generic_block_fiemap(struct inode *inode, |
| 2321 | struct fiemap_extent_info *fieinfo, u64 start, | 2322 | struct fiemap_extent_info *fieinfo, u64 start, |
| 2322 | u64 len, get_block_t *get_block); | 2323 | u64 len, get_block_t *get_block); |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index a3fd0f91d943..169d07758ee5 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -54,7 +54,7 @@ extern struct kmem_cache *kvm_vcpu_cache; | |||
| 54 | */ | 54 | */ |
| 55 | struct kvm_io_bus { | 55 | struct kvm_io_bus { |
| 56 | int dev_count; | 56 | int dev_count; |
| 57 | #define NR_IOBUS_DEVS 6 | 57 | #define NR_IOBUS_DEVS 200 |
| 58 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; | 58 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| @@ -119,6 +119,11 @@ struct kvm_memory_slot { | |||
| 119 | int user_alloc; | 119 | int user_alloc; |
| 120 | }; | 120 | }; |
| 121 | 121 | ||
| 122 | static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot) | ||
| 123 | { | ||
| 124 | return ALIGN(memslot->npages, BITS_PER_LONG) / 8; | ||
| 125 | } | ||
| 126 | |||
| 122 | struct kvm_kernel_irq_routing_entry { | 127 | struct kvm_kernel_irq_routing_entry { |
| 123 | u32 gsi; | 128 | u32 gsi; |
| 124 | u32 type; | 129 | u32 type; |
diff --git a/include/linux/ncp_fs_sb.h b/include/linux/ncp_fs_sb.h index 6330fc76b00f..5ec9ca671687 100644 --- a/include/linux/ncp_fs_sb.h +++ b/include/linux/ncp_fs_sb.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/ncp_mount.h> | 12 | #include <linux/ncp_mount.h> |
| 13 | #include <linux/net.h> | 13 | #include <linux/net.h> |
| 14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
| 15 | #include <linux/backing-dev.h> | ||
| 15 | 16 | ||
| 16 | #ifdef __KERNEL__ | 17 | #ifdef __KERNEL__ |
| 17 | 18 | ||
| @@ -127,6 +128,7 @@ struct ncp_server { | |||
| 127 | size_t len; | 128 | size_t len; |
| 128 | __u8 data[128]; | 129 | __u8 data[128]; |
| 129 | } unexpected_packet; | 130 | } unexpected_packet; |
| 131 | struct backing_dev_info bdi; | ||
| 130 | }; | 132 | }; |
| 131 | 133 | ||
| 132 | extern void ncp_tcp_rcv_proc(struct work_struct *work); | 134 | extern void ncp_tcp_rcv_proc(struct work_struct *work); |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 1a0b85aa151e..07ce4609fe50 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -209,6 +209,7 @@ struct nfs_inode { | |||
| 209 | #define NFS_INO_FLUSHING (4) /* inode is flushing out data */ | 209 | #define NFS_INO_FLUSHING (4) /* inode is flushing out data */ |
| 210 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ | 210 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ |
| 211 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ | 211 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ |
| 212 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ | ||
| 212 | 213 | ||
| 213 | static inline struct nfs_inode *NFS_I(const struct inode *inode) | 214 | static inline struct nfs_inode *NFS_I(const struct inode *inode) |
| 214 | { | 215 | { |
diff --git a/include/linux/poison.h b/include/linux/poison.h index 2110a81c5e2a..34066ffd893d 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h | |||
| @@ -48,6 +48,15 @@ | |||
| 48 | #define POISON_FREE 0x6b /* for use-after-free poisoning */ | 48 | #define POISON_FREE 0x6b /* for use-after-free poisoning */ |
| 49 | #define POISON_END 0xa5 /* end-byte of poisoning */ | 49 | #define POISON_END 0xa5 /* end-byte of poisoning */ |
| 50 | 50 | ||
| 51 | /********** mm/hugetlb.c **********/ | ||
| 52 | /* | ||
| 53 | * Private mappings of hugetlb pages use this poisoned value for | ||
| 54 | * page->mapping. The core VM should not be doing anything with this mapping | ||
| 55 | * but futex requires the existence of some page->mapping value even though it | ||
| 56 | * is unused if PAGE_MAPPING_ANON is set. | ||
| 57 | */ | ||
| 58 | #define HUGETLB_POISON ((void *)(0x00300300 + POISON_POINTER_DELTA + PAGE_MAPPING_ANON)) | ||
| 59 | |||
| 51 | /********** arch/$ARCH/mm/init.c **********/ | 60 | /********** arch/$ARCH/mm/init.c **********/ |
| 52 | #define POISON_FREE_INITMEM 0xcc | 61 | #define POISON_FREE_INITMEM 0xcc |
| 53 | 62 | ||
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index a5195875480a..0006b2df00e1 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
| @@ -60,8 +60,6 @@ static inline long rcu_batches_completed_bh(void) | |||
| 60 | return 0; | 60 | return 0; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | extern int rcu_expedited_torture_stats(char *page); | ||
| 64 | |||
| 65 | static inline void rcu_force_quiescent_state(void) | 63 | static inline void rcu_force_quiescent_state(void) |
| 66 | { | 64 | { |
| 67 | } | 65 | } |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 42cc3a04779e..24e467e526b8 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
| @@ -35,7 +35,6 @@ struct notifier_block; | |||
| 35 | extern void rcu_sched_qs(int cpu); | 35 | extern void rcu_sched_qs(int cpu); |
| 36 | extern void rcu_bh_qs(int cpu); | 36 | extern void rcu_bh_qs(int cpu); |
| 37 | extern int rcu_needs_cpu(int cpu); | 37 | extern int rcu_needs_cpu(int cpu); |
| 38 | extern int rcu_expedited_torture_stats(char *page); | ||
| 39 | 38 | ||
| 40 | #ifdef CONFIG_TREE_PREEMPT_RCU | 39 | #ifdef CONFIG_TREE_PREEMPT_RCU |
| 41 | 40 | ||
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 28c9fd020d39..ebd747265294 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -183,9 +183,13 @@ static inline struct regulator *__must_check regulator_get(struct device *dev, | |||
| 183 | { | 183 | { |
| 184 | /* Nothing except the stubbed out regulator API should be | 184 | /* Nothing except the stubbed out regulator API should be |
| 185 | * looking at the value except to check if it is an error | 185 | * looking at the value except to check if it is an error |
| 186 | * value so the actual return value doesn't matter. | 186 | * value. Drivers are free to handle NULL specifically by |
| 187 | * skipping all regulator API calls, but they don't have to. | ||
| 188 | * Drivers which don't, should make sure they properly handle | ||
| 189 | * corner cases of the API, such as regulator_get_voltage() | ||
| 190 | * returning 0. | ||
| 187 | */ | 191 | */ |
| 188 | return (struct regulator *)id; | 192 | return NULL; |
| 189 | } | 193 | } |
| 190 | static inline void regulator_put(struct regulator *regulator) | 194 | static inline void regulator_put(struct regulator *regulator) |
| 191 | { | 195 | { |
diff --git a/include/linux/sched.h b/include/linux/sched.h index dad7f668ebf7..dfea40574b2a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -275,11 +275,17 @@ extern cpumask_var_t nohz_cpu_mask; | |||
| 275 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | 275 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) |
| 276 | extern int select_nohz_load_balancer(int cpu); | 276 | extern int select_nohz_load_balancer(int cpu); |
| 277 | extern int get_nohz_load_balancer(void); | 277 | extern int get_nohz_load_balancer(void); |
| 278 | extern int nohz_ratelimit(int cpu); | ||
| 278 | #else | 279 | #else |
| 279 | static inline int select_nohz_load_balancer(int cpu) | 280 | static inline int select_nohz_load_balancer(int cpu) |
| 280 | { | 281 | { |
| 281 | return 0; | 282 | return 0; |
| 282 | } | 283 | } |
| 284 | |||
| 285 | static inline int nohz_ratelimit(int cpu) | ||
| 286 | { | ||
| 287 | return 0; | ||
| 288 | } | ||
| 283 | #endif | 289 | #endif |
| 284 | 290 | ||
| 285 | /* | 291 | /* |
| @@ -954,6 +960,7 @@ struct sched_domain { | |||
| 954 | char *name; | 960 | char *name; |
| 955 | #endif | 961 | #endif |
| 956 | 962 | ||
| 963 | unsigned int span_weight; | ||
| 957 | /* | 964 | /* |
| 958 | * Span of all CPUs in this domain. | 965 | * Span of all CPUs in this domain. |
| 959 | * | 966 | * |
| @@ -1026,12 +1033,17 @@ struct sched_domain; | |||
| 1026 | #define WF_SYNC 0x01 /* waker goes to sleep after wakup */ | 1033 | #define WF_SYNC 0x01 /* waker goes to sleep after wakup */ |
| 1027 | #define WF_FORK 0x02 /* child wakeup after fork */ | 1034 | #define WF_FORK 0x02 /* child wakeup after fork */ |
| 1028 | 1035 | ||
| 1036 | #define ENQUEUE_WAKEUP 1 | ||
| 1037 | #define ENQUEUE_WAKING 2 | ||
| 1038 | #define ENQUEUE_HEAD 4 | ||
| 1039 | |||
| 1040 | #define DEQUEUE_SLEEP 1 | ||
| 1041 | |||
| 1029 | struct sched_class { | 1042 | struct sched_class { |
| 1030 | const struct sched_class *next; | 1043 | const struct sched_class *next; |
| 1031 | 1044 | ||
| 1032 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup, | 1045 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); |
| 1033 | bool head); | 1046 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); |
| 1034 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep); | ||
| 1035 | void (*yield_task) (struct rq *rq); | 1047 | void (*yield_task) (struct rq *rq); |
| 1036 | 1048 | ||
| 1037 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); | 1049 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); |
| @@ -1040,7 +1052,8 @@ struct sched_class { | |||
| 1040 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); | 1052 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); |
| 1041 | 1053 | ||
| 1042 | #ifdef CONFIG_SMP | 1054 | #ifdef CONFIG_SMP |
| 1043 | int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags); | 1055 | int (*select_task_rq)(struct rq *rq, struct task_struct *p, |
| 1056 | int sd_flag, int flags); | ||
| 1044 | 1057 | ||
| 1045 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 1058 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
| 1046 | void (*post_schedule) (struct rq *this_rq); | 1059 | void (*post_schedule) (struct rq *this_rq); |
| @@ -1077,36 +1090,8 @@ struct load_weight { | |||
| 1077 | unsigned long weight, inv_weight; | 1090 | unsigned long weight, inv_weight; |
| 1078 | }; | 1091 | }; |
| 1079 | 1092 | ||
| 1080 | /* | ||
| 1081 | * CFS stats for a schedulable entity (task, task-group etc) | ||
| 1082 | * | ||
| 1083 | * Current field usage histogram: | ||
| 1084 | * | ||
| 1085 | * 4 se->block_start | ||
| 1086 | * 4 se->run_node | ||
| 1087 | * 4 se->sleep_start | ||
| 1088 | * 6 se->load.weight | ||
| 1089 | */ | ||
| 1090 | struct sched_entity { | ||
| 1091 | struct load_weight load; /* for load-balancing */ | ||
| 1092 | struct rb_node run_node; | ||
| 1093 | struct list_head group_node; | ||
| 1094 | unsigned int on_rq; | ||
| 1095 | |||
| 1096 | u64 exec_start; | ||
| 1097 | u64 sum_exec_runtime; | ||
| 1098 | u64 vruntime; | ||
| 1099 | u64 prev_sum_exec_runtime; | ||
| 1100 | |||
| 1101 | u64 last_wakeup; | ||
| 1102 | u64 avg_overlap; | ||
| 1103 | |||
| 1104 | u64 nr_migrations; | ||
| 1105 | |||
| 1106 | u64 start_runtime; | ||
| 1107 | u64 avg_wakeup; | ||
| 1108 | |||
| 1109 | #ifdef CONFIG_SCHEDSTATS | 1093 | #ifdef CONFIG_SCHEDSTATS |
| 1094 | struct sched_statistics { | ||
| 1110 | u64 wait_start; | 1095 | u64 wait_start; |
| 1111 | u64 wait_max; | 1096 | u64 wait_max; |
| 1112 | u64 wait_count; | 1097 | u64 wait_count; |
| @@ -1138,6 +1123,24 @@ struct sched_entity { | |||
| 1138 | u64 nr_wakeups_affine_attempts; | 1123 | u64 nr_wakeups_affine_attempts; |
| 1139 | u64 nr_wakeups_passive; | 1124 | u64 nr_wakeups_passive; |
| 1140 | u64 nr_wakeups_idle; | 1125 | u64 nr_wakeups_idle; |
| 1126 | }; | ||
| 1127 | #endif | ||
| 1128 | |||
| 1129 | struct sched_entity { | ||
| 1130 | struct load_weight load; /* for load-balancing */ | ||
| 1131 | struct rb_node run_node; | ||
| 1132 | struct list_head group_node; | ||
| 1133 | unsigned int on_rq; | ||
| 1134 | |||
| 1135 | u64 exec_start; | ||
| 1136 | u64 sum_exec_runtime; | ||
| 1137 | u64 vruntime; | ||
| 1138 | u64 prev_sum_exec_runtime; | ||
| 1139 | |||
| 1140 | u64 nr_migrations; | ||
| 1141 | |||
| 1142 | #ifdef CONFIG_SCHEDSTATS | ||
| 1143 | struct sched_statistics statistics; | ||
| 1141 | #endif | 1144 | #endif |
| 1142 | 1145 | ||
| 1143 | #ifdef CONFIG_FAIR_GROUP_SCHED | 1146 | #ifdef CONFIG_FAIR_GROUP_SCHED |
| @@ -1847,6 +1850,7 @@ extern void sched_clock_idle_sleep_event(void); | |||
| 1847 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | 1850 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); |
| 1848 | 1851 | ||
| 1849 | #ifdef CONFIG_HOTPLUG_CPU | 1852 | #ifdef CONFIG_HOTPLUG_CPU |
| 1853 | extern void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p); | ||
| 1850 | extern void idle_task_exit(void); | 1854 | extern void idle_task_exit(void); |
| 1851 | #else | 1855 | #else |
| 1852 | static inline void idle_task_exit(void) {} | 1856 | static inline void idle_task_exit(void) {} |
diff --git a/include/linux/smb_fs_sb.h b/include/linux/smb_fs_sb.h index 8a060a7040d8..bb947dd1fba9 100644 --- a/include/linux/smb_fs_sb.h +++ b/include/linux/smb_fs_sb.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #define _SMB_FS_SB | 10 | #define _SMB_FS_SB |
| 11 | 11 | ||
| 12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
| 13 | #include <linux/backing-dev.h> | ||
| 13 | #include <linux/smb.h> | 14 | #include <linux/smb.h> |
| 14 | 15 | ||
| 15 | /* | 16 | /* |
| @@ -74,6 +75,8 @@ struct smb_sb_info { | |||
| 74 | struct smb_ops *ops; | 75 | struct smb_ops *ops; |
| 75 | 76 | ||
| 76 | struct super_block *super_block; | 77 | struct super_block *super_block; |
| 78 | |||
| 79 | struct backing_dev_info bdi; | ||
| 77 | }; | 80 | }; |
| 78 | 81 | ||
| 79 | static inline int | 82 | static inline int |
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index baba3a23a814..6b524a0d02e4 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h | |||
| @@ -1,13 +1,101 @@ | |||
| 1 | #ifndef _LINUX_STOP_MACHINE | 1 | #ifndef _LINUX_STOP_MACHINE |
| 2 | #define _LINUX_STOP_MACHINE | 2 | #define _LINUX_STOP_MACHINE |
| 3 | /* "Bogolock": stop the entire machine, disable interrupts. This is a | 3 | |
| 4 | very heavy lock, which is equivalent to grabbing every spinlock | ||
| 5 | (and more). So the "read" side to such a lock is anything which | ||
| 6 | disables preeempt. */ | ||
| 7 | #include <linux/cpu.h> | 4 | #include <linux/cpu.h> |
| 8 | #include <linux/cpumask.h> | 5 | #include <linux/cpumask.h> |
| 6 | #include <linux/list.h> | ||
| 9 | #include <asm/system.h> | 7 | #include <asm/system.h> |
| 10 | 8 | ||
| 9 | /* | ||
| 10 | * stop_cpu[s]() is simplistic per-cpu maximum priority cpu | ||
| 11 | * monopolization mechanism. The caller can specify a non-sleeping | ||
| 12 | * function to be executed on a single or multiple cpus preempting all | ||
| 13 | * other processes and monopolizing those cpus until it finishes. | ||
| 14 | * | ||
| 15 | * Resources for this mechanism are preallocated when a cpu is brought | ||
| 16 | * up and requests are guaranteed to be served as long as the target | ||
| 17 | * cpus are online. | ||
| 18 | */ | ||
| 19 | typedef int (*cpu_stop_fn_t)(void *arg); | ||
| 20 | |||
| 21 | #ifdef CONFIG_SMP | ||
| 22 | |||
| 23 | struct cpu_stop_work { | ||
| 24 | struct list_head list; /* cpu_stopper->works */ | ||
| 25 | cpu_stop_fn_t fn; | ||
| 26 | void *arg; | ||
| 27 | struct cpu_stop_done *done; | ||
| 28 | }; | ||
| 29 | |||
| 30 | int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg); | ||
| 31 | void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg, | ||
| 32 | struct cpu_stop_work *work_buf); | ||
| 33 | int stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg); | ||
| 34 | int try_stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg); | ||
| 35 | |||
| 36 | #else /* CONFIG_SMP */ | ||
| 37 | |||
| 38 | #include <linux/workqueue.h> | ||
| 39 | |||
| 40 | struct cpu_stop_work { | ||
| 41 | struct work_struct work; | ||
| 42 | cpu_stop_fn_t fn; | ||
| 43 | void *arg; | ||
| 44 | }; | ||
| 45 | |||
| 46 | static inline int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg) | ||
| 47 | { | ||
| 48 | int ret = -ENOENT; | ||
| 49 | preempt_disable(); | ||
| 50 | if (cpu == smp_processor_id()) | ||
| 51 | ret = fn(arg); | ||
| 52 | preempt_enable(); | ||
| 53 | return ret; | ||
| 54 | } | ||
| 55 | |||
| 56 | static void stop_one_cpu_nowait_workfn(struct work_struct *work) | ||
| 57 | { | ||
| 58 | struct cpu_stop_work *stwork = | ||
| 59 | container_of(work, struct cpu_stop_work, work); | ||
| 60 | preempt_disable(); | ||
| 61 | stwork->fn(stwork->arg); | ||
| 62 | preempt_enable(); | ||
| 63 | } | ||
| 64 | |||
| 65 | static inline void stop_one_cpu_nowait(unsigned int cpu, | ||
| 66 | cpu_stop_fn_t fn, void *arg, | ||
| 67 | struct cpu_stop_work *work_buf) | ||
| 68 | { | ||
| 69 | if (cpu == smp_processor_id()) { | ||
| 70 | INIT_WORK(&work_buf->work, stop_one_cpu_nowait_workfn); | ||
| 71 | work_buf->fn = fn; | ||
| 72 | work_buf->arg = arg; | ||
| 73 | schedule_work(&work_buf->work); | ||
| 74 | } | ||
| 75 | } | ||
| 76 | |||
| 77 | static inline int stop_cpus(const struct cpumask *cpumask, | ||
| 78 | cpu_stop_fn_t fn, void *arg) | ||
| 79 | { | ||
| 80 | if (cpumask_test_cpu(raw_smp_processor_id(), cpumask)) | ||
| 81 | return stop_one_cpu(raw_smp_processor_id(), fn, arg); | ||
| 82 | return -ENOENT; | ||
| 83 | } | ||
| 84 | |||
| 85 | static inline int try_stop_cpus(const struct cpumask *cpumask, | ||
| 86 | cpu_stop_fn_t fn, void *arg) | ||
| 87 | { | ||
| 88 | return stop_cpus(cpumask, fn, arg); | ||
| 89 | } | ||
| 90 | |||
| 91 | #endif /* CONFIG_SMP */ | ||
| 92 | |||
| 93 | /* | ||
| 94 | * stop_machine "Bogolock": stop the entire machine, disable | ||
| 95 | * interrupts. This is a very heavy lock, which is equivalent to | ||
| 96 | * grabbing every spinlock (and more). So the "read" side to such a | ||
| 97 | * lock is anything which disables preeempt. | ||
| 98 | */ | ||
| 11 | #if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) | 99 | #if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) |
| 12 | 100 | ||
| 13 | /** | 101 | /** |
| @@ -36,24 +124,7 @@ int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); | |||
| 36 | */ | 124 | */ |
| 37 | int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); | 125 | int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); |
| 38 | 126 | ||
| 39 | /** | 127 | #else /* CONFIG_STOP_MACHINE && CONFIG_SMP */ |
| 40 | * stop_machine_create: create all stop_machine threads | ||
| 41 | * | ||
| 42 | * Description: This causes all stop_machine threads to be created before | ||
| 43 | * stop_machine actually gets called. This can be used by subsystems that | ||
| 44 | * need a non failing stop_machine infrastructure. | ||
| 45 | */ | ||
| 46 | int stop_machine_create(void); | ||
| 47 | |||
| 48 | /** | ||
| 49 | * stop_machine_destroy: destroy all stop_machine threads | ||
| 50 | * | ||
| 51 | * Description: This causes all stop_machine threads which were created with | ||
| 52 | * stop_machine_create to be destroyed again. | ||
| 53 | */ | ||
| 54 | void stop_machine_destroy(void); | ||
| 55 | |||
| 56 | #else | ||
| 57 | 128 | ||
| 58 | static inline int stop_machine(int (*fn)(void *), void *data, | 129 | static inline int stop_machine(int (*fn)(void *), void *data, |
| 59 | const struct cpumask *cpus) | 130 | const struct cpumask *cpus) |
| @@ -65,8 +136,5 @@ static inline int stop_machine(int (*fn)(void *), void *data, | |||
| 65 | return ret; | 136 | return ret; |
| 66 | } | 137 | } |
| 67 | 138 | ||
| 68 | static inline int stop_machine_create(void) { return 0; } | 139 | #endif /* CONFIG_STOP_MACHINE && CONFIG_SMP */ |
| 69 | static inline void stop_machine_destroy(void) { } | 140 | #endif /* _LINUX_STOP_MACHINE */ |
| 70 | |||
| 71 | #endif /* CONFIG_SMP */ | ||
| 72 | #endif /* _LINUX_STOP_MACHINE */ | ||
diff --git a/include/linux/tick.h b/include/linux/tick.h index d2ae79e21be3..b232ccc0ee29 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
| @@ -42,6 +42,7 @@ enum tick_nohz_mode { | |||
| 42 | * @idle_waketime: Time when the idle was interrupted | 42 | * @idle_waketime: Time when the idle was interrupted |
| 43 | * @idle_exittime: Time when the idle state was left | 43 | * @idle_exittime: Time when the idle state was left |
| 44 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped | 44 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped |
| 45 | * @iowait_sleeptime: Sum of the time slept in idle with sched tick stopped, with IO outstanding | ||
| 45 | * @sleep_length: Duration of the current idle sleep | 46 | * @sleep_length: Duration of the current idle sleep |
| 46 | * @do_timer_lst: CPU was the last one doing do_timer before going idle | 47 | * @do_timer_lst: CPU was the last one doing do_timer before going idle |
| 47 | */ | 48 | */ |
| @@ -60,7 +61,7 @@ struct tick_sched { | |||
| 60 | ktime_t idle_waketime; | 61 | ktime_t idle_waketime; |
| 61 | ktime_t idle_exittime; | 62 | ktime_t idle_exittime; |
| 62 | ktime_t idle_sleeptime; | 63 | ktime_t idle_sleeptime; |
| 63 | ktime_t idle_lastupdate; | 64 | ktime_t iowait_sleeptime; |
| 64 | ktime_t sleep_length; | 65 | ktime_t sleep_length; |
| 65 | unsigned long last_jiffies; | 66 | unsigned long last_jiffies; |
| 66 | unsigned long next_jiffies; | 67 | unsigned long next_jiffies; |
| @@ -124,6 +125,7 @@ extern void tick_nohz_stop_sched_tick(int inidle); | |||
| 124 | extern void tick_nohz_restart_sched_tick(void); | 125 | extern void tick_nohz_restart_sched_tick(void); |
| 125 | extern ktime_t tick_nohz_get_sleep_length(void); | 126 | extern ktime_t tick_nohz_get_sleep_length(void); |
| 126 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); | 127 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); |
| 128 | extern u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time); | ||
| 127 | # else | 129 | # else |
| 128 | static inline void tick_nohz_stop_sched_tick(int inidle) { } | 130 | static inline void tick_nohz_stop_sched_tick(int inidle) { } |
| 129 | static inline void tick_nohz_restart_sched_tick(void) { } | 131 | static inline void tick_nohz_restart_sched_tick(void) { } |
| @@ -134,6 +136,7 @@ static inline ktime_t tick_nohz_get_sleep_length(void) | |||
| 134 | return len; | 136 | return len; |
| 135 | } | 137 | } |
| 136 | static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; } | 138 | static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; } |
| 139 | static inline u64 get_cpu_iowait_time_us(int cpu, u64 *unused) { return -1; } | ||
| 137 | # endif /* !NO_HZ */ | 140 | # endif /* !NO_HZ */ |
| 138 | 141 | ||
| 139 | #endif | 142 | #endif |
diff --git a/include/linux/wait.h b/include/linux/wait.h index a48e16b77d5e..76d96d035ea0 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
| @@ -127,12 +127,26 @@ static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) | |||
| 127 | /* | 127 | /* |
| 128 | * Used for wake-one threads: | 128 | * Used for wake-one threads: |
| 129 | */ | 129 | */ |
| 130 | static inline void __add_wait_queue_exclusive(wait_queue_head_t *q, | ||
| 131 | wait_queue_t *wait) | ||
| 132 | { | ||
| 133 | wait->flags |= WQ_FLAG_EXCLUSIVE; | ||
| 134 | __add_wait_queue(q, wait); | ||
| 135 | } | ||
| 136 | |||
| 130 | static inline void __add_wait_queue_tail(wait_queue_head_t *head, | 137 | static inline void __add_wait_queue_tail(wait_queue_head_t *head, |
| 131 | wait_queue_t *new) | 138 | wait_queue_t *new) |
| 132 | { | 139 | { |
| 133 | list_add_tail(&new->task_list, &head->task_list); | 140 | list_add_tail(&new->task_list, &head->task_list); |
| 134 | } | 141 | } |
| 135 | 142 | ||
| 143 | static inline void __add_wait_queue_tail_exclusive(wait_queue_head_t *q, | ||
| 144 | wait_queue_t *wait) | ||
| 145 | { | ||
| 146 | wait->flags |= WQ_FLAG_EXCLUSIVE; | ||
| 147 | __add_wait_queue_tail(q, wait); | ||
| 148 | } | ||
| 149 | |||
| 136 | static inline void __remove_wait_queue(wait_queue_head_t *head, | 150 | static inline void __remove_wait_queue(wait_queue_head_t *head, |
| 137 | wait_queue_t *old) | 151 | wait_queue_t *old) |
| 138 | { | 152 | { |
| @@ -404,25 +418,6 @@ do { \ | |||
| 404 | }) | 418 | }) |
| 405 | 419 | ||
| 406 | /* | 420 | /* |
| 407 | * Must be called with the spinlock in the wait_queue_head_t held. | ||
| 408 | */ | ||
| 409 | static inline void add_wait_queue_exclusive_locked(wait_queue_head_t *q, | ||
| 410 | wait_queue_t * wait) | ||
| 411 | { | ||
| 412 | wait->flags |= WQ_FLAG_EXCLUSIVE; | ||
| 413 | __add_wait_queue_tail(q, wait); | ||
| 414 | } | ||
| 415 | |||
| 416 | /* | ||
| 417 | * Must be called with the spinlock in the wait_queue_head_t held. | ||
| 418 | */ | ||
| 419 | static inline void remove_wait_queue_locked(wait_queue_head_t *q, | ||
| 420 | wait_queue_t * wait) | ||
| 421 | { | ||
| 422 | __remove_wait_queue(q, wait); | ||
| 423 | } | ||
| 424 | |||
| 425 | /* | ||
| 426 | * These are the old interfaces to sleep waiting for an event. | 421 | * These are the old interfaces to sleep waiting for an event. |
| 427 | * They are racy. DO NOT use them, use the wait_event* interfaces above. | 422 | * They are racy. DO NOT use them, use the wait_event* interfaces above. |
| 428 | * We plan to remove these interfaces. | 423 | * We plan to remove these interfaces. |
