diff options
| author | Ingo Molnar <mingo@elte.hu> | 2012-01-17 03:51:46 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2012-01-17 03:51:46 -0500 |
| commit | 6eadf1075c6f923fece419e38cf05bff559aefcd (patch) | |
| tree | b743ce0a3743d6f1b915b19b077a6d5bad980ea1 /include | |
| parent | a1c611745c8c4e8996c1877d4e5d0fc95f227c38 (diff) | |
| parent | c10076c4304083af15a41f6bc5e657e781c1f9a6 (diff) | |
Merge branch 'tip/perf/urgent-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/cputime.h | 1 | ||||
| -rw-r--r-- | include/linux/kvm.h | 1 | ||||
| -rw-r--r-- | include/linux/lglock.h | 36 | ||||
| -rw-r--r-- | include/linux/security.h | 2 | ||||
| -rw-r--r-- | include/net/dst.h | 1 | ||||
| -rw-r--r-- | include/net/flow.h | 1 | ||||
| -rw-r--r-- | include/net/ip_vs.h | 2 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 4 | ||||
| -rw-r--r-- | include/net/sock.h | 4 | ||||
| -rw-r--r-- | include/trace/events/writeback.h | 15 |
10 files changed, 58 insertions, 9 deletions
diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h index 62ce6823c0f2..12a1764f612b 100644 --- a/include/asm-generic/cputime.h +++ b/include/asm-generic/cputime.h | |||
| @@ -40,6 +40,7 @@ typedef u64 cputime64_t; | |||
| 40 | */ | 40 | */ |
| 41 | #define cputime_to_usecs(__ct) jiffies_to_usecs(__ct) | 41 | #define cputime_to_usecs(__ct) jiffies_to_usecs(__ct) |
| 42 | #define usecs_to_cputime(__msecs) usecs_to_jiffies(__msecs) | 42 | #define usecs_to_cputime(__msecs) usecs_to_jiffies(__msecs) |
| 43 | #define usecs_to_cputime64(__msecs) nsecs_to_jiffies64((__msecs) * 1000) | ||
| 43 | 44 | ||
| 44 | /* | 45 | /* |
| 45 | * Convert cputime to seconds and back. | 46 | * Convert cputime to seconds and back. |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index c3892fc1d538..68e67e50d028 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
| @@ -557,6 +557,7 @@ struct kvm_ppc_pvinfo { | |||
| 557 | #define KVM_CAP_MAX_VCPUS 66 /* returns max vcpus per vm */ | 557 | #define KVM_CAP_MAX_VCPUS 66 /* returns max vcpus per vm */ |
| 558 | #define KVM_CAP_PPC_PAPR 68 | 558 | #define KVM_CAP_PPC_PAPR 68 |
| 559 | #define KVM_CAP_S390_GMAP 71 | 559 | #define KVM_CAP_S390_GMAP 71 |
| 560 | #define KVM_CAP_TSC_DEADLINE_TIMER 72 | ||
| 560 | 561 | ||
| 561 | #ifdef KVM_CAP_IRQ_ROUTING | 562 | #ifdef KVM_CAP_IRQ_ROUTING |
| 562 | 563 | ||
diff --git a/include/linux/lglock.h b/include/linux/lglock.h index f549056fb20b..87f402ccec55 100644 --- a/include/linux/lglock.h +++ b/include/linux/lglock.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
| 23 | #include <linux/lockdep.h> | 23 | #include <linux/lockdep.h> |
| 24 | #include <linux/percpu.h> | 24 | #include <linux/percpu.h> |
| 25 | #include <linux/cpu.h> | ||
| 25 | 26 | ||
| 26 | /* can make br locks by using local lock for read side, global lock for write */ | 27 | /* can make br locks by using local lock for read side, global lock for write */ |
| 27 | #define br_lock_init(name) name##_lock_init() | 28 | #define br_lock_init(name) name##_lock_init() |
| @@ -72,9 +73,31 @@ | |||
| 72 | 73 | ||
| 73 | #define DEFINE_LGLOCK(name) \ | 74 | #define DEFINE_LGLOCK(name) \ |
| 74 | \ | 75 | \ |
| 76 | DEFINE_SPINLOCK(name##_cpu_lock); \ | ||
| 77 | cpumask_t name##_cpus __read_mostly; \ | ||
| 75 | DEFINE_PER_CPU(arch_spinlock_t, name##_lock); \ | 78 | DEFINE_PER_CPU(arch_spinlock_t, name##_lock); \ |
| 76 | DEFINE_LGLOCK_LOCKDEP(name); \ | 79 | DEFINE_LGLOCK_LOCKDEP(name); \ |
| 77 | \ | 80 | \ |
| 81 | static int \ | ||
| 82 | name##_lg_cpu_callback(struct notifier_block *nb, \ | ||
| 83 | unsigned long action, void *hcpu) \ | ||
| 84 | { \ | ||
| 85 | switch (action & ~CPU_TASKS_FROZEN) { \ | ||
| 86 | case CPU_UP_PREPARE: \ | ||
| 87 | spin_lock(&name##_cpu_lock); \ | ||
| 88 | cpu_set((unsigned long)hcpu, name##_cpus); \ | ||
| 89 | spin_unlock(&name##_cpu_lock); \ | ||
| 90 | break; \ | ||
| 91 | case CPU_UP_CANCELED: case CPU_DEAD: \ | ||
| 92 | spin_lock(&name##_cpu_lock); \ | ||
| 93 | cpu_clear((unsigned long)hcpu, name##_cpus); \ | ||
| 94 | spin_unlock(&name##_cpu_lock); \ | ||
| 95 | } \ | ||
| 96 | return NOTIFY_OK; \ | ||
| 97 | } \ | ||
| 98 | static struct notifier_block name##_lg_cpu_notifier = { \ | ||
| 99 | .notifier_call = name##_lg_cpu_callback, \ | ||
| 100 | }; \ | ||
| 78 | void name##_lock_init(void) { \ | 101 | void name##_lock_init(void) { \ |
| 79 | int i; \ | 102 | int i; \ |
| 80 | LOCKDEP_INIT_MAP(&name##_lock_dep_map, #name, &name##_lock_key, 0); \ | 103 | LOCKDEP_INIT_MAP(&name##_lock_dep_map, #name, &name##_lock_key, 0); \ |
| @@ -83,6 +106,11 @@ | |||
| 83 | lock = &per_cpu(name##_lock, i); \ | 106 | lock = &per_cpu(name##_lock, i); \ |
| 84 | *lock = (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; \ | 107 | *lock = (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; \ |
| 85 | } \ | 108 | } \ |
| 109 | register_hotcpu_notifier(&name##_lg_cpu_notifier); \ | ||
| 110 | get_online_cpus(); \ | ||
| 111 | for_each_online_cpu(i) \ | ||
| 112 | cpu_set(i, name##_cpus); \ | ||
| 113 | put_online_cpus(); \ | ||
| 86 | } \ | 114 | } \ |
| 87 | EXPORT_SYMBOL(name##_lock_init); \ | 115 | EXPORT_SYMBOL(name##_lock_init); \ |
| 88 | \ | 116 | \ |
| @@ -124,9 +152,9 @@ | |||
| 124 | \ | 152 | \ |
| 125 | void name##_global_lock_online(void) { \ | 153 | void name##_global_lock_online(void) { \ |
| 126 | int i; \ | 154 | int i; \ |
| 127 | preempt_disable(); \ | 155 | spin_lock(&name##_cpu_lock); \ |
| 128 | rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \ | 156 | rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \ |
| 129 | for_each_online_cpu(i) { \ | 157 | for_each_cpu(i, &name##_cpus) { \ |
| 130 | arch_spinlock_t *lock; \ | 158 | arch_spinlock_t *lock; \ |
| 131 | lock = &per_cpu(name##_lock, i); \ | 159 | lock = &per_cpu(name##_lock, i); \ |
| 132 | arch_spin_lock(lock); \ | 160 | arch_spin_lock(lock); \ |
| @@ -137,12 +165,12 @@ | |||
| 137 | void name##_global_unlock_online(void) { \ | 165 | void name##_global_unlock_online(void) { \ |
| 138 | int i; \ | 166 | int i; \ |
| 139 | rwlock_release(&name##_lock_dep_map, 1, _RET_IP_); \ | 167 | rwlock_release(&name##_lock_dep_map, 1, _RET_IP_); \ |
| 140 | for_each_online_cpu(i) { \ | 168 | for_each_cpu(i, &name##_cpus) { \ |
| 141 | arch_spinlock_t *lock; \ | 169 | arch_spinlock_t *lock; \ |
| 142 | lock = &per_cpu(name##_lock, i); \ | 170 | lock = &per_cpu(name##_lock, i); \ |
| 143 | arch_spin_unlock(lock); \ | 171 | arch_spin_unlock(lock); \ |
| 144 | } \ | 172 | } \ |
| 145 | preempt_enable(); \ | 173 | spin_unlock(&name##_cpu_lock); \ |
| 146 | } \ | 174 | } \ |
| 147 | EXPORT_SYMBOL(name##_global_unlock_online); \ | 175 | EXPORT_SYMBOL(name##_global_unlock_online); \ |
| 148 | \ | 176 | \ |
diff --git a/include/linux/security.h b/include/linux/security.h index 19d8e04e1688..e8c619d39291 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -2056,7 +2056,7 @@ static inline int security_old_inode_init_security(struct inode *inode, | |||
| 2056 | char **name, void **value, | 2056 | char **name, void **value, |
| 2057 | size_t *len) | 2057 | size_t *len) |
| 2058 | { | 2058 | { |
| 2059 | return 0; | 2059 | return -EOPNOTSUPP; |
| 2060 | } | 2060 | } |
| 2061 | 2061 | ||
| 2062 | static inline int security_inode_create(struct inode *dir, | 2062 | static inline int security_inode_create(struct inode *dir, |
diff --git a/include/net/dst.h b/include/net/dst.h index 6faec1a60216..75766b42660e 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
| @@ -53,6 +53,7 @@ struct dst_entry { | |||
| 53 | #define DST_NOHASH 0x0008 | 53 | #define DST_NOHASH 0x0008 |
| 54 | #define DST_NOCACHE 0x0010 | 54 | #define DST_NOCACHE 0x0010 |
| 55 | #define DST_NOCOUNT 0x0020 | 55 | #define DST_NOCOUNT 0x0020 |
| 56 | #define DST_NOPEER 0x0040 | ||
| 56 | 57 | ||
| 57 | short error; | 58 | short error; |
| 58 | short obsolete; | 59 | short obsolete; |
diff --git a/include/net/flow.h b/include/net/flow.h index a09447749e2d..57f15a7f1cdd 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
| @@ -207,6 +207,7 @@ extern struct flow_cache_object *flow_cache_lookup( | |||
| 207 | u8 dir, flow_resolve_t resolver, void *ctx); | 207 | u8 dir, flow_resolve_t resolver, void *ctx); |
| 208 | 208 | ||
| 209 | extern void flow_cache_flush(void); | 209 | extern void flow_cache_flush(void); |
| 210 | extern void flow_cache_flush_deferred(void); | ||
| 210 | extern atomic_t flow_cache_genid; | 211 | extern atomic_t flow_cache_genid; |
| 211 | 212 | ||
| 212 | #endif | 213 | #endif |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 873d5be7926c..e5a7b9aaf552 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
| @@ -1207,7 +1207,7 @@ extern void ip_vs_control_cleanup(void); | |||
| 1207 | extern struct ip_vs_dest * | 1207 | extern struct ip_vs_dest * |
| 1208 | ip_vs_find_dest(struct net *net, int af, const union nf_inet_addr *daddr, | 1208 | ip_vs_find_dest(struct net *net, int af, const union nf_inet_addr *daddr, |
| 1209 | __be16 dport, const union nf_inet_addr *vaddr, __be16 vport, | 1209 | __be16 dport, const union nf_inet_addr *vaddr, __be16 vport, |
| 1210 | __u16 protocol, __u32 fwmark); | 1210 | __u16 protocol, __u32 fwmark, __u32 flags); |
| 1211 | extern struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp); | 1211 | extern struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp); |
| 1212 | 1212 | ||
| 1213 | 1213 | ||
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index e90e7a9935dd..a15432da27c3 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -241,6 +241,9 @@ extern struct sctp_globals { | |||
| 241 | * bits is an indicator of when to send and window update SACK. | 241 | * bits is an indicator of when to send and window update SACK. |
| 242 | */ | 242 | */ |
| 243 | int rwnd_update_shift; | 243 | int rwnd_update_shift; |
| 244 | |||
| 245 | /* Threshold for autoclose timeout, in seconds. */ | ||
| 246 | unsigned long max_autoclose; | ||
| 244 | } sctp_globals; | 247 | } sctp_globals; |
| 245 | 248 | ||
| 246 | #define sctp_rto_initial (sctp_globals.rto_initial) | 249 | #define sctp_rto_initial (sctp_globals.rto_initial) |
| @@ -281,6 +284,7 @@ extern struct sctp_globals { | |||
| 281 | #define sctp_auth_enable (sctp_globals.auth_enable) | 284 | #define sctp_auth_enable (sctp_globals.auth_enable) |
| 282 | #define sctp_checksum_disable (sctp_globals.checksum_disable) | 285 | #define sctp_checksum_disable (sctp_globals.checksum_disable) |
| 283 | #define sctp_rwnd_upd_shift (sctp_globals.rwnd_update_shift) | 286 | #define sctp_rwnd_upd_shift (sctp_globals.rwnd_update_shift) |
| 287 | #define sctp_max_autoclose (sctp_globals.max_autoclose) | ||
| 284 | 288 | ||
| 285 | /* SCTP Socket type: UDP or TCP style. */ | 289 | /* SCTP Socket type: UDP or TCP style. */ |
| 286 | typedef enum { | 290 | typedef enum { |
diff --git a/include/net/sock.h b/include/net/sock.h index abb6e0f0c3c3..32e39371fba6 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -637,12 +637,14 @@ static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
| 637 | 637 | ||
| 638 | /* | 638 | /* |
| 639 | * Take into account size of receive queue and backlog queue | 639 | * Take into account size of receive queue and backlog queue |
| 640 | * Do not take into account this skb truesize, | ||
| 641 | * to allow even a single big packet to come. | ||
| 640 | */ | 642 | */ |
| 641 | static inline bool sk_rcvqueues_full(const struct sock *sk, const struct sk_buff *skb) | 643 | static inline bool sk_rcvqueues_full(const struct sock *sk, const struct sk_buff *skb) |
| 642 | { | 644 | { |
| 643 | unsigned int qsize = sk->sk_backlog.len + atomic_read(&sk->sk_rmem_alloc); | 645 | unsigned int qsize = sk->sk_backlog.len + atomic_read(&sk->sk_rmem_alloc); |
| 644 | 646 | ||
| 645 | return qsize + skb->truesize > sk->sk_rcvbuf; | 647 | return qsize > sk->sk_rcvbuf; |
| 646 | } | 648 | } |
| 647 | 649 | ||
| 648 | /* The per-socket spinlock must be held here. */ | 650 | /* The per-socket spinlock must be held here. */ |
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index b99caa8b780c..99d1d0decf88 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h | |||
| @@ -21,6 +21,16 @@ | |||
| 21 | {I_REFERENCED, "I_REFERENCED"} \ | 21 | {I_REFERENCED, "I_REFERENCED"} \ |
| 22 | ) | 22 | ) |
| 23 | 23 | ||
| 24 | #define WB_WORK_REASON \ | ||
| 25 | {WB_REASON_BACKGROUND, "background"}, \ | ||
| 26 | {WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages"}, \ | ||
| 27 | {WB_REASON_SYNC, "sync"}, \ | ||
| 28 | {WB_REASON_PERIODIC, "periodic"}, \ | ||
| 29 | {WB_REASON_LAPTOP_TIMER, "laptop_timer"}, \ | ||
| 30 | {WB_REASON_FREE_MORE_MEM, "free_more_memory"}, \ | ||
| 31 | {WB_REASON_FS_FREE_SPACE, "fs_free_space"}, \ | ||
| 32 | {WB_REASON_FORKER_THREAD, "forker_thread"} | ||
| 33 | |||
| 24 | struct wb_writeback_work; | 34 | struct wb_writeback_work; |
| 25 | 35 | ||
| 26 | DECLARE_EVENT_CLASS(writeback_work_class, | 36 | DECLARE_EVENT_CLASS(writeback_work_class, |
| @@ -55,7 +65,7 @@ DECLARE_EVENT_CLASS(writeback_work_class, | |||
| 55 | __entry->for_kupdate, | 65 | __entry->for_kupdate, |
| 56 | __entry->range_cyclic, | 66 | __entry->range_cyclic, |
| 57 | __entry->for_background, | 67 | __entry->for_background, |
| 58 | wb_reason_name[__entry->reason] | 68 | __print_symbolic(__entry->reason, WB_WORK_REASON) |
| 59 | ) | 69 | ) |
| 60 | ); | 70 | ); |
| 61 | #define DEFINE_WRITEBACK_WORK_EVENT(name) \ | 71 | #define DEFINE_WRITEBACK_WORK_EVENT(name) \ |
| @@ -184,7 +194,8 @@ TRACE_EVENT(writeback_queue_io, | |||
| 184 | __entry->older, /* older_than_this in jiffies */ | 194 | __entry->older, /* older_than_this in jiffies */ |
| 185 | __entry->age, /* older_than_this in relative milliseconds */ | 195 | __entry->age, /* older_than_this in relative milliseconds */ |
| 186 | __entry->moved, | 196 | __entry->moved, |
| 187 | wb_reason_name[__entry->reason]) | 197 | __print_symbolic(__entry->reason, WB_WORK_REASON) |
| 198 | ) | ||
| 188 | ); | 199 | ); |
| 189 | 200 | ||
| 190 | TRACE_EVENT(global_dirty_state, | 201 | TRACE_EVENT(global_dirty_state, |
