Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: MAX_PAGE_SIZE for m68k (Re: CVS commit:src/sys/arch/arm/include/arm32)
> > The arm PAGE_SIZE_{MIN,MAX} should go away after nick eliminates the
> > need for the 8K pages. This leaves us with m68k to deal with...
> > Do modules work on m68k?
Yes, at least on NetBSD/news68k 9.0_RC1:
(though something wrong in modunload(8))
---
# uname -a
NetBSD 9.0_RC1 NetBSD 9.0_RC1 (GENERIC) #0: Wed Nov 27 16:14:52 UTC 2019 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/news68k/compile/GENERIC news68k
# modstat | grep ext2fs
# modload ext2fs
# modstat | grep ext2fs
ext2fs vfs filesys - 0 47856 ufs
# dd if=/dev/zero of=/tmp/img bs=1m count=1
1+0 records in
1+0 records out
1048576 bytes transferred in 1.260 secs (832203 bytes/sec)
# vnconfig vnd0 /tmp/img
newfs_ext2fs -I /dev/rvnd0c
/dev/rvnd0c: 1.0MB (2048 sectors) block size 1024, fragment size 1024
using 1 block groups of 8.0MB, 8192 blks, 128 inodes.
super-block backups (for fsck_ext2fs -b #) at:
# mount_ext2fs /dev/vnd0a /mnt
# mount
/dev/sd0a on / type ffs (log, local)
/dev/sd0g on /usr type ffs (log, local)
/dev/vnd0a on /mnt type ext2fs (local)
# umount /mnt
# modunload ext2fs
# mount_ext2fs /dev/vnd0a /mnt
# umount /mnt
# modunload ext2fs
[ 853.1800080] WARNING: module error: module `ext2fs' not found
modunload: ext2fs: No such file or directory
# mount_ext2fs /dev/vnd0a /mnt
# mount
/dev/sd0a on / type ffs (log, local)
/dev/sd0g on /usr type ffs (log, local)
/dev/vnd0a on /mnt type ext2fs (local)
# ls -l /mnt
total 12
drwx------ 2 root wheel 12288 Jan 14 16:10 lost+found
#
---
Note there is something wrong around ksyms(4) on NetBSD/sun3 9.0_RC1...
---
# uname -a
NetBSD 9.0_RC1 NetBSD 9.0_RC1 (MODULAR) #0: Tue Jan 14 23:20:20 JST 2020 tsutsui@mirage:/s/netbsd-9/src/sys/arch/sun3/compile/MODULAR sun3
# modload ext2fs
[ 50.9300220] kobj_checksyms, 988: [ext2fs]: linker error: symbol `memcpy' not found
[ 50.9700220] kobj_checksyms, 988: [ext2fs]: linker error: symbol `memcmp' not found
[ 51.0200220] WARNING: module error: unable to affix module `ext2fs', error 8
modload: ext2fs: Exec format error
# savecore
savecore: (null): _version not in namelist
#
---
(IIRC it worked when I tweaked symbols to share module binaries
between sun3 and sun3x...)
> > Should modules be shared between kernels with
> > different page sizes? Then perhaps we don't need a new constant?
>
> On m68k, I think the following two statements are true:
>
> a) The platform should use a constant PAGE_SIZE to the extent possible
> because it's a slow platform.
Yes, and this is already true.
> b) Modules should be built such that they can use a non-fixed PAGE_SIZE.
No, this is not necessary, because modules are built for each $MACHINE
and (a) each $MACHINE has fixed PAGE_SIZE.
> But (b) also requires that all of the OTHER non-same constants on m68k
> are avoided (take a closer look at <machine/vmparam.h> for example).
> Those probably should be properly hidden from module builds so that
> we can at least *catch* such cases.
(b) is not necessary, so it's simply okay to have a macro that represents
"maximum page size for the ${MACHINE_ARCH}" for jemalloc(3), isn't it?
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index