Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1526264 > unrolled thread
| Started by | Alexnader Kuleshov <kuleshovmail@gmail.com> |
|---|---|
| First post | 2016-11-20 19:00 +0100 |
| Last post | 2016-11-20 19:00 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
Question: goal of twice disabling of preemption in exception handlers Alexnader Kuleshov <kuleshovmail@gmail.com> - 2016-11-20 19:00 +0100
| From | Alexnader Kuleshov <kuleshovmail@gmail.com> |
|---|---|
| Date | 2016-11-20 19:00 +0100 |
| Subject | Question: goal of twice disabling of preemption in exception handlers |
| Message-ID | <sFEzf-6DN-1@gated-at.bofh.it> |
Hello everyone, Exception handlers which may run on IST stack disable and enable preemption twice. For example do_int3() [1]. This one calls ist_enter() which disables preemption with preempt_disable() every time without any conditions. And later do_int3() calls preempt_disable() again [2] before do_trap(). Of course we decrement preemption counter in the end of such exception handlers twice too. But what's actual purpose of doing this two times? [1] https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/x86/kernel/traps.c?id=refs/tags/next-20161117#n530 [2] https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/x86/kernel/traps.c?id=refs/tags/next-20161117#n566 Thank you.
Back to top | Article view | linux.kernel
csiph-web