linux-newbie.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Check for preemption only when returning from interrupt ?
@ 2020-05-20  7:03 Taeung Song
  0 siblings, 0 replies; only message in thread
From: Taeung Song @ 2020-05-20  7:03 UTC (permalink / raw)
  To: linux-newbie; +Cc: linux-x86_64

Hi,

After reading arch/x86/entry/entry_64.S
I think preemption is checked
only when returning from interrupt (not exception like syscall)

Is is right ? (based on x86)

All scenario of checking for preemption in my opinion:
(1) check kernel preemption after interrupt
https://github.com/torvalds/linux/blob/master/arch/x86/entry/entry_64.S#L672

(2) check user preemption after interrupt
https://github.com/torvalds/linux/blob/master/arch/x86/entry/entry_64.S#L620
prepare_exit_to_usermode()
        -> exit_to_usermode_loop()
             -> if (cached_flags & _TIF_NEED_RESCHED)
                       schedule();

Thanks,
Taeung

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-20  7:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20  7:03 Check for preemption only when returning from interrupt ? Taeung Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).