提交 250981e6 编写于 作者: T Thomas Gleixner

x86: reduce preemption off section in exit thread

Impact: latency improvement

No need to keep preemption disabled over the kfree call.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 0f3fa48a
...@@ -65,11 +65,11 @@ void exit_thread(void) ...@@ -65,11 +65,11 @@ void exit_thread(void)
{ {
struct task_struct *me = current; struct task_struct *me = current;
struct thread_struct *t = &me->thread; struct thread_struct *t = &me->thread;
unsigned long *bp = t->io_bitmap_ptr;
if (me->thread.io_bitmap_ptr) { if (bp) {
struct tss_struct *tss = &per_cpu(init_tss, get_cpu()); struct tss_struct *tss = &per_cpu(init_tss, get_cpu());
kfree(t->io_bitmap_ptr);
t->io_bitmap_ptr = NULL; t->io_bitmap_ptr = NULL;
clear_thread_flag(TIF_IO_BITMAP); clear_thread_flag(TIF_IO_BITMAP);
/* /*
...@@ -78,6 +78,7 @@ void exit_thread(void) ...@@ -78,6 +78,7 @@ void exit_thread(void)
memset(tss->io_bitmap, 0xff, t->io_bitmap_max); memset(tss->io_bitmap, 0xff, t->io_bitmap_max);
t->io_bitmap_max = 0; t->io_bitmap_max = 0;
put_cpu(); put_cpu();
kfree(bp);
} }
ds_exit_thread(current); ds_exit_thread(current);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册