History

preempt/dynamic: Provide irqentry_exit_cond_resched() static call

Provide static call to control IRQ preemption (called in CONFIG_PREEMPT) so that we can override its behaviour when preempt= is overriden. Since the default behaviour is full preemption, its call is initialized to provide IRQ preemption when preempt= isn't passed.

Peter Zijlstra (Intel) committed 5 years ago

Commit 40607ee1 parent 2c9a98d2 files · +13 −1Browse files

Showing the changes to kernel (1 of 2 files). Show all

Unified · Split

kernel/entry/common.c+9−1
@@ -385,6 +385,9 @@ void irqentry_exit_cond_resched(void) · 384 unmodified lines
385385 preempt_schedule_irq();
386386 }
387387 }
388+#ifdef CONFIG_PREEMPT_DYNAMIC
389+DEFINE_STATIC_CALL(irqentry_exit_cond_resched, irqentry_exit_cond_resched);
390+#endif
388391
389392 noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state)
390393 {
@@ -411,8 +414,13 @@ noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state) · 20 unmodified lines
411414 }
412415
413416 instrumentation_begin();
414− if (IS_ENABLED(CONFIG_PREEMPTION))
417+ if (IS_ENABLED(CONFIG_PREEMPTION)) {
418+#ifdef CONFIG_PREEMT_DYNAMIC
419+ static_call(irqentry_exit_cond_resched)();
420+#else
415421 irqentry_exit_cond_resched();
422+#endif
423+ }
416424 /* Covers both tracing and lockdep */
417425 trace_hardirqs_on();
418426 instrumentation_end();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t