Skip to content

Commit 85b1276

Browse files
committed
lkl: enable HIGH_RES_TIMERS (hrtimer) for the arch
This enables us to grow the goodput with tcp-bbr cc. It also required to change irq handler since tick_sched_timer() needs a valid register pointer in irq_regs to call update_process_time(). Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
1 parent 9294fb3 commit 85b1276

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

arch/lkl/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ config LKL
2424
select IP_PNP
2525
select IP_PNP_DHCP
2626
select TCP_CONG_BBR
27+
select HIGH_RES_TIMERS
2728

2829
config OUTPUTFORMAT
2930
string

arch/lkl/kernel/irq.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,19 @@ static struct irq_info {
5252

5353
static bool irqs_enabled;
5454

55+
static struct pt_regs dummy;
56+
5557
static void run_irq(int irq)
5658
{
5759
unsigned long flags;
60+
struct pt_regs *old_regs = set_irq_regs((struct pt_regs *)&dummy);
5861

5962
/* interrupt handlers need to run with interrupts disabled */
6063
local_irq_save(flags);
6164
irq_enter();
6265
generic_handle_irq(irq);
6366
irq_exit();
67+
set_irq_regs(old_regs);
6468
local_irq_restore(flags);
6569
}
6670

0 commit comments

Comments
 (0)