Re: [PATCH v2 0/3] m68k/mm: switch from DISCONTIGMEM to SPARSEMEM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 17, 2019 at 10:00:32PM +0200, Geert Uytterhoeven wrote:
Hi Mike,

On Thu, May 16, 2019 at 8:03 AM Mike Rapoport <rppt@xxxxxxxxxxxxx> wrote:
These pacthes replace DISCONTIGMEM with SPARSEMEM on m68k for systems with
!SINGLE_MEMORY_CHUNK set.

With SPARSEMEM there is a single node for the entire physical memory and to
cope with holes in the physical address space it is divided to sections of
up to 16M.

Each section has it's own memory map which size depends on actual populated
memory.

The section size of 16M was chosen pretty much arbitrarily as I couldn't
find specs for systems with e.g. Zorro memory extensions.

For an atari_defconfig kernel, bloat-o-meter says:

    add/remove: 33/26 grow/shrink: 17/234 up/down: 6801/-32284 (-25483)
    Function                                     old     new   delta

Nice!

Unfortunately it crashes on my Amiga, cfr. the logs below.

Then I realized the "section size of 16M". My Amiga has a single block
of 12 MiB of FastRAM at 0x07400000, which is not aligned to 16 MiB.
(Yes, base address of motherboard RAM is 0x08000000 - ramsize ;-)

I've tried:

-#define MAX_PHYSMEM_BITS       32
-#define SECTION_SIZE_BITS      24
+#define MAX_PHYSMEM_BITS       30

Why is this 30 bit? Does m68k limit physical address to 30 bits?
Did you try to change only the SECTION_SIZE_BITS?

+#define SECTION_SIZE_BITS      22

but that doesn't seem to make a difference.

Do you have a clue? Thanks!

Not really, at least yet.
Can you please send the entire log with 

"mminit_loglevel=4 memblock=debug debug"

in the command line?

With initrd:

[...]
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
Unable to handle kernel NULL pointer dereference at virtual address (ptrval)
Oops: 00000000
Modules linked in:
PC: [<000736fe>] get_page_from_freelist+0x776/0x7b8
SR: 2004  SP: (ptrval)  a2: 0041a490
d0: 00000001    d1: 0000ffff    d2: 00000001    d3: 000000fe
d4: 00002000    d5: 00000000    a0: 00000000    a1: 004ad000
Process kthreadd (pid: 2, task=(ptrval))
Frame format=7 eff addr=00425dcc ssw=0485 faddr=00000000
wb 1 stat/addr/data: 0005 004ac830 000731ba
wb 2 stat/addr/data: 0085 00000000 00000000
wb 3 stat/addr/data: 0085 00000004 00000000
push data: 000731ba 004ac830 00000002 00000001
Stack from 00425dec:
        00400dc0 00000001 00000001 00000000 00000000 00000000 00425e9a 00072f88
        0007b604 00425ed4 00000000 00000000 0034b06c 00000002 0034b622 0034b06c
        00000000 0033875c 00000024 00000080 0033875c 00400dc0 00073b20 00400dc0
        00000001 00000201 00425e9a 00000000 00800711 00000000 00000000 00000000
        00000000 004aa960 0041a490 0007b604 00421050 00425ec0 0007b1d2 00040cc0
        00000000 00000000 00000000 ffff0034 b6220000 00000034 b6220000 00000000
Call Trace: [<00072f88>] get_page_from_freelist+0x0/0x7b8
 [<0007b604>] kmem_cache_alloc+0x0/0x7c
 [<00073b20>] __alloc_pages_nodemask+0x106/0x7e4
 [<0007b604>] kmem_cache_alloc+0x0/0x7c
 [<0007b1d2>] cache_alloc_refill+0x17e/0x512
 [<00040cc0>] run_posix_cpu_timers+0x1a4/0x53e
 [<00010000>] __mmdrop+0x84/0xe0
 [<0007b604>] kmem_cache_alloc+0x0/0x7c
 [<00029bd6>] __enqueue_entity.constprop.25+0x3e/0x6c
 [<0007b676>] kmem_cache_alloc+0x72/0x7c
 [<00010c04>] copy_process.isra.10.part.11+0x116/0xc96
 [<0007be64>] kfree+0x0/0x5a
 [<000118c2>] _do_fork+0x9e/0x1f4
 [<00023e42>] kthread+0x0/0xdc
 [<0002d09c>] complete+0x0/0x34
 [<0007be64>] kfree+0x0/0x5a
 [<0002d09c>] complete+0x0/0x34
 [<0007be64>] kfree+0x0/0x5a
 [<00011a3a>] kernel_thread+0x0/0x26
 [<00011a5a>] kernel_thread+0x20/0x26
 [<00023e42>] kthread+0x0/0xdc
 [<00024808>] kthreadd+0x8e/0xba
 [<00023e42>] kthread+0x0/0xdc
 [<000684e8>] __munlock_pagevec+0xb8/0x202
 [<0002477a>] kthreadd+0x0/0xba
 [<00002990>] ret_from_kernel_thread+0xc/0x14
Code: 6000 fa78 52aa 0384 2056 4290 42a8 0004 <42a8> 0008 43e8 0010
42a8 000c 2203 f620 9000 5148 5148 51c9 fff6 53aa 0384 5280
Disabling lock debugging due to kernel taint

With old Debian root fs:

[...]
EXT4-fs (hda4): mounting ext3 file system using the ext4 subsystem
EXT4-fs (hda4): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext3 filesystem) readonly on device 3:4.
Freeing unused kernel memory: 136K
This architecture does not have kernel memory protection.
Run /sbin/init as init process
INIT: version 2.86 booting
random: crng init done

Unable to handle kernel access at virtual address ff07c0c1
Oops: 00000000
Modules linked in:
PC: [<001be3d4>] ide_input_data+0x4c/0x12e
SR: 2708  SP: 38ac059a  a2: 008c94f0
d0: 00000000    d1: 0039d000    d2: 94ec4ab9    d3: 0000007f
d4: 00930801    d5: 94ec4ab9    a0: 94ec4abb    a1: 00930800
Process kworker/0:1H (pid: 66, task=a61603df)
Frame format=7 eff addr=0093bcec ssw=04c5 faddr=94ec4ab9
wb 1 stat/addr/data: 0045 0000001b 000044a4
wb 2 stat/addr/data: 00c5 94ec4ab9 ffff8009
wb 3 stat/addr/data: 0045 94ec4ab9 ffff8009
push data: 000044a4 00000001 001ad87a 00000001
Stack from 0093bcd8:
        00001000 00002000 00930800 94ec4ab9 0003c568 00930c90 001bceae 00930800
        00930c90 94ec4ab9 00001000 00000000 00000009 00930c90 00032204 0003102c
        00000002 00930800 00930800 008c8bc0 001bd4f2 001bcf26 00930800 00930c90
        00000000 00002000 00000058 00000000 00930c00 001bd59e 00930800 00930c90
        00000000 00000001 00000002 00000001 00032204 00930c00 00930800 008c8bc0
        001b9f24 00930800 00000001 00000002 00000001 0003194a 0091f680 0033b614
Call Trace: [<00001000>] kernel_pg_dir+0x0/0x1000
 [<00002000>] _start+0x0/0x8
 [<0003c568>] __do_adjtimex+0xf0/0x5bc
 [<001bceae>] ide_pio_bytes+0xd2/0xee
 [<00001000>] kernel_pg_dir+0x0/0x1000
 [<00032204>] __free_irq+0x106/0x1d0
 [<0003102c>] printk+0x0/0x18
 [<001bd4f2>] task_pio_intr+0x0/0x1be
 [<001bcf26>] ide_pio_datablock+0x5c/0x6a
 [<00002000>] _start+0x0/0x8
 [<001bd59e>] task_pio_intr+0xac/0x1be
 [<00032204>] __free_irq+0x106/0x1d0
 [<001b9f24>] ide_intr+0x166/0x1be
 [<0003194a>] __irq_wake_thread+0x0/0x40
 [<00012094>] warn_slowpath_fmt+0x0/0x36
 [<000319c8>] __handle_irq_event_percpu+0x3e/0xc8
 [<00031a6e>] handle_irq_event_percpu+0x1c/0x52
 [<0018a1e8>] sbitmap_any_bit_set+0x0/0x3c
 [<00031ac2>] handle_irq_event+0x1e/0x30
 [<00033f00>] handle_simple_irq+0x54/0x58
 [<00031428>] generic_handle_irq+0x18/0x22
 [<00002c00>] do_IRQ+0x20/0x32
 [<00002b10>] auto_irqhandler_fixup+0x4/0xc
 [<0016e532>] blk_mq_dequeue_from_ctx+0x0/0x1aa
 [<0016e798>] blk_mq_dispatch_rq_list+0x0/0x380
 [<0018a1e8>] sbitmap_any_bit_set+0x0/0x3c
 [<0001439a>] irq_exit+0x36/0x44
 [<00002c06>] do_IRQ+0x26/0x32
 [<00002b10>] auto_irqhandler_fixup+0x4/0xc
 [<0016e532>] blk_mq_dequeue_from_ctx+0x0/0x1aa
 [<0001e52a>] move_linked_works+0x0/0x5a
 [<00020080>] process_one_work+0x0/0x24c
 [<001721b6>] blk_mq_sched_dispatch_requests+0xcc/0xf4
 [<0016d9dc>] __blk_mq_run_hw_queue+0x92/0xa8
 [<000201fa>] process_one_work+0x17a/0x24c
 [<0027de66>] schedule_timeout_interruptible+0x0/0xa
 [<000202cc>] process_scheduled_works+0x0/0x2e
 [<0001e698>] set_pf_worker+0x0/0x36
 [<00020e6a>] worker_thread+0x27a/0x372
 [<0002c738>] __init_waitqueue_head+0x0/0xc
 [<00020bf0>] worker_thread+0x0/0x372
 [<00012e80>] do_exit+0x0/0x71c
 [<0002d09c>] complete+0x0/0x34
 [<00023f14>] kthread+0xd2/0xdc
 [<0007be64>] kfree+0x0/0x5a
 [<00023e42>] kthread+0x0/0xdc
 [<00002990>] ret_from_kernel_thread+0xc/0x14
Code: 51c8 fffc 2408 4a83 6728 5383 2042 30d3 <30d3> 30d3 30d3 30d3
30d3 30d3 30d3 30d3 30d3 30d3 30d3 30d3 30d3 30d3 30d3 51cb
Disabling lock debugging due to kernel taint
Kernel panic - not syncing: Aiee, killing interrupt handler!
---[ end Kernel panic - not syncing: Aiee, killing interrupt handler! ]---

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

-- 
Sincerely yours,
Mike.




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux