diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/posix-cpu-timers.c | 3 | ||||
-rw-r--r-- | kernel/rcupdate.c | 13 | ||||
-rw-r--r-- | kernel/time.c | 1 |
3 files changed, 16 insertions, 1 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index ad85d3f0dcc4..7a51a5597c33 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c | |||
@@ -424,6 +424,7 @@ static void cleanup_timers(struct list_head *head, | |||
424 | cputime_t ptime = cputime_add(utime, stime); | 424 | cputime_t ptime = cputime_add(utime, stime); |
425 | 425 | ||
426 | list_for_each_entry_safe(timer, next, head, entry) { | 426 | list_for_each_entry_safe(timer, next, head, entry) { |
427 | put_task_struct(timer->task); | ||
427 | timer->task = NULL; | 428 | timer->task = NULL; |
428 | list_del_init(&timer->entry); | 429 | list_del_init(&timer->entry); |
429 | if (cputime_lt(timer->expires.cpu, ptime)) { | 430 | if (cputime_lt(timer->expires.cpu, ptime)) { |
@@ -436,6 +437,7 @@ static void cleanup_timers(struct list_head *head, | |||
436 | 437 | ||
437 | ++head; | 438 | ++head; |
438 | list_for_each_entry_safe(timer, next, head, entry) { | 439 | list_for_each_entry_safe(timer, next, head, entry) { |
440 | put_task_struct(timer->task); | ||
439 | timer->task = NULL; | 441 | timer->task = NULL; |
440 | list_del_init(&timer->entry); | 442 | list_del_init(&timer->entry); |
441 | if (cputime_lt(timer->expires.cpu, utime)) { | 443 | if (cputime_lt(timer->expires.cpu, utime)) { |
@@ -448,6 +450,7 @@ static void cleanup_timers(struct list_head *head, | |||
448 | 450 | ||
449 | ++head; | 451 | ++head; |
450 | list_for_each_entry_safe(timer, next, head, entry) { | 452 | list_for_each_entry_safe(timer, next, head, entry) { |
453 | put_task_struct(timer->task); | ||
451 | timer->task = NULL; | 454 | timer->task = NULL; |
452 | list_del_init(&timer->entry); | 455 | list_del_init(&timer->entry); |
453 | if (timer->expires.sched < sched_time) { | 456 | if (timer->expires.sched < sched_time) { |
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index bef3b6901b76..2559d4b8f23f 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
@@ -71,7 +71,7 @@ DEFINE_PER_CPU(struct rcu_data, rcu_bh_data) = { 0L }; | |||
71 | 71 | ||
72 | /* Fake initialization required by compiler */ | 72 | /* Fake initialization required by compiler */ |
73 | static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL}; | 73 | static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL}; |
74 | static int maxbatch = 10; | 74 | static int maxbatch = 10000; |
75 | 75 | ||
76 | #ifndef __HAVE_ARCH_CMPXCHG | 76 | #ifndef __HAVE_ARCH_CMPXCHG |
77 | /* | 77 | /* |
@@ -109,6 +109,10 @@ void fastcall call_rcu(struct rcu_head *head, | |||
109 | rdp = &__get_cpu_var(rcu_data); | 109 | rdp = &__get_cpu_var(rcu_data); |
110 | *rdp->nxttail = head; | 110 | *rdp->nxttail = head; |
111 | rdp->nxttail = &head->next; | 111 | rdp->nxttail = &head->next; |
112 | |||
113 | if (unlikely(++rdp->count > 10000)) | ||
114 | set_need_resched(); | ||
115 | |||
112 | local_irq_restore(flags); | 116 | local_irq_restore(flags); |
113 | } | 117 | } |
114 | 118 | ||
@@ -140,6 +144,12 @@ void fastcall call_rcu_bh(struct rcu_head *head, | |||
140 | rdp = &__get_cpu_var(rcu_bh_data); | 144 | rdp = &__get_cpu_var(rcu_bh_data); |
141 | *rdp->nxttail = head; | 145 | *rdp->nxttail = head; |
142 | rdp->nxttail = &head->next; | 146 | rdp->nxttail = &head->next; |
147 | rdp->count++; | ||
148 | /* | ||
149 | * Should we directly call rcu_do_batch() here ? | ||
150 | * if (unlikely(rdp->count > 10000)) | ||
151 | * rcu_do_batch(rdp); | ||
152 | */ | ||
143 | local_irq_restore(flags); | 153 | local_irq_restore(flags); |
144 | } | 154 | } |
145 | 155 | ||
@@ -157,6 +167,7 @@ static void rcu_do_batch(struct rcu_data *rdp) | |||
157 | next = rdp->donelist = list->next; | 167 | next = rdp->donelist = list->next; |
158 | list->func(list); | 168 | list->func(list); |
159 | list = next; | 169 | list = next; |
170 | rdp->count--; | ||
160 | if (++count >= maxbatch) | 171 | if (++count >= maxbatch) |
161 | break; | 172 | break; |
162 | } | 173 | } |
diff --git a/kernel/time.c b/kernel/time.c index dd5ae1162a8f..40c2410ac99a 100644 --- a/kernel/time.c +++ b/kernel/time.c | |||
@@ -570,6 +570,7 @@ void getnstimeofday(struct timespec *tv) | |||
570 | tv->tv_sec = x.tv_sec; | 570 | tv->tv_sec = x.tv_sec; |
571 | tv->tv_nsec = x.tv_usec * NSEC_PER_USEC; | 571 | tv->tv_nsec = x.tv_usec * NSEC_PER_USEC; |
572 | } | 572 | } |
573 | EXPORT_SYMBOL_GPL(getnstimeofday); | ||
573 | #endif | 574 | #endif |
574 | 575 | ||
575 | #if (BITS_PER_LONG < 64) | 576 | #if (BITS_PER_LONG < 64) |