Date: Wed, 19 Nov 1997 11:11:38 +0800 From: Peter Wemm <peter@netplex.com.au> To: ben@stuyts.nl Cc: freebsd-smp@freebsd.org Subject: Re: Success with getting SMP to work, but a few questions remain Message-ID: <199711190311.LAA19487@spinner.netplex.com.au> In-Reply-To: Your message of "Tue, 18 Nov 1997 23:56:09 %2B0100." <199711182256.XAA02838@daneel.stuyts.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
Ben Stuyts wrote: > Dear list, > > I just (finally) added a second cpu to my Gigabyte 586DX board, upgraded from > 2.2-Stable to 3.0-Current, compiled an SMP kernel with the default options, > and It Just Worked. GREAT! > > I have a few questions. BTW, my cvs source tree is up to date till 16-nov. > > Although I'm compiling something right now, top shows that the machine is > almost idle. (It certainly isn't.) For example: > > CPU states: 4.7% user, 0.0% nice, 20.3% system, 0.8% interrupt, 74.2% idle > Mem: 3892K Active, 28M Inact, 15M Wired, 12M Cache, 7595K Buf, 2540K Free > Swap: 128M Total, 5728K Used, 122M Free, 4% Inuse > > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND > 12309 root 10 0 1240K 644K wait 0 0:02 0.31% 0.31% make > 13234 root 73 0 1972K 1872K CPU0 0 0:00 3.12% 0.15% cc1 > 13235 root -6 0 504K 656K piperd 0 0:00 1.56% 0.08% as > 13232 root 10 0 220K 476K wait 0 0:00 0.78% 0.04% cc > 10434 benst 28 0 832K 572K CPU1 1 0:02 0.04% 0.04% top There are several reasons why this could be the case. The main problem is that the stats are not well adjusted for the smp case, so the time accounting isn't wonderful. In the snapshot that you show above, it looks like you are only doing a single threaded compile. At best, that can use 50% of cpu. > I tried to compile a kernel (GENERIC to be exact) with make -j4, but it faile d: > > make -j4 > --- symbols.exclude --- > --- symbols.sort --- > --- if_vx.o --- > --- cd9660_bmap.o --- > --- symbols.exclude --- > echo "gcc2_compiled." >symbols.exclude > echo "___gnu_compiled_c" >>symbols.exclude > --- symbols.sort --- > grep -v '^#' ../../i386/i386/symbols.raw | sed 's/^ //' | sort -u > symbo ls.sort > --- if_vx.o --- > cc -c -O -pipe -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith > -Winline -Wuninitialized -nostdinc -I- -I. -I../.. -I../../../include > -DFAILSAFE -DCOMPAT_43 -DMSDOSFS -DNFS -DFFS -DINET -DKERNEL -include > opt_global.h ../../dev/vx/if_vx.c > --- cd9660_lookup.o --- > --- cd9660_bmap.o --- > cc -c -O -pipe -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith > -Winline -Wuninitialized -nostdinc -I- -I. -I../.. -I../../../include > -DFAILSAFE -DCOMPAT_43 -DMSDOSFS -DNFS -DFFS -DINET -DKERNEL -include > opt_global.h ../../isofs/cd9660/cd9660_bmap.c > --- cd9660_node.o --- > --- cd9660_bmap.o --- > In file included from ../../isofs/cd9660/cd9660_bmap.c:43: > ../../sys/vnode.h:429: vnode_if.h: No such file or directory > --- cd9660_lookup.o --- > cc -c -O -pipe -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith > -Winline -Wuninitialized -nostdinc -I- -I. -I../.. -I../../../include > -DFAILSAFE -DCOMPAT_43 -DMSDOSFS -DNFS -DFFS -DINET -DKERNEL -include > opt_global.h ../../isofs/cd9660/cd9660_lookup.c > --- cd9660_node.o --- > cc -c -O -pipe -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith > -Winline -Wuninitialized -nostdinc -I- -I. -I../.. -I../../../include > -DFAILSAFE -DCOMPAT_43 -DMSDOSFS -DNFS -DFFS -DINET -DKERNEL -include > opt_global.h ../../isofs/cd9660/cd9660_node.c > --- cd9660_bmap.o --- > In file included from ../../isofs/cd9660/cd9660_bmap.c:43: > ../../sys/vnode.h:450: warning: `struct vop_lease_args' declared inside > parameter list > ../../sys/vnode.h:450: warning: its scope is only this definition or declarat ion, > ../../sys/vnode.h:450: warning: which is probably not what you want. > ../../sys/vnode.h:464: warning: `struct vop_lease_args' declared inside > parameter list > ../../sys/vnode.h:489: warning: `struct vop_lookup_args' declared inside > parameter list > ../../sys/vnode.h:494: warning: `struct vop_islocked_args' declared inside > parameter list > ../../sys/vnode.h:495: warning: `struct vop_lock_args' declared inside > parameter list > ../../sys/vnode.h:496: warning: `struct vop_unlock_args' declared inside > parameter list > ../../sys/vnode.h:497: warning: `struct vop_islocked_args' declared inside > parameter list > ../../sys/vnode.h:498: warning: `struct vop_lock_args' declared inside > parameter list > ../../sys/vnode.h:499: warning: `struct vop_poll_args' declared inside > parameter list > ../../sys/vnode.h:500: warning: `struct vop_unlock_args' declared inside > parameter list > ../../sys/vnode.h:501: warning: `struct vop_pathconf_args' declared inside > parameter list > ../../sys/vnode.h:502: warning: `struct vop_revoke_args' declared inside > parameter list > ../../sys/vnode.h:503: warning: `struct vop_lock_args' declared inside > parameter list > --- cd9660_lookup.o --- > ... etc > > Even a make -j1 has this problem. A make without any -j option works fine. > Did I miss something? Any ideas? Yes.. do a 'make depend' first. The kernel makefile depends on the implied ordering of a single threaded build. Doing a 'make depend' finds all the dependencies so that nothing gets used by a parallel compile before it's created elsewhere. > Thanks, > Ben > Cheers, -Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711190311.LAA19487>