Current-Users archive

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

Re: no options VMSWAP, correct fix?



The original problem is this:

bin/arm--netbsdelf-ld -Map netbsd.map --cref -T ldscript -X -o netbsd
${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
uvm_pdpolicy_clock.o: In function `uvmpdpol_balancequeue':
uvm_pdpolicy_clock.c:(.text+0x57c): undefined reference to
`uvmpd_trydropswap'

*** Failed target:  netbsd

On Tue, Jun 24, 2008 at 10:11:08AM +0300, Mikko Rapeli wrote:
> --- a/sys/uvm/uvm_pdpolicy_clock.c
> +++ b/sys/uvm/uvm_pdpolicy_clock.c
> @@ -262,12 +262,13 @@ uvmpdpol_balancequeue(int swap_shortage)
>               /*
>                * if there's a shortage of swap slots, try to free it.
>                */
> -
> +#if defined (VMSWAP)
>               if (swap_shortage > 0 && (p->pqflags & PQ_SWAPBACKED) != 0) {
>                       if (uvmpd_trydropswap(p)) {
>                               swap_shortage--;
>                       }
>               }
> +#endif /* (VMSWAP) */
>  
>               /*
>                * if there's a shortage of inactive pages, deactivate.
> 

This sort of works but top, ps etc. programs which read uvm statistics
produce uvm faults. When debug options are enabled I see the backtrace
below.

Should a kernel without swap support be usable?

-Mikko

db> bt
netbsd:panic+0x14
        scp=0x803d0240 rlv=0x8044acb0 (netbsd:__kernassert+0x40)
        rsp=0x80507f44 rfp=0x80507f54
netbsd:__kernassert+0xc
        scp=0x8044ac7c rlv=0x803989b8 (netbsd:cv_enter+0x3c)
        rsp=0x80507f58 rfp=0x80507f80
netbsd:cv_enter+0xc
        scp=0x80398988 rlv=0x80398d4c (netbsd:cv_wait+0x70)
        rsp=0x80507f84 rfp=0x80507fa0
        r8=0x00000000 r7=0x804ef1f8
        r6=0x804beb60 r5=0x804ef208 r4=0x00000000
netbsd:cv_wait+0x10
        scp=0x80398cec rlv=0x803769a8 (netbsd:uvm_scheduler+0xe8)
        rsp=0x80507fa4 rfp=0x80507fb0
        r7=0x804f283c r6=0x00000000
        r5=0x00000000 r4=0x804ef1c4
netbsd:uvm_scheduler+0x10
        scp=0x803768d0 rlv=0x8038ef88 (netbsd:main+0x488)
        rsp=0x80507fb4 rfp=0x80507fec
netbsd:main+0xc
        scp=0x8038eb0c rlv=0x803001dc (netbsd:kernel_text+0x3c)
        rsp=0x80507ff0 rfp=0x80507ffc
        r7=0x00000000 r6=0xfff00000
        r5=0x803001a0 r4=0x00000000
netbsd:kernel_text+0x38
        scp=0x803001d8 rlv=0x803d021c (netbsd:printf+0x70)
        rsp=0x80508000 rfp=0x00000000


Home | Main Index | Thread Index | Old Index