GNU gdb (GDB) Fedora 8.3-6.fc30 Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from boot/vmlinux-5.3.0-rc6-z3fold5+... (gdb) l *balance_pgdat+0x2db 0xffffffff8128fe1b is in balance_pgdat (/src/linux/mm/vmscan.c:3472). 3467 * high-order allocations. If twice the allocation size has been 3468 * reclaimed then recheck watermarks only at order-0 to prevent 3469 * excessive reclaim. Assume that a process requested a high-order 3470 * can direct reclaim/compact. 3471 */ 3472 if (sc->order && sc->nr_reclaimed >= compact_gap(sc->order)) 3473 sc->order = 0; 3474 3475 return sc->nr_scanned >= sc->nr_to_reclaim; 3476 } (gdb) l *balance_pgdat+0x580 0xffffffff812900c0 is in kswapd (/src/linux/mm/vmscan.c:3808). 3803 * 3804 * If there are applications that are active memory-allocators 3805 * (most normal use), this basically shouldn't matter. 3806 */ 3807 static int kswapd(void *p) 3808 { 3809 unsigned int alloc_order, reclaim_order; 3810 unsigned int classzone_idx = MAX_NR_ZONES - 1; 3811 pg_data_t *pgdat = (pg_data_t*)p; 3812 struct task_struct *tsk = current; (gdb) l *console_unlock+0x43f 0xffffffff81149b5f is in console_unlock (/src/linux/arch/x86/include/asm/irqflags.h:84). 79 return native_save_fl(); 80 } 81 82 static inline notrace void arch_local_irq_restore(unsigned long flags) 83 { 84 native_restore_fl(flags); 85 } 86 87 static inline notrace void arch_local_irq_disable(void) 88 { (gdb) l *do_exit+0xcb 0xffffffff810c951b is in do_exit (/src/linux/kernel/exit.c:830). 825 exit_signals(tsk); /* sets PF_EXITING */ 826 /* 827 * Ensure that all new tsk->pi_lock acquisitions must observe 828 * PF_EXITING. Serializes against futex.c:attach_to_pi_owner(). 829 */ 830 smp_mb(); 831 /* 832 * Ensure that we must observe the pi_state in exit_mm() -> 833 * mm_release() -> exit_pi_state_list(). 834 */ (gdb) l *do_general_protection+0x16c 0xffffffff81015efc is in do_general_protection (/src/linux/arch/x86/include/asm/irqflags.h:94). 89 native_irq_disable(); 90 } 91 92 static inline notrace void arch_local_irq_enable(void) 93 { 94 native_irq_enable(); 95 } 96 97 /* 98 * Used in the idle loop; sti takes one instruction cycle (gdb) l *__do_softirq+0x351 0xffffffff81c00351 is in __do_softirq (/src/linux/arch/x86/include/asm/preempt.h:26). 21 * We mask the PREEMPT_NEED_RESCHED bit so as not to confuse all current users 22 * that think a non-zero value indicates we cannot preempt. 23 */ 24 static __always_inline int preempt_count(void) 25 { 26 return raw_cpu_read_4(__preempt_count) & ~PREEMPT_NEED_RESCHED; 27 } 28 29 static __always_inline void preempt_count_set(int pc) 30 { (gdb) l *dump_stack+0x67 0xffffffff819b2867 is in dump_stack (/src/linux/lib/dump_stack.c:115). 110 goto retry; 111 } 112 113 __dump_stack(); 114 115 if (!was_locked) 116 atomic_set(&dump_lock, -1); 117 118 local_irq_restore(flags); 119 } (gdb) l *exit_signals+0x30 0xffffffff810d86a0 is in exit_signals (/src/linux/include/linux/percpu-rwsem.h:38). 33 extern int __percpu_down_read(struct percpu_rw_semaphore *, int); 34 extern void __percpu_up_read(struct percpu_rw_semaphore *); 35 36 static inline void percpu_down_read(struct percpu_rw_semaphore *sem) 37 { 38 might_sleep(); 39 40 rwsem_acquire_read(&sem->rw_sem.dep_map, 0, 0, _RET_IP_); 41 42 preempt_disable(); (gdb) l *finish_wait+0x90 0xffffffff8111fda0 is in autoremove_wake_function (/src/linux/kernel/sched/wait.c:371). 366 } 367 } 368 EXPORT_SYMBOL(finish_wait); 369 370 int autoremove_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key) 371 { 372 int ret = default_wake_function(wq_entry, mode, sync, key); 373 374 if (ret) 375 list_del_init(&wq_entry->entry); (gdb) l *__frontswap_store+0xc4 0xffffffff812e92b4 is in __frontswap_store (/src/linux/mm/frontswap.c:273). 268 } 269 270 /* Try to store in each implementation, until one succeeds. */ 271 for_each_frontswap_ops(ops) { 272 ret = ops->store(type, offset, page); 273 if (!ret) /* successful store */ 274 break; 275 } 276 if (ret == 0) { 277 __frontswap_set(sis, offset); (gdb) l *handle_to_buddy+0x20 0xffffffff81339a60 is in handle_to_buddy (/src/linux/mm/z3fold.c:431). 426 unsigned long addr; 427 428 WARN_ON(handle & (1 << PAGE_HEADLESS)); 429 addr = *(unsigned long *)handle; 430 zhdr = (struct z3fold_header *)(addr & PAGE_MASK); 431 return (addr - zhdr->first_num) & BUDDY_MASK; 432 } 433 434 static inline struct z3fold_pool *zhdr_to_pool(struct z3fold_header *zhdr) 435 { (gdb) l *irq_exit+0xf1 0xffffffff810cb841 is in irq_exit (/src/linux/kernel/softirq.c:373). 368 /* 369 * We can safely execute softirq on the current stack if 370 * it is the irq stack, because it should be near empty 371 * at this stage. 372 */ 373 __do_softirq(); 374 #else 375 /* 376 * Otherwise, irq_exit() is called on the task stack that can 377 * be potentially deep already. So call softirq in its own stack (gdb) l *kswapd+0x239 0xffffffff812902f9 is in kswapd (/src/linux/mm/vmscan.c:3872). 3867 * but kcompactd is woken to compact for the original 3868 * request (alloc_order). 3869 */ 3870 trace_mm_vmscan_kswapd_wake(pgdat->node_id, classzone_idx, 3871 alloc_order); 3872 reclaim_order = balance_pgdat(pgdat, alloc_order, classzone_idx); 3873 if (reclaim_order < alloc_order) 3874 goto kswapd_try_sleep; 3875 } 3876 (gdb) l *kthread+0x108 0xffffffff810efa68 is in kthread (/src/linux/kernel/kthread.c:255). 250 251 ret = -EINTR; 252 if (!test_bit(KTHREAD_SHOULD_STOP, &self->flags)) { 253 cgroup_kthread_ready(); 254 __kthread_parkme(self); 255 ret = threadfn(data); 256 } 257 do_exit(ret); 258 } 259 (gdb) l *kthread_park+0x80 0xffffffff810ef960 is in kthread (/src/linux/kernel/kthread.c:215). 210 __kthread_parkme(to_kthread(current)); 211 } 212 EXPORT_SYMBOL_GPL(kthread_parkme); 213 214 static int kthread(void *_create) 215 { 216 /* Copy data: it's on kthread's stack */ 217 struct kthread_create_info *create = _create; 218 int (*threadfn)(void *data) = create->threadfn; 219 void *data = create->data; (gdb) l *ret_from_fork+0x3a 0xffffffff81a0021a is at /src/linux/arch/x86/entry/entry_64.S:358. 353 /* 354 * A kernel thread is allowed to return here after successfully 355 * calling do_execve(). Exit to userspace to complete the execve() 356 * syscall. 357 */ 358 movq $0, RAX(%rsp) 359 jmp 2b 360 END(ret_from_fork) 361 362 /* (gdb) l *rewind_stack_do_exit+0x17 0xffffffff81a01657 is at /src/linux/arch/x86/include/asm/irqflags.h:84. 79 return native_save_fl(); 80 } 81 82 static inline notrace void arch_local_irq_restore(unsigned long flags) 83 { 84 native_restore_fl(flags); 85 } 86 87 static inline notrace void arch_local_irq_disable(void) 88 { (gdb) l *shrink_inactive_list+0x1da 0xffffffff8128d53a is in shrink_inactive_list (/src/linux/mm/vmscan.c:1996). 1991 spin_unlock_irq(&pgdat->lru_lock); 1992 1993 if (nr_taken == 0) 1994 return 0; 1995 1996 nr_reclaimed = shrink_page_list(&page_list, pgdat, sc, 0, 1997 &stat, false); 1998 1999 spin_lock_irq(&pgdat->lru_lock); 2000 (gdb) l *shrink_node+0xdf 0xffffffff8128e63f is in shrink_node (/src/linux/mm/vmscan.c:2714). 2709 reclaimed = sc->nr_reclaimed; 2710 scanned = sc->nr_scanned; 2711 shrink_node_memcg(pgdat, memcg, sc, &lru_pages); 2712 node_lru_pages += lru_pages; 2713 2714 shrink_slab(sc->gfp_mask, pgdat->node_id, memcg, 2715 sc->priority); 2716 2717 /* Record the group's reclaim efficiency */ 2718 vmpressure(sc->gfp_mask, memcg, false, (gdb) l *shrink_node_memcg+0x202 0xffffffff8128dff2 is in shrink_node_memcg (/src/linux/mm/vmscan.c:2231). 2226 if (inactive_list_is_low(lruvec, is_file_lru(lru), sc, true)) 2227 shrink_active_list(nr_to_scan, lruvec, sc, lru); 2228 return 0; 2229 } 2230 2231 return shrink_inactive_list(nr_to_scan, lruvec, sc, lru); 2232 } 2233 2234 enum scan_balance { 2235 SCAN_EQUAL, (gdb) l *shrink_page_list+0x1124 0xffffffff8128c294 is in shrink_page_list (/src/linux/mm/vmscan.c:1397). 1392 * Page is dirty. Flush the TLB if a writable entry 1393 * potentially exists to avoid CPU writes after IO 1394 * starts and then write it out here. 1395 */ 1396 try_to_unmap_flush_dirty(); 1397 switch (pageout(page, mapping, sc)) { 1398 case PAGE_KEEP: 1399 goto keep_locked; 1400 case PAGE_ACTIVATE: 1401 goto activate_locked; (gdb) l *swap_writepage+0x39 0xffffffff812dfb99 is in swap_writepage (/src/linux/include/linux/frontswap.h:90). 85 #endif 86 87 static inline int frontswap_store(struct page *page) 88 { 89 if (frontswap_enabled()) 90 return __frontswap_store(page); 91 92 return -1; 93 } 94 (gdb) l *trace_hardirqs_off_thunk+0x1a 0xffffffff81001c8a is at /src/linux/arch/x86/entry/thunk_64.S:42. 37 _ASM_NOKPROBE(\name) 38 .endm 39 40 #ifdef CONFIG_TRACE_IRQFLAGS 41 THUNK trace_hardirqs_on_thunk,trace_hardirqs_on_caller,1 42 THUNK trace_hardirqs_off_thunk,trace_hardirqs_off_caller,1 43 #endif 44 45 #ifdef CONFIG_DEBUG_LOCK_ALLOC 46 THUNK lockdep_sys_exit_thunk,lockdep_sys_exit (gdb) l *z3fold_zpool_map+0x76 0xffffffff81339ce6 is in z3fold_zpool_map (/src/linux/mm/z3fold.c:1287). 1282 case FIRST: 1283 addr += ZHDR_SIZE_ALIGNED; 1284 break; 1285 case MIDDLE: 1286 addr += zhdr->start_middle << CHUNK_SHIFT; 1287 set_bit(MIDDLE_CHUNK_MAPPED, &page->private); 1288 break; 1289 case LAST: 1290 addr += PAGE_SIZE - (handle_to_chunks(handle) << CHUNK_SHIFT); 1291 break; (gdb) l *z3fold_zpool_shrink+0x3c4 0xffffffff8133ad54 is in z3fold_zpool_shrink (/src/linux/mm/z3fold.c:1215). 1210 ret = pool->ops->evict(pool, first_handle); 1211 if (ret) 1212 goto next; 1213 } 1214 if (last_handle) { 1215 ret = pool->ops->evict(pool, last_handle); 1216 if (ret) 1217 goto next; 1218 } 1219 next: (gdb) l *zswap_frontswap_store+0x424 0xffffffff812ea974 is in zswap_frontswap_store (/src/linux/mm/zswap.c:955). 950 951 pool = zswap_pool_last_get(); 952 if (!pool) 953 return -ENOENT; 954 955 ret = zpool_shrink(pool->zpool, 1, NULL); 956 957 zswap_pool_put(pool); 958 959 return ret; (gdb) l *zswap_writeback_entry+0x50 0xffffffff812ea190 is in zswap_writeback_entry (/src/linux/mm/zswap.c:858). 853 .sync_mode = WB_SYNC_NONE, 854 }; 855 856 /* extract swpentry from data */ 857 zhdr = zpool_map_handle(pool, handle, ZPOOL_MM_RO); 858 swpentry = zhdr->swpentry; /* here */ 859 zpool_unmap_handle(pool, handle); 860 tree = zswap_trees[swp_type(swpentry)]; 861 offset = swp_offset(swpentry); 862 (gdb) quit